STM32L4R9I_EVAL BSP User Manual: stm32l4r9i_eval.c File Reference

STM32L4R9I_EVAL BSP

stm32l4r9i_eval.c File Reference

This file provides a set of firmware functions to manage Leds, push-button and COM ports for STM32L4R9I_EVAL. More...

Go to the source code of this file.

Defines

#define __STM32L4R9I_EVAL_BSP_VERSION_MAIN   (0x01)
 STM32L4R9I EVAL BSP Driver version number.
#define __STM32L4R9I_EVAL_BSP_VERSION_SUB1   (0x00)
#define __STM32L4R9I_EVAL_BSP_VERSION_SUB2   (0x00)
#define __STM32L4R9I_EVAL_BSP_VERSION_RC   (0x00)
#define __STM32L4R9I_EVAL_BSP_VERSION
#define BSP_I2C_NO_USER   0x00000000U
 BSP I2C users.
#define BSP_I2C_AUDIO_USER   0x00000001U
#define BSP_I2C_TS_USER   0x00000002U
#define BSP_I2C_MFX_USER   0x00000004U
#define BSP_I2C_EEPROM_USER   0x00000008U
#define BSP_I2C_ALL_USERS   0x0000000FU

Functions

static void I2Cx_Init (uint32_t user)
 Eval I2Cx Bus initialization.
static void I2Cx_MspInit (I2C_HandleTypeDef *hi2c)
 Eval I2Cx MSP Initialization.
static void I2Cx_DeInit (uint32_t user)
 Eval I2Cx Bus deinitialization.
static void I2Cx_MspDeInit (I2C_HandleTypeDef *hi2c)
 Eval I2Cx MSP Deinitialization.
