STM32L4R9I-Discovery BSP User Manual: stm32l4r9i_discovery.h File Reference

STM32L4R9I-Discovery BSP

stm32l4r9i_discovery.h File Reference

This file contains definitions for STM32L4R9I_DISCOVERY's LEDs, push-buttons hardware resources (MB1311). More...

#include "stm32l4xx_hal.h"

Go to the source code of this file.

Defines

#define LEDn   2
#define LED1_PIN   IO_PIN_0
#define LED2_PIN   GPIO_PIN_4
#define LED2_GPIO_PORT   GPIOH
#define LED2_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOH_CLK_ENABLE()
#define LED2_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOH_CLK_DISABLE()
#define JOYn   5
#define RIGHT_JOY_PIN   IO_PIN_3
 Joystick Right push-button.
#define RIGHT_JOY_EXTI_IRQn   EXTI1_IRQn
#define LEFT_JOY_PIN   IO_PIN_4
 Joystick Left push-button.
#define LEFT_JOY_EXTI_IRQn   EXTI1_IRQn
#define UP_JOY_PIN   IO_PIN_1
 Joystick Up push-button.
#define UP_JOY_EXTI_IRQn   EXTI1_IRQn
#define DOWN_JOY_PIN   IO_PIN_2
 Joystick Down push-button.
#define DOWN_JOY_EXTI_IRQn   EXTI1_IRQn
#define SEL_JOY_PIN   GPIO_PIN_13 /* PC.13 */
 Joystick Sel push-button.
#define SEL_JOY_GPIO_PORT   GPIOC
#define SEL_JOY_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOC_CLK_ENABLE()
#define SEL_JOY_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOC_CLK_DISABLE()
#define SEL_JOY_EXTI_IRQn   EXTI15_10_IRQn
#define DSI_RST_PIN   IO_PIN_10
 Pins definition connected to MFX.
#define EXT_RST_PIN   IO_PIN_11
#define OTG_FS_POWER_SWITCH_PIN   IO_PIN_13
#define OTG_FS_OVER_CURRENT_PIN   IO_PIN_14
#define SD_DETECT_PIN   IO_PIN_5
#define COMn   1
#define DISCOVERY_COM1   USART2
 Definition for COM port1, connected to USART2 (ST-Link USB Virtual Com Port)
#define DISCOVERY_COM1_CLK_ENABLE()   __HAL_RCC_USART2_CLK_ENABLE()
#define DISCOVERY_COM1_CLK_DISABLE()   __HAL_RCC_USART2_CLK_DISABLE()
#define DISCOVERY_COM1_TX_PIN   GPIO_PIN_2
#define DISCOVERY_COM1_TX_GPIO_PORT   GPIOA
#define DISCOVERY_COM1_TX_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOA_CLK_ENABLE()
#define DISCOVERY_COM1_TX_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOA_CLK_DISABLE()
#define DISCOVERY_COM1_TX_AF   GPIO_AF7_USART2
#define DISCOVERY_COM1_RX_PIN   GPIO_PIN_3
#define DISCOVERY_COM1_RX_GPIO_PORT   GPIOA
#define DISCOVERY_COM1_RX_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOA_CLK_ENABLE()
#define DISCOVERY_COM1_RX_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOA_CLK_DISABLE()
#define DISCOVERY_COM1_RX_AF   GPIO_AF7_USART2
#define DISCOVERY_COM1_IRQn   USART2_IRQn
#define DISCOVERY_COMx_CLK_ENABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_ENABLE();}} while(0)
#define DISCOVERY_COMx_CLK_DISABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_DISABLE();}} while(0)
#define DISCOVERY_COMx_TX_GPIO_CLK_ENABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_ENABLE();}} while(0)
#define DISCOVERY_COMx_TX_GPIO_CLK_DISABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_DISABLE();}} while(0)
#define DISCOVERY_COMx_RX_GPIO_CLK_ENABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_ENABLE();}} while(0)
#define DISCOVERY_COMx_RX_GPIO_CLK_DISABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_DISABLE();}} while(0)
#define DISCOVERY_I2C1_TIMEOUT_MAX   3000
#define IDD_I2C_ADDRESS   ((uint16_t) 0x84)
#define IO_I2C_ADDRESS   ((uint16_t) 0x84)
#define AUDIO_I2C_ADDRESS   ((uint16_t) 0x94)
#define TS_I2C_ADDRESS   ((uint16_t) 0x70)
#define CAMERA_I2C_ADDRESS   ((uint16_t) 0x60)
#define CODEC_AUDIO_POWER_OFF()   BSP_IO_WritePin(AUDIO_RESET_PIN, GPIO_PIN_RESET)
 Audio codec chip reset definition.
