STM32L4R9I_EVAL BSP User Manual: Bus Operations Functions

STM32L4R9I_EVAL BSP

STM32L4R9I_EVAL BSP User Manual
Bus Operations Functions

Functions

static void I2Cx_MspInit (I2C_HandleTypeDef *hi2c)
 Eval I2Cx MSP Initialization.
static void I2Cx_Init (uint32_t user)
 Eval I2Cx Bus initialization.
static void I2Cx_MspDeInit (I2C_HandleTypeDef *hi2c)
 Eval I2Cx MSP Deinitialization.
static void I2Cx_DeInit (uint32_t user)
 Eval I2Cx Bus 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 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.
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.
void MFX_IO_Init (void)
 Initialize MFX_IO low level.
void MFX_IO_ITConfig (void)
 Configure MFX_IO low level Interrupt.
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 MFX_IO_Delay (uint32_t Delay)
 MFX_IO delay.
void MFX_IO_Wakeup (void)
 MFX_IO wakeup.
void MFX_IO_EnableWakeupPin (void)
 MFX_IO enable wakeup pin.
void MFX_IO_DeInit (void)
 DeInitializes MFX_IO low level.
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 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.
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.

Function Documentation

void AUDIO_IO_DeInit ( void  )

Deinitialize Audio low level.

Return values:
None

Definition at line 1308 of file stm32l4r9i_eval.c.

References BSP_I2C_AUDIO_USER, and I2Cx_DeInit().

void AUDIO_IO_Delay ( uint32_t  Delay)

AUDIO Codec delay.

Parameters:
Delay,:Delay in ms
Return values:
None

Definition at line 1355 of file stm32l4r9i_eval.c.

void AUDIO_IO_Init ( void  )

Initialize Audio low level.

Return values:
None

Definition at line 1299 of file stm32l4r9i_eval.c.

References BSP_I2C_AUDIO_USER, and I2Cx_Init().

uint16_t AUDIO_IO_Read ( uint8_t  Addr,
uint16_t  Reg 
)

Reads a single data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Return values:
Datato be read

Definition at line 1336 of file stm32l4r9i_eval.c.

References I2Cx_ReadBuffer().

void AUDIO_IO_Write ( uint8_t  Addr,
uint16_t  Reg,
uint16_t  Value 
)

Writes a single data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Value,:Data to be written
Return values:
None

Definition at line 1320 of file stm32l4r9i_eval.c.

References I2Cx_WriteBuffer().

void EEPROM_IO_Init ( void  )

Initialize peripherals used by the I2C EEPROM driver.

Return values:
None

Definition at line 1365 of file stm32l4r9i_eval.c.

References BSP_I2C_EEPROM_USER, and I2Cx_Init().

Referenced by BSP_EEPROM_Init().

HAL_StatusTypeDef EEPROM_IO_IsDeviceReady ( uint16_t  DevAddress,
uint32_t  Trials 
)

Checks if target device is ready for communication.

Note:
This function is used with Memory devices
Parameters:
DevAddress,:Target device address
Trials,:Number of trials
Return values:
HALstatus

Definition at line 1403 of file stm32l4r9i_eval.c.

References I2Cx_IsDeviceReady().

Referenced by BSP_EEPROM_Init(), and BSP_EEPROM_WaitEepromStandbyState().

