-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated STM32 libraries + small warning fixes
- Loading branch information
Showing
10,614 changed files
with
2,796,347 additions
and
51,645 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
186 changes: 186 additions & 0 deletions
186
.../STM32H7/Drivers/BSP/Adafruit_Shield/Adafruit_Config/adafruit_802_conf_STM32F4xx_Nucleo.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
/** | ||
****************************************************************************** | ||
* @file adafruit_802_conf.h | ||
* @author MCD Application Team | ||
* @brief This file includes the nucleo configuration and errno files | ||
* | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* <h2><center>© Copyright (c) 2018 STMicroelectronics. | ||
* All rights reserved.</center></h2> | ||
* | ||
* This software component is licensed by ST under BSD 3-Clause license, | ||
* the "License"; You may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* opensource.org/licenses/BSD-3-Clause | ||
****************************************************************************** | ||
*/ | ||
|
||
/* Define to prevent recursive inclusion -------------------------------------*/ | ||
#ifndef ADAFRUIT_802_CONF_H | ||
#define ADAFRUIT_802_CONF_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Includes ------------------------------------------------------------------*/ | ||
#include "stm32f4xx_nucleo_conf.h" | ||
#include "stm32f4xx_nucleo_errno.h" | ||
#include "stm32f4xx_nucleo_bus.h" | ||
|
||
/** @addtogroup BSP | ||
* @{ | ||
*/ | ||
|
||
/** @addtogroup ADAFRUIT_802 | ||
* @{ | ||
*/ | ||
|
||
/** @defgroup ADAFRUIT_802_CONFIG Config | ||
* @{ | ||
*/ | ||
|
||
#if !defined (USE_NUCLEO_64) && !defined (USE_NUCLEO_144) | ||
#error "Board Pin number not defined" | ||
#endif | ||
|
||
/** @defgroup ADAFRUIT_802_CONFIG_Exported_Constants Exported Constants | ||
* @{ | ||
*/ | ||
#define BUS_SPIx_Init BSP_SPI1_Init | ||
#define BUS_SPIx_Recv BSP_SPI1_Recv | ||
#define BUS_SPIx_Send BSP_SPI1_Send | ||
#define BUS_SPIx_SendRecv BSP_SPI1_SendRecv | ||
|
||
/** | ||
* @brief ADC Interface pins | ||
* used to detect motion of Joystick available on Adafruit 1.8" TFT shield | ||
*/ | ||
#if defined (USE_NUCLEO_64) | ||
#define ADAFRUIT_802_ADCx ADC1 | ||
#define ADAFRUIT_802_ADCx_CLK_ENABLE() __HAL_RCC_ADC1_CLK_ENABLE() | ||
#define ADAFRUIT_802_ADCx_CLK_DISABLE() __HAL_RCC_ADC1_CLK_DISABLE() | ||
#define ADAFRUIT_802_ADCx_CHANNEL ADC_CHANNEL_8 | ||
|
||
#define ADAFRUIT_802_ADCx_GPIO_PORT GPIOB | ||
#define ADAFRUIT_802_ADCx_GPIO_PIN GPIO_PIN_0 | ||
#define ADAFRUIT_802_ADCx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() | ||
#define ADAFRUIT_802_ADCx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() | ||
#else /* USE_NUCLEO_144 */ | ||
#if defined(ADC3) | ||
#define ADAFRUIT_802_ADCx ADC3 | ||
#define ADAFRUIT_802_ADCx_CLK_ENABLE() __HAL_RCC_ADC3_CLK_ENABLE() | ||
#define ADAFRUIT_802_ADCx_CLK_DISABLE() __HAL_RCC_ADC3_CLK_DISABLE() | ||
#define ADAFRUIT_802_ADCx_CHANNEL ADC_CHANNEL_9 | ||
|
||
#define ADAFRUIT_802_ADCx_GPIO_PORT GPIOF | ||
#define ADAFRUIT_802_ADCx_GPIO_PIN GPIO_PIN_3 | ||
#define ADAFRUIT_802_ADCx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() | ||
#define ADAFRUIT_802_ADCx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() | ||
#else | ||
#define ADAFRUIT_802_ADCx ADC1 | ||
#define ADAFRUIT_802_ADCx_CLK_ENABLE() __HAL_RCC_ADC1_CLK_ENABLE() | ||
#define ADAFRUIT_802_ADCx_CLK_DISABLE() __HAL_RCC_ADC1_CLK_DISABLE() | ||
#define ADAFRUIT_802_ADCx_CHANNEL ADC_CHANNEL_11 | ||
|
||
#define ADAFRUIT_802_ADCx_GPIO_PORT GPIOC | ||
#define ADAFRUIT_802_ADCx_GPIO_PIN GPIO_PIN_1 | ||
#define ADAFRUIT_802_ADCx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() | ||
#define ADAFRUIT_802_ADCx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() | ||
#endif | ||
#endif | ||
|
||
#define ADAFRUIT_802_ADCx_RANK 1U | ||
#define ADAFRUIT_802_ADCx_SAMPLETIME ADC_SAMPLETIME_3CYCLES | ||
#define ADAFRUIT_802_ADCx_PRESCALER ADC_CLOCKPRESCALER_PCLK_DIV4 | ||
#define ADAFRUIT_802_ADCx_POLL_TIMEOUT 10U | ||
|
||
#if defined (USE_NUCLEO_64) | ||
/** | ||
* @brief SD Control Interface pins (shield D4) | ||
*/ | ||
#define ADAFRUIT_802_SD_CS_PIN GPIO_PIN_5 | ||
#define ADAFRUIT_802_SD_CS_GPIO_PORT GPIOB | ||
#define ADAFRUIT_802_SD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() | ||
#define ADAFRUIT_802_SD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() | ||
|
||
/** | ||
* @brief LCD Control Interface pins (shield D10) | ||
*/ | ||
#define ADAFRUIT_802_LCD_CS_PIN GPIO_PIN_6 | ||
#define ADAFRUIT_802_LCD_CS_GPIO_PORT GPIOB | ||
#define ADAFRUIT_802_LCD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() | ||
#define ADAFRUIT_802_LCD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() | ||
|
||
/** | ||
* @brief LCD Data/Command Interface pins (shield D8) | ||
*/ | ||
#define ADAFRUIT_802_LCD_DC_PIN GPIO_PIN_9 | ||
#define ADAFRUIT_802_LCD_DC_GPIO_PORT GPIOA | ||
#define ADAFRUIT_802_LCD_DC_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() | ||
#define ADAFRUIT_802_LCD_DC_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() | ||
#else /* USE_NUCLEO_144 */ | ||
/** | ||
* @brief SD Control Interface pins (shield D4) | ||
*/ | ||
#define ADAFRUIT_802_SD_CS_PIN GPIO_PIN_14 | ||
#define ADAFRUIT_802_SD_CS_GPIO_PORT GPIOF | ||
#define ADAFRUIT_802_SD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() | ||
#define ADAFRUIT_802_SD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() | ||
|
||
/** | ||
* @brief LCD Control Interface pins (shield D10) | ||
*/ | ||
#define ADAFRUIT_802_LCD_CS_PIN GPIO_PIN_14 | ||
#define ADAFRUIT_802_LCD_CS_GPIO_PORT GPIOD | ||
#define ADAFRUIT_802_LCD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() | ||
#define ADAFRUIT_802_LCD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() | ||
|
||
/** | ||
* @brief LCD Data/Command Interface pins (shield D8) | ||
*/ | ||
#define ADAFRUIT_802_LCD_DC_PIN GPIO_PIN_12 | ||
#define ADAFRUIT_802_LCD_DC_GPIO_PORT GPIOF | ||
#define ADAFRUIT_802_LCD_DC_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() | ||
#define ADAFRUIT_802_LCD_DC_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() | ||
#endif | ||
|
||
/** | ||
* @brief SD Control Lines management | ||
*/ | ||
#define ADAFRUIT_802_SD_CS_LOW() HAL_GPIO_WritePin(ADAFRUIT_802_SD_CS_GPIO_PORT, ADAFRUIT_802_SD_CS_PIN, GPIO_PIN_RESET) | ||
#define ADAFRUIT_802_SD_CS_HIGH() HAL_GPIO_WritePin(ADAFRUIT_802_SD_CS_GPIO_PORT, ADAFRUIT_802_SD_CS_PIN, GPIO_PIN_SET) | ||
|
||
/** | ||
* @brief LCD Control Lines management | ||
*/ | ||
#define ADAFRUIT_802_LCD_CS_LOW() HAL_GPIO_WritePin(ADAFRUIT_802_LCD_CS_GPIO_PORT, ADAFRUIT_802_LCD_CS_PIN, GPIO_PIN_RESET) | ||
#define ADAFRUIT_802_LCD_CS_HIGH() HAL_GPIO_WritePin(ADAFRUIT_802_LCD_CS_GPIO_PORT, ADAFRUIT_802_LCD_CS_PIN, GPIO_PIN_SET) | ||
#define ADAFRUIT_802_LCD_DC_LOW() HAL_GPIO_WritePin(ADAFRUIT_802_LCD_DC_GPIO_PORT, ADAFRUIT_802_LCD_DC_PIN, GPIO_PIN_RESET) | ||
#define ADAFRUIT_802_LCD_DC_HIGH() HAL_GPIO_WritePin(ADAFRUIT_802_LCD_DC_GPIO_PORT, ADAFRUIT_802_LCD_DC_PIN, GPIO_PIN_SET) | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* ADAFRUIT_802_CONF_H */ | ||
|
||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
138 changes: 138 additions & 0 deletions
138
.../STM32H7/Drivers/BSP/Adafruit_Shield/Adafruit_Config/adafruit_802_conf_STM32F7xx_Nucleo.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
/** | ||
****************************************************************************** | ||
* @file adafruit_802_conf.h | ||
* @author MCD Application Team | ||
* @brief This file includes the nucleo configuration and errno files | ||
* | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* <h2><center>© Copyright (c) 2018 STMicroelectronics. | ||
* All rights reserved.</center></h2> | ||
* | ||
* This software component is licensed by ST under BSD 3-Clause license, | ||
* the "License"; You may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* opensource.org/licenses/BSD-3-Clause | ||
****************************************************************************** | ||
*/ | ||
|
||
/* Define to prevent recursive inclusion -------------------------------------*/ | ||
#ifndef ADAFRUIT_802_CONF_H | ||
#define ADAFRUIT_802_CONF_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Includes ------------------------------------------------------------------*/ | ||
#include "stm32f7xx_nucleo_conf.h" | ||
#include "stm32f7xx_nucleo_errno.h" | ||
#include "stm32f7xx_nucleo_bus.h" | ||
|
||
/** @addtogroup BSP | ||
* @{ | ||
*/ | ||
|
||
/** @addtogroup ADAFRUIT_802 | ||
* @{ | ||
*/ | ||
|
||
/** @defgroup ADAFRUIT_802_CONFIG Config | ||
* @{ | ||
*/ | ||
|
||
#if !defined (USE_NUCLEO_144) | ||
#error "Board Pin number not defined" | ||
#endif | ||
|
||
/** @defgroup ADAFRUIT_802_CONFIG_Exported_Constants Exported Constants | ||
* @{ | ||
*/ | ||
#define BUS_SPIx_Init BSP_SPI1_Init | ||
#define BUS_SPIx_Recv BSP_SPI1_Recv | ||
#define BUS_SPIx_Send BSP_SPI1_Send | ||
#define BUS_SPIx_SendRecv BSP_SPI1_SendRecv | ||
|
||
/** | ||
* @brief ADC Interface pins | ||
* used to detect motion of Joystick available on Adafruit 1.8" TFT shield | ||
*/ | ||
#if defined (USE_NUCLEO_144) | ||
#define NUCLEO_ADCx ADC3 | ||
#define NUCLEO_ADCx_CLK_ENABLE() __HAL_RCC_ADC3_CLK_ENABLE() | ||
#define NUCLEO_ADCx_CLK_DISABLE() __HAL_RCC_ADC3_CLK_DISABLE() | ||
#define NUCLEO_ADCx_CHANNEL ADC_CHANNEL_9 | ||
|
||
#define NUCLEO_ADCx_GPIO_PORT GPIOF | ||
#define NUCLEO_ADCx_GPIO_PIN GPIO_PIN_3 | ||
#define NUCLEO_ADCx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() | ||
#define NUCLEO_ADCx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() | ||
|
||
#define ADAFRUIT_802_ADCx_RANK 1U | ||
#define ADAFRUIT_802_ADCx_SAMPLETIME ADC_SAMPLETIME_3CYCLES | ||
#define ADAFRUIT_802_ADCx_PRESCALER ADC_CLOCK_SYNC_DIV4 | ||
#define ADAFRUIT_802_ADCx_POLL_TIMEOUT 10U | ||
|
||
/** | ||
* @brief SD Control Interface pins (shield D4) | ||
*/ | ||
#define NUCLEO_SD_CS_PIN GPIO_PIN_14 | ||
#define NUCLEO_SD_CS_GPIO_PORT GPIOF | ||
#define NUCLEO_SD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() | ||
#define NUCLEO_SD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() | ||
|
||
/** | ||
* @brief LCD Control Interface pins (shield D10) | ||
*/ | ||
#define NUCLEO_LCD_CS_PIN GPIO_PIN_14 | ||
#define NUCLEO_LCD_CS_GPIO_PORT GPIOD | ||
#define NUCLEO_LCD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() | ||
#define NUCLEO_LCD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() | ||
|
||
/** | ||
* @brief LCD Data/Command Interface pins (shield D8) | ||
*/ | ||
#define NUCLEO_LCD_DC_PIN GPIO_PIN_12 | ||
#define NUCLEO_LCD_DC_GPIO_PORT GPIOF | ||
#define NUCLEO_LCD_DC_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() | ||
#define NUCLEO_LCD_DC_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() | ||
#endif | ||
|
||
/** | ||
* @brief SD Control Lines management | ||
*/ | ||
#define SD_CS_LOW() HAL_GPIO_WritePin(NUCLEO_SD_CS_GPIO_PORT, NUCLEO_SD_CS_PIN, GPIO_PIN_RESET) | ||
#define SD_CS_HIGH() HAL_GPIO_WritePin(NUCLEO_SD_CS_GPIO_PORT, NUCLEO_SD_CS_PIN, GPIO_PIN_SET) | ||
|
||
/** | ||
* @brief LCD Control Lines management | ||
*/ | ||
#define LCD_CS_LOW() HAL_GPIO_WritePin(NUCLEO_LCD_CS_GPIO_PORT, NUCLEO_LCD_CS_PIN, GPIO_PIN_RESET) | ||
#define LCD_CS_HIGH() HAL_GPIO_WritePin(NUCLEO_LCD_CS_GPIO_PORT, NUCLEO_LCD_CS_PIN, GPIO_PIN_SET) | ||
#define LCD_DC_LOW() HAL_GPIO_WritePin(NUCLEO_LCD_DC_GPIO_PORT, NUCLEO_LCD_DC_PIN, GPIO_PIN_RESET) | ||
#define LCD_DC_HIGH() HAL_GPIO_WritePin(NUCLEO_LCD_DC_GPIO_PORT, NUCLEO_LCD_DC_PIN, GPIO_PIN_SET) | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* ADAFRUIT_802_CONF_H */ | ||
|
||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
Oops, something went wrong.