#define CODEC_AUDIO_POWER_ON()   BSP_IO_WritePin(AUDIO_RESET_PIN, GPIO_PIN_SET)
#define AUDIO_RESET_PIN   IO_PIN_15
#define MFX_INT_GPIO_PORT   GPIOI
 MFX interface pins.
#define MFX_INT_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOI_CLK_ENABLE()
#define MFX_INT_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOI_CLK_DISABLE()
#define MFX_INT_PIN   GPIO_PIN_1 /* PI.01 */
#define MFX_INT_EXTI_IRQn   EXTI1_IRQn
#define MFX_WAKEUP_GPIO_PORT   GPIOB
#define MFX_WAKEUP_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOB_CLK_ENABLE()
#define MFX_WAKEUP_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOB_CLK_DISABLE()
#define MFX_WAKEUP_PIN   GPIO_PIN_2 /* PB.02 */
#define IDD_INT_GPIO_PORT   MFX_INT_GPIO_PORT
#define IDD_INT_GPIO_CLK_ENABLE()   MFX_INT_GPIO_CLK_ENABLE()
#define IDD_INT_GPIO_CLK_DISABLE()   MFX_INT_GPIO_CLK_DISABLE()
#define IDD_INT_PIN   MFX_INT_PIN
#define IDD_INT_EXTI_IRQn   MFX_INT_EXTI_IRQn
#define IDD_WAKEUP_GPIO_PORT   MFX_WAKEUP_GPIO_PORT
#define IDD_WAKEUP_GPIO_CLK_ENABLE()   MFX_WAKEUP_GPIO_CLK_ENABLE()
#define IDD_WAKEUP_GPIO_CLK_DISABLE()   MFX_WAKEUP_GPIO_CLK_DISABLE()
#define IDD_WAKEUP_PIN   MFX_WAKEUP_PIN
#define IDD_AMP_CONTROL_PIN   AGPIO_PIN_1
 Idd current measurement interface pins on MFX.
#define LCD_TE_PIN   GPIO_PIN_11
 LCD pins.
#define LCD_TE_CTRL_GPIO_PORT   GPIOF
#define LCD_TE_CTRL_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOF_CLK_ENABLE()
#define LCD_TE_CTRL_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOF_CLK_DISABLE()
#define LCD_BL_CTRL_PIN   GPIO_PIN_1
#define LCD_BL_CTRL_GPIO_PORT   GPIOB
#define LCD_BL_CTRL_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOB_CLK_ENABLE()
#define LCD_BL_CTRL_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOB_CLK_DISABLE()
#define TS_INT_PIN   IO_PIN_9
#define TS_INT_EXTI_IRQn   EXTI1_IRQn

Enumerations

enum  Led_TypeDef { LED1 = 0, LED2 = 1, LED_ORANGE = LED1, LED_GREEN = LED2 }
 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  COM_TypeDef { COM1 = 0 }
 COM Type Definition. More...

Functions

uint32_t BSP_GetVersion (void)
 This method returns the STM32L4R9I DISCOVERY BSP Driver revision.
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.
void BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *huart)
 Configures COM port.
void BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart)
 DeInit COM port.
__weak void BSP_ErrorHandler (void)
 Error Handler.

Detailed Description

This file contains definitions for STM32L4R9I_DISCOVERY's LEDs, push-buttons hardware resources (MB1311).

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 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 stm32l4r9i_discovery.h.

Generated on Fri Oct 13 2017 02:37:42 for STM32L4R9I-Discovery BSP User Manual by   doxygen 1.7.6.1