HAL_StatusTypeDef EEPROM_IO_ReadData ( uint16_t  DevAddress,
uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Read data from I2C EEPROM driver.

Parameters:
DevAddress,:Target device address
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be read
Return values:
HALstatus

Definition at line 1391 of file stm32l4r9i_eval.c.

References I2Cx_ReadBuffer().

Referenced by BSP_EEPROM_ReadBuffer().

HAL_StatusTypeDef EEPROM_IO_WriteData ( uint16_t  DevAddress,
uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Write data to I2C EEPROM driver.

Parameters:
DevAddress,:Target device address
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be sent
Return values:
HALstatus

Definition at line 1378 of file stm32l4r9i_eval.c.

References I2Cx_WriteBuffer().

Referenced by BSP_EEPROM_WritePage().

static void I2Cx_DeInit ( uint32_t  user) [static]

Eval I2Cx Bus deinitialization.

Return values:
None

Definition at line 820 of file stm32l4r9i_eval.c.

References BSP_I2C_NO_USER, and I2Cx_MspDeInit().

Referenced by AUDIO_IO_DeInit(), I2Cx_Error(), and MFX_IO_DeInit().

static void I2Cx_Error ( void  ) [static]

Eval I2Cx error treatment function.

Return values:
None

Definition at line 1072 of file stm32l4r9i_eval.c.

References BSP_ErrorHandler(), BSP_I2C_ALL_USERS, I2Cx_DeInit(), I2Cx_Init(), and v_bspI2cUsers.

Referenced by I2Cx_ReadBuffer(), I2Cx_ReadData(), I2Cx_ReadMultiple(), I2Cx_WriteBuffer(), I2Cx_WriteData(), and I2Cx_WriteMultiple().

static void I2Cx_Init ( uint32_t  user) [static]

Eval I2Cx Bus initialization.

Return values:
None

Definition at line 779 of file stm32l4r9i_eval.c.

References EVAL_I2Cx, and I2Cx_MspInit().

Referenced by AUDIO_IO_Init(), EEPROM_IO_Init(), I2Cx_Error(), MFX_IO_Init(), and TS_IO_Init().

static HAL_StatusTypeDef I2Cx_IsDeviceReady ( uint16_t  DevAddress,
uint32_t  Trials 
) [static]

Checks if target device is ready for communication.

Note:
This function is used with Memory devices
Parameters:
DevAddress,:Target device address
Trials,:Number of trials
Return values:
HALstatus

Definition at line 1048 of file stm32l4r9i_eval.c.

Referenced by EEPROM_IO_IsDeviceReady().

static void I2Cx_MspDeInit ( I2C_HandleTypeDef *  hi2c) [static]

Eval I2Cx MSP Deinitialization.

Parameters:
hi2c,:I2C handle
Return values:
None

Definition at line 812 of file stm32l4r9i_eval.c.

Referenced by I2Cx_DeInit().

static void I2Cx_MspInit ( I2C_HandleTypeDef *  hi2c) [static]
static HAL_StatusTypeDef I2Cx_ReadBuffer ( uint16_t  Addr,
uint16_t  Reg,
uint16_t  RegSize,
uint8_t *  pBuffer,
uint16_t  Length 
) [static]

Read multiple data on the BUS.

Parameters:
Addr,:I2C Address
Reg,:Reg Address
RegSize: The target register size (can be 8BIT or 16BIT)
pBuffer,:pointer to read data buffer
Length,:length of the data
Return values:
0if no problems to read multiple data

Definition at line 1016 of file stm32l4r9i_eval.c.

References I2Cx_Error().

Referenced by AUDIO_IO_Read(), EEPROM_IO_ReadData(), and MFX_IO_ReadMultiple().

static uint8_t I2Cx_ReadData ( uint16_t  Addr,
uint16_t  Reg,
uint16_t  RegSize 
) [static]

Read a register of the device through BUS.

Parameters:
Addr,:Device address on BUS
Reg,:The target register address to read
RegSize,:The target register size (can be 8BIT or 16BIT)
Return values:
readregister value

Definition at line 944 of file stm32l4r9i_eval.c.

References I2Cx_Error().

Referenced by MFX_IO_Read().

static uint8_t I2Cx_ReadMultiple ( uint16_t  Addr,
uint16_t  Reg,
uint16_t  MemAddress,
uint8_t *  Buffer,
uint16_t  Length 
) [static]

Read multiple data from a register of the device through BUS.

Parameters:
Addr,:Device address on BUS
Reg,:The target register address to read
MemAddress,:Memory address
Buffer,:Pointer to data buffer
Length,:Length of the data
Return values:
Numberof read data

Definition at line 980 of file stm32l4r9i_eval.c.

References I2Cx_Error().

Referenced by TS_IO_Read(), and TS_IO_ReadMultiple().

static HAL_StatusTypeDef I2Cx_WriteBuffer ( uint16_t  Addr,
uint16_t  Reg,
uint16_t  RegSize,
uint8_t *  pBuffer,
uint16_t  Length 
) [static]

Write a value in a register of the device through BUS.

Parameters:
Addr,:Device address on BUS Bus.
Reg,:The target register address to write
RegSize,:The target register size (can be 8BIT or 16BIT)
pBuffer,:The target register value to be written
Length,:buffer size to be written
Return values:
None

Definition at line 847 of file stm32l4r9i_eval.c.

References I2Cx_Error().

Referenced by AUDIO_IO_Write(), and EEPROM_IO_WriteData().

static void I2Cx_WriteData ( uint16_t  Addr,
uint16_t  Reg,
uint16_t  RegSize,
uint8_t  Value 
) [static]

Write a value in a register of the device through BUS.

Parameters:
Addr,:Device address on BUS Bus.
Reg,:The target register address to write
RegSize,:The target register size (can be 8BIT or 16BIT)
Value,:The target register value to be written
Return values:
None

Definition at line 880 of file stm32l4r9i_eval.c.

References I2Cx_Error().

Referenced by MFX_IO_Write().

static void I2Cx_WriteMultiple ( uint16_t  Addr,
uint16_t  Reg,
uint16_t  MemAddress,
uint8_t *  Buffer,
uint16_t  Length 
) [static]

Write multiple data value in a register of the device through BUS.

Parameters:
Addr,:Device address on BUS Bus.
Reg,:The target register address to write
MemAddress,:Memory address
Buffer,:The target register value to be written
Length,:buffer size to be written
Return values:
None

Definition at line 913 of file stm32l4r9i_eval.c.

References I2Cx_Error().

Referenced by TS_IO_Write().

void MFX_IO_DeInit ( void  )
void MFX_IO_Delay ( uint32_t  Delay)

MFX_IO delay.

Parameters:
Delay,:Delay in ms
Return values:
None

Definition at line 1164 of file stm32l4r9i_eval.c.

void MFX_IO_EnableWakeupPin ( void  )

MFX_IO enable wakeup pin.

Return values:
None

Definition at line 1189 of file stm32l4r9i_eval.c.

References MFX_WAKEUP_GPIO_CLK_ENABLE, MFX_WAKEUP_GPIO_PORT, and MFX_WAKEUP_PIN.

void MFX_IO_Init ( void  )

Initialize MFX_IO low level.

Return values:
None

Definition at line 1096 of file stm32l4r9i_eval.c.

References BSP_I2C_MFX_USER, and I2Cx_Init().

Referenced by BSP_IO_Init().

void MFX_IO_ITConfig ( void  )

Configure MFX_IO low level Interrupt.

Return values:
None

Definition at line 1105 of file stm32l4r9i_eval.c.

References MFX_INT_EXTI_IRQn, MFX_INT_GPIO_CLK_ENABLE, MFX_INT_GPIO_PORT, and MFX_INT_PIN.

Referenced by BSP_JOY_Init().

uint8_t MFX_IO_Read ( uint16_t  Addr,
uint8_t  Reg 
)

MFX_IO reads single data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Return values:
Readdata

Definition at line 1142 of file stm32l4r9i_eval.c.

References I2Cx_ReadData().

uint16_t MFX_IO_ReadMultiple ( uint16_t  Addr,
uint8_t  Reg,
uint8_t *  Buffer,
uint16_t  Length 
)

MFX_IO reads multiple data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Buffer,:Pointer to data buffer
Length,:Length of the data

Definition at line 1154 of file stm32l4r9i_eval.c.

References I2Cx_ReadBuffer().

void MFX_IO_Wakeup ( void  )

MFX_IO wakeup.

Return values:
None

Definition at line 1173 of file stm32l4r9i_eval.c.

References MFX_WAKEUP_GPIO_PORT, and MFX_WAKEUP_PIN.

void MFX_IO_Write ( uint16_t  Addr,
uint8_t  Reg,
uint8_t  Value 
)

MFX_IO writes single data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Value,:Data to be written
Return values:
None

Definition at line 1131 of file stm32l4r9i_eval.c.

References I2Cx_WriteData().

void TS_IO_Delay ( uint32_t  Delay)

TS delay.

Parameters:
Delay,:Delay in ms
Return values:
None

Definition at line 1287 of file stm32l4r9i_eval.c.

void TS_IO_Init ( void  )

Initializes Touchscreen low level.

Return values:
None

Definition at line 1236 of file stm32l4r9i_eval.c.

References BSP_I2C_TS_USER, and I2Cx_Init().

uint8_t TS_IO_Read ( uint8_t  Addr,
uint8_t  Reg 
)

Reads a single data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Return values:
Datato be read

Definition at line 1259 of file stm32l4r9i_eval.c.

References I2Cx_ReadMultiple().

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.

Parameters:
Addr,:I2C address
Reg,:Register address
Buffer,:Pointer to data buffer
Length,:Length of the data
Return values:
Numberof read data

Definition at line 1277 of file stm32l4r9i_eval.c.

References I2Cx_ReadMultiple().

void TS_IO_Write ( uint8_t  Addr,
uint8_t  Reg,
uint8_t  Value 
)

Writes a single data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Value,:Data to be written
Return values:
None

Definition at line 1248 of file stm32l4r9i_eval.c.

References I2Cx_WriteMultiple().

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