STM32L476G-Discovery BSP User Manual
|
This file contains definitions for STM32L476G_DISCOVERY's LEDs, push-buttons hardware resources (MB1184). More...
#include "stm32l4xx_hal.h"
Go to the source code of this file.
Defines | |
#define | BATTERY_DETECTION_PIN GPIO_PIN_3 |
#define | BATTERY_DETECTION_GPIO_PORT GPIOB |
#define | BATTERY_DETECTION_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
#define | BATTERY_DETECTION_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() |
#define | LEDn 2 |
#define | LED4_PIN GPIO_PIN_2 |
#define | LED4_GPIO_PORT GPIOB |
#define | LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
#define | LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() |
#define | LED5_PIN GPIO_PIN_8 |
#define | LED5_GPIO_PORT GPIOE |
#define | LED5_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() |
#define | LED5_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() |
#define | LEDx_GPIO_CLK_ENABLE(__LED__) |
#define | LEDx_GPIO_CLK_DISABLE(__LED__) |
#define | JOYn 5 |
#define | RIGHT_JOY_PIN GPIO_PIN_2 /* PA.02 */ |
Joystick Right push-button. | |
#define | RIGHT_JOY_GPIO_PORT GPIOA |
#define | RIGHT_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() |
#define | RIGHT_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() |
#define | RIGHT_JOY_EXTI_IRQn EXTI2_IRQn |
#define | LEFT_JOY_PIN GPIO_PIN_1 /* PA.01 */ |
Joystick Left push-button. | |
#define | LEFT_JOY_GPIO_PORT GPIOA |
#define | LEFT_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() |
#define | LEFT_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() |
#define | LEFT_JOY_EXTI_IRQn EXTI1_IRQn |
#define | UP_JOY_PIN GPIO_PIN_3 /* PA.03 */ |
Joystick Up push-button. | |
#define | UP_JOY_GPIO_PORT GPIOA |
#define | UP_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() |
#define | UP_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() |
#define | UP_JOY_EXTI_IRQn EXTI3_IRQn |
#define | DOWN_JOY_PIN GPIO_PIN_5 /* PA.05 */ |
Joystick Down push-button. | |
#define | DOWN_JOY_GPIO_PORT GPIOA |
#define | DOWN_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() |
#define | DOWN_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() |
#define | DOWN_JOY_EXTI_IRQn EXTI9_5_IRQn |
#define | SEL_JOY_PIN GPIO_PIN_0 /* PA.00 */ |
Joystick Sel push-button. | |
#define | SEL_JOY_GPIO_PORT GPIOA |
#define | SEL_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() |
#define | SEL_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() |
#define | SEL_JOY_EXTI_IRQn EXTI0_IRQn |
#define | JOYx_GPIO_CLK_ENABLE(__JOY__) |
#define | JOYx_GPIO_CLK_DISABLE(__JOY__) |
#define | JOY_ALL_PINS (RIGHT_JOY_PIN | LEFT_JOY_PIN | UP_JOY_PIN | DOWN_JOY_PIN | SEL_JOY_PIN) |
#define | DISCOVERY_SPIx SPI2 |
#define | DISCOVERY_SPIx_CLOCK_ENABLE() __HAL_RCC_SPI2_CLK_ENABLE() |
#define | DISCOVERY_SPIx_CLOCK_DISABLE() __HAL_RCC_SPI2_CLK_DISABLE() |
#define | DISCOVERY_SPIx_GPIO_PORT GPIOD /* GPIOD */ |
#define | DISCOVERY_SPIx_AF GPIO_AF5_SPI2 |
#define | DISCOVERY_SPIx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() |
#define | DISCOVERY_SPIx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() |
#define | DISCOVERY_SPIx_GPIO_FORCE_RESET() __HAL_RCC_SPI2_FORCE_RESET() |
#define | DISCOVERY_SPIx_GPIO_RELEASE_RESET() __HAL_RCC_SPI2_RELEASE_RESET() |
#define | DISCOVERY_SPIx_SCK_PIN GPIO_PIN_1 /* PD.01*/ |
#define | DISCOVERY_SPIx_MISO_PIN GPIO_PIN_3 /* PD.03 */ |
#define | DISCOVERY_SPIx_MOSI_PIN GPIO_PIN_4 /* PD.04 */ |
#define | SPIx_TIMEOUT_MAX ((uint32_t)0x1000) |
#define | READWRITE_CMD ((uint8_t)0x80) |
#define | MULTIPLEBYTE_CMD ((uint8_t)0x40) |
#define | DUMMY_BYTE ((uint8_t)0x00) |
#define | DISCOVERY_I2C1_SCL_GPIO_PORT GPIOB |
#define | DISCOVERY_I2C1_SDA_GPIO_PORT GPIOB |
#define | DISCOVERY_I2C1_SCL_PIN GPIO_PIN_6 |
#define | DISCOVERY_I2C1_SDA_PIN GPIO_PIN_7 |
#define | DISCOVERY_I2C1_SCL_SDA_AF GPIO_AF4_I2C1 |
#define | DISCOVERY_I2C1 I2C1 |
#define | DISCOVERY_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE() |
#define | DISCOVERY_I2C1_CLK_DISABLE() __HAL_RCC_I2C1_CLK_DISABLE() |
#define | DISCOVERY_I2C1_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
#define | DISCOVERY_I2C1_SCL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
#define | DISCOVERY_I2C1_SDA_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() |
#define | DISCOVERY_I2C1_SCL_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() |
#define | DISCOVERY_I2C1_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET() |
#define | DISCOVERY_I2C1_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET() |
#define | DISCOVERY_I2C1_EV_IRQn I2C1_EV_IRQn |
#define | DISCOVERY_I2C1_EV_IRQHandler I2C1_EV_IRQHandler |
#define | DISCOVERY_I2C1_ER_IRQn I2C1_ER_IRQn |
#define | DISCOVERY_I2C1_ER_IRQHandler I2C1_ER_IRQHandler |
#define | AUDIO_I2C_ADDRESS ((uint16_t) 0x94) |
#define | DISCOVERY_I2C1_TIMEOUT_MAX 3000 |
#define | DISCOVERY_I2C2_SCL_PIN GPIO_PIN_10 |
#define | DISCOVERY_I2C2_SCL_GPIO_PORT GPIOB |
#define | DISCOVERY_I2C2_SDA_PIN GPIO_PIN_11 |
#define | DISCOVERY_I2C2_SDA_GPIO_PORT GPIOB |
#define | DISCOVERY_I2C2_SCL_SDA_AF GPIO_AF4_I2C2 |
#define | DISCOVERY_I2C2 I2C2 |
#define | DISCOVERY_I2C2_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE() |
#define | DISCOVERY_I2C2_CLK_DISABLE() __HAL_RCC_I2C2_CLK_DISABLE() |
#define | DISCOVERY_I2C2_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
#define | DISCOVERY_I2C2_SCL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
#define | DISCOVERY_I2C2_SDA_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() |
#define | DISCOVERY_I2C2_SCL_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() |
#define | DISCOVERY_I2C2_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET() |
#define | DISCOVERY_I2C2_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET() |
#define | DISCOVERY_I2C2_EV_IRQn I2C2_EV_IRQn |
#define | DISCOVERY_I2C2_ER_IRQn I2C2_ER_IRQn |
#define | IDD_I2C_ADDRESS ((uint16_t) 0x84) |
#define | DISCOVERY_I2C2_TIMEOUT_MAX 3000 |
#define | ACCELERO_CS_LOW() HAL_GPIO_WritePin(ACCELERO_CS_GPIO_PORT, ACCELERO_CS_PIN, GPIO_PIN_RESET) |
Accelerometer Chip Select macro definition. | |
#define | ACCELERO_CS_HIGH() HAL_GPIO_WritePin(ACCELERO_CS_GPIO_PORT, ACCELERO_CS_PIN, GPIO_PIN_SET) |
#define | ACCELERO_CS_GPIO_PORT GPIOE /* GPIOE */ |
Accelerometer SPI Interface pins. | |
#define | ACCELERO_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() |
#define | ACCELERO_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() |
#define | ACCELERO_CS_PIN GPIO_PIN_0 /* PE.00 */ |
#define | ACCELERO_XLINT_GPIO_PORT GPIOE /* GPIOE */ |
Accelerometer Interrupt pins. | |
#define | ACCELERO_XLINT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() |
#define | ACCELERO_XLINT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() |
#define | ACCELERO_XLINT_PIN GPIO_PIN_1 /* PE.01 */ |
#define | ACCELERO_XLINT_EXTI_IRQn EXTI1_IRQn |
#define | MAGNETO_CS_LOW() HAL_GPIO_WritePin(MAGNETO_CS_GPIO_PORT, MAGNETO_CS_PIN, GPIO_PIN_RESET) |
Magnetometer Chip Select macro definition. | |
#define | MAGNETO_CS_HIGH() HAL_GPIO_WritePin(MAGNETO_CS_GPIO_PORT, MAGNETO_CS_PIN, GPIO_PIN_SET) |
#define | MAGNETO_CS_GPIO_PORT GPIOC /* GPIOC */ |
Magnetometer SPI Interface pins. | |
#define | MAGNETO_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() |
#define | MAGNETO_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() |
#define | MAGNETO_CS_PIN GPIO_PIN_0 /* PC.00 */ |
#define | MAGNETO_INT_GPIO_PORT GPIOC /* GPIOC */ |
Magnetometer Interrupt pins. | |
#define | MAGNETO_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() |
#define | MAGNETO_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() |
#define | MAGNETO_INT1_PIN GPIO_PIN_1 /* PC.01 */ |
#define | MAGNETO_INT1_EXTI_IRQn EXTI1_IRQn |
#define | MAGNETO_DRDY_GPIO_PORT GPIOC /* GPIOC */ |
#define | MAGNETO_DRDY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() |
#define | MAGNETO_DRDY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() |
#define | MAGNETO_DRDY_PIN GPIO_PIN_2 /* PC.01 */ |
#define | CODEC_AUDIO_POWER_OFF() HAL_GPIO_WritePin(AUDIO_RESET_GPIO, AUDIO_RESET_PIN, GPIO_PIN_RESET) |
Audio codec chip reset definition. | |
#define | CODEC_AUDIO_POWER_ON() HAL_GPIO_WritePin(AUDIO_RESET_GPIO, AUDIO_RESET_PIN, GPIO_PIN_SET) |
#define | AUDIO_RESET_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() |
#define | AUDIO_RESET_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() |
#define | AUDIO_RESET_PIN GPIO_PIN_3 |
#define | AUDIO_RESET_GPIO GPIOE |
#define | GYRO_CS_LOW() HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_RESET) |
Gyroscope Chip Select macro definition. | |
#define | GYRO_CS_HIGH() HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_SET) |
#define | GYRO_CS_GPIO_PORT GPIOD /* GPIOD */ |
Gyroscope SPI Interface pins. | |
#define | GYRO_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() |
#define | GYRO_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() |
#define | GYRO_CS_PIN GPIO_PIN_7 /* PD.07 */ |
#define | GYRO_INT1_GPIO_PORT GPIOD /* GPIOD */ |
Gyroscope Interrupt pins. | |
#define | GYRO_INT1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() |
#define | GYRO_INT1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() |
#define | GYRO_INT1_PIN GPIO_PIN_2 /* PD.02 */ |
#define | GYRO_INT1_EXTI_IRQn EXTI2_IRQn |
#define | GYRO_INT2_GPIO_PORT GPIOB /* GPIOB */ |
#define | GYRO_INT2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
#define | GYRO_INT2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() |
#define | GYRO_INT2_PIN GPIO_PIN_8 /* PB.08 */ |
#define | GYRO_INT2_EXTI_IRQn EXTI9_5_IRQn |
#define | IDD_INT_GPIO_PORT GPIOC /* GPIOC */ |
Idd current measurement interface pins. | |
#define | IDD_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() |
#define | IDD_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() |
#define | IDD_INT_PIN GPIO_PIN_13 /* PC.13 */ |
#define | IDD_INT_EXTI_IRQn EXTI15_10_IRQn |
#define | IDD_WAKEUP_GPIO_PORT GPIOA /* GPIOA */ |
#define | IDD_WAKEUP_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() |
#define | IDD_WAKEUP_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() |
#define | IDD_WAKEUP_PIN GPIO_PIN_4 /* PA.04 */ |
Enumerations | |
enum | Led_TypeDef { LED4 = 0, LED5 = 1, LED_RED = LED4, LED_GREEN = LED5 } |
LED Types Definition. More... | |
enum | JOYState_TypeDef { JOY_SEL = 0, JOY_LEFT = 1, JOY_RIGHT = 2, JOY_DOWN = 3, JOY_UP = 4, JOY_NONE = 5 } |
JOYSTICK Types Definition. More... | |
enum | JOYMode_TypeDef { JOY_MODE_GPIO = 0, JOY_MODE_EXTI = 1 } |
enum | SupplyMode_TypeDef { SUPPLY_MODE_ERROR = 0, SUPPLY_MODE_EXTERNAL = 1, SUPPLY_MODE_BATTERY = 2 } |
Functions | |
uint32_t | BSP_GetVersion (void) |
This method returns the STM32L476 DISCOVERY BSP Driver revision. | |
SupplyMode_TypeDef | BSP_SupplyModeDetection (void) |
This method returns the STM32L476 DISCOVERY supply mode. | |
void | BSP_LED_Init (Led_TypeDef Led) |
Configures LED GPIOs. | |
void | BSP_LED_DeInit (Led_TypeDef Led) |
Unconfigures LED GPIOs. | |
void | BSP_LED_On (Led_TypeDef Led) |
Turns selected LED On. | |
void | BSP_LED_Off (Led_TypeDef Led) |
Turns selected LED Off. | |
void | BSP_LED_Toggle (Led_TypeDef Led) |
Toggles the selected LED. | |
uint8_t | BSP_JOY_Init (JOYMode_TypeDef Joy_Mode) |
Configures all buttons of the joystick in GPIO or EXTI modes. | |
void | BSP_JOY_DeInit (void) |
Unonfigures all GPIOs used as buttons of the joystick. | |
JOYState_TypeDef | BSP_JOY_GetState (void) |
Returns the current joystick status. |
Detailed Description
This file contains definitions for STM32L476G_DISCOVERY's LEDs, push-buttons hardware resources (MB1184).
- Attention:
© COPYRIGHT(c) 2015 STMicroelectronics
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32l476g_discovery.h.
Generated on Tue Jun 23 2015 17:15:45 for STM32L476G-Discovery BSP User Manual by 1.7.6.1