static HAL_StatusTypeDef I2Cx_WriteBuffer (uint16_t Addr, uint16_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
 Write a value in a register of the device through BUS.
static HAL_StatusTypeDef I2Cx_ReadBuffer (uint16_t Addr, uint16_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
 Read multiple data on the BUS.
static HAL_StatusTypeDef I2Cx_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
 Checks if target device is ready for communication.
static void I2Cx_Error (void)
 Eval I2Cx error treatment function.
static void I2Cx_WriteData (uint16_t Addr, uint16_t Reg, uint16_t RegSize, uint8_t Value)
 Write a value in a register of the device through BUS.
static void I2Cx_WriteMultiple (uint16_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
 Write multiple data value in a register of the device through BUS.
static uint8_t I2Cx_ReadData (uint16_t Addr, uint16_t Reg, uint16_t RegSize)
 Read a register of the device through BUS.
static uint8_t I2Cx_ReadMultiple (uint16_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
 Read multiple data from a register of the device through BUS.
void MFX_IO_Init (void)
 Initialize MFX_IO low level.
void MFX_IO_DeInit (void)
 DeInitializes MFX_IO low level.
void MFX_IO_Wakeup (void)
 MFX_IO wakeup.
void MFX_IO_EnableWakeupPin (void)
 MFX_IO enable wakeup pin.
void MFX_IO_ITConfig (void)
 Configure MFX_IO low level Interrupt.
void MFX_IO_Delay (uint32_t Delay)
 MFX_IO delay.
void MFX_IO_Write (uint16_t Addr, uint8_t Reg, uint8_t Value)
 MFX_IO writes single data.
uint8_t MFX_IO_Read (uint16_t Addr, uint8_t Reg)
 MFX_IO reads single data.
uint16_t MFX_IO_ReadMultiple (uint16_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 MFX_IO reads multiple data.
void TS_IO_Init (void)
 Initializes Touchscreen low level.
void TS_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Writes a single data.
uint8_t TS_IO_Read (uint8_t Addr, uint8_t Reg)
 Reads a single data.
uint16_t TS_IO_ReadMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 Reads multiple data with I2C communication channel from TouchScreen.
void TS_IO_Delay (uint32_t Delay)
 TS delay.
void EEPROM_IO_Init (void)
 Initialize peripherals used by the I2C EEPROM driver.
HAL_StatusTypeDef EEPROM_IO_WriteData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Write data to I2C EEPROM driver.
HAL_StatusTypeDef EEPROM_IO_ReadData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Read data from I2C EEPROM driver.
HAL_StatusTypeDef EEPROM_IO_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
 Checks if target device is ready for communication.
void AUDIO_IO_Init (void)
 Initialize Audio low level.
void AUDIO_IO_DeInit (void)
 Deinitialize Audio low level.
void AUDIO_IO_Write (uint8_t Addr, uint16_t Reg, uint16_t Value)
 Writes a single data.
uint16_t AUDIO_IO_Read (uint8_t Addr, uint16_t Reg)
 Reads a single data.
void AUDIO_IO_Delay (uint32_t Delay)
 AUDIO Codec delay.
__weak void BSP_ErrorHandler (void)
 Error Handler.
uint32_t BSP_GetVersion (void)
 This method returns the STM32L4R9I EVAL BSP Driver revision.
void BSP_LED_Init (Led_TypeDef Led)
 Initialize LED GPIO.
void BSP_LED_DeInit (Led_TypeDef Led)
 DeInitialize LED GPIO.
void BSP_LED_On (Led_TypeDef Led)
 Turn selected LED On.
void BSP_LED_Off (Led_TypeDef Led)
 Turn selected LED Off.
void BSP_LED_Toggle (Led_TypeDef Led)
 Toggle the selected LED.
void BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
 Initialize push button GPIO and EXTI Line.
void BSP_PB_DeInit (Button_TypeDef Button)
 DeInitialize push button.
uint32_t BSP_PB_GetState (Button_TypeDef Button)
 Return the selected button state.
uint8_t BSP_JOY_Init (JOYMode_TypeDef JoyMode)
 Initialize all buttons of the joystick in GPIO or EXTI modes.
void BSP_JOY_DeInit (void)
 DeInitialize all buttons of the joystick.
JOYState_TypeDef BSP_JOY_GetState (void)
 Return the current joystick status.
void BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *huart)
 Initialize COM port.
void BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart)
 DeInitialize COM port.
uint32_t BSP_POTENTIOMETER_Init (void)
 Init the potentioneter RV2 measurement thanks to ADC.
uint32_t BSP_POTENTIOMETER_DeInit (void)
 DeInitialize the potentioneter RV2 measurement thanks to ADC.
uint32_t BSP_POTENTIOMETER_GetLevel (void)
 Get the potentioneter RV2 measurement thanks to ADC.

Variables

GPIO_TypeDef * LED_PORT [LEDn]
 LED variables.
const uint16_t LED_PIN [LEDn]
GPIO_TypeDef * BUTTON_PORT [BUTTONn]
 BUTTON variables.
const uint16_t BUTTON_PIN [BUTTONn]
const uint8_t BUTTON_IRQn [BUTTONn]
const uint16_t JOY_PIN [JOYn]
 JOYSTICK variables.
const uint8_t JOY_IRQn [JOYn]
USART_TypeDef * COM_USART [COMn] = {EVAL_COM1}
 COM variables.
GPIO_TypeDef * COM_TX_PORT [COMn] = {EVAL_COM1_TX_GPIO_PORT}
GPIO_TypeDef * COM_RX_PORT [COMn] = {EVAL_COM1_RX_GPIO_PORT}
const uint16_t COM_TX_PIN [COMn] = {EVAL_COM1_TX_PIN}
const uint16_t COM_RX_PIN [COMn] = {EVAL_COM1_RX_PIN}
const uint16_t COM_TX_AF [COMn] = {EVAL_COM1_TX_AF}
const uint16_t COM_RX_AF [COMn] = {EVAL_COM1_RX_AF}
uint32_t hi2c_evalTimeout = EVAL_I2Cx_TIMEOUT_MAX
 BUS variables.
I2C_HandleTypeDef hi2c_eval
static uint32_t v_bspI2cUsers = BSP_I2C_NO_USER
static ADC_HandleTypeDef hEvalADC = {0}

Detailed Description

This file provides a set of firmware functions to manage Leds, push-button and COM ports for STM32L4R9I_EVAL.

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_eval.c.

Generated on Thu Oct 12 2017 10:53:59 for STM32L4R9I_EVAL BSP User Manual by   doxygen 1.7.6.1