STM32L4R9I-Discovery BSP User Manual: Private Functions

STM32L4R9I-Discovery BSP

STM32L4R9I-Discovery BSP User Manual

Functions

static void I2C1_Init (uint32_t user)
 Discovery I2C1 Bus initialization.
static void I2C1_MspInit (I2C_HandleTypeDef *hi2c)
 Discovery I2C1 MSP Initialization.
void I2C1_DeInit (uint32_t user)
 Discovery I2C1 Bus Deinitialization.
static void I2C1_MspDeInit (I2C_HandleTypeDef *hi2c)
 Discovery I2C1 MSP DeInitialization.
static void I2C1_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 HAL_StatusTypeDef I2C1_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 uint8_t I2C1_ReadData (uint16_t Addr, uint16_t Reg, uint16_t RegSize)
 Read a register of the device through BUS.
static uint8_t I2C1_isDeviceReady (uint16_t Addr, uint32_t Trials)
 Checks if target device is ready for communication.
static HAL_StatusTypeDef I2C1_ReadBuffer (uint16_t Addr, uint16_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
 Reads multiple data on the BUS.
static void I2C1_Error (void)
 Discovery I2C1 error treatment function.
static HAL_StatusTypeDef I2C1_ReadMultiple (uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
 Reads multiple data.
static HAL_StatusTypeDef I2C1_WriteMultiple (uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
 Writes a value in a register of the device through BUS.
void MFX_IO_Init (void)
 Initializes MFX low level.
void MFX_IO_DeInit (void)
 Deinitializes MFX low level.
void MFX_IO_ITConfig (void)
 Configures MFX low level interrupt.
void MFX_IO_EnableWakeupPin (void)
 Configures MFX wke up pin.
void MFX_IO_Wakeup (void)
 Wakeup MFX.
void MFX_IO_Write (uint16_t Addr, uint8_t Reg, uint8_t Value)
 MFX writes single data.
uint8_t MFX_IO_Read (uint16_t Addr, uint8_t Reg)
 MFX reads single data.
uint16_t MFX_IO_ReadMultiple (uint16_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 MFX reads multiple data.
void MFX_IO_WriteMultiple (uint16_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 MFX writes multiple data.
void MFX_IO_Delay (uint32_t Delay)
 MFX delay.
void AUDIO_IO_Init (void)
 Initializes Audio low level.
void AUDIO_IO_DeInit (void)
 Deinitializes Audio low level.
void AUDIO_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Writes a single data.
uint8_t AUDIO_IO_Read (uint8_t Addr, uint8_t Reg)
 Reads a single data.
void AUDIO_IO_Delay (uint32_t Delay)
 AUDIO Codec delay.
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_WriteMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 Writes multiple data with I2C communication channel from MCU to TouchScreen.
void TS_IO_Delay (uint32_t Delay)
 Delay function used in TouchScreen low level driver.
void CAMERA_IO_Init (void)
 Initializes Camera low level.
void CAMERA_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Camera writes single data.
uint8_t CAMERA_IO_Read (uint8_t Addr, uint8_t Reg)
 Camera reads single data.
void CAMERA_Delay (uint32_t Delay)
 Camera delay.

Function Documentation

void AUDIO_IO_DeInit ( void  )

Deinitializes Audio low level.

Return values:
None

Definition at line 1140 of file stm32l4r9i_discovery.c.

References AUDIO_I2C_ADDRESS, AUDIO_IO_Read(), AUDIO_IO_Write(), BSP_I2C_AUDIO_USER, CODEC_AUDIO_POWER_OFF, and I2C1_DeInit().

void AUDIO_IO_Delay ( uint32_t  Delay)

AUDIO Codec delay.

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

Definition at line 1202 of file stm32l4r9i_discovery.c.

uint8_t AUDIO_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 1188 of file stm32l4r9i_discovery.c.

References I2C1_ReadBuffer().

Referenced by AUDIO_IO_DeInit(), and AUDIO_IO_Init().

void AUDIO_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 1177 of file stm32l4r9i_discovery.c.

References I2C1_WriteBuffer().

Referenced by AUDIO_IO_DeInit(), and AUDIO_IO_Init().

void CAMERA_Delay ( uint32_t  Delay)

Camera delay.

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

Definition at line 1325 of file stm32l4r9i_discovery.c.

void CAMERA_IO_Init ( void  )

Initializes Camera low level.

Return values:
None

Definition at line 1288 of file stm32l4r9i_discovery.c.

References BSP_I2C_CAMERA_USER, and I2C1_Init().

uint8_t CAMERA_IO_Read ( uint8_t  Addr,
uint8_t  Reg 
)

Camera reads single data.

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

Definition at line 1311 of file stm32l4r9i_discovery.c.

References I2C1_ReadMultiple().

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

Camera writes single data.

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

Definition at line 1300 of file stm32l4r9i_discovery.c.

References I2C1_WriteMultiple().

void I2C1_DeInit ( uint32_t  user)

Discovery I2C1 Bus Deinitialization.

Return values:
None

Definition at line 613 of file stm32l4r9i_discovery.c.

References BSP_I2C_NO_USER, I2C1_MspDeInit(), I2c1Handle, and v_bspI2cUsers.

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

static void I2C1_Error ( void  ) [static]

Discovery I2C1 error treatment function.

Return values:
None

Definition at line 839 of file stm32l4r9i_discovery.c.

References BSP_ErrorHandler(), BSP_I2C_ALL_USERS, I2C1_DeInit(), I2C1_Init(), and v_bspI2cUsers.

Referenced by I2C1_isDeviceReady(), I2C1_ReadBuffer(), I2C1_ReadData(), I2C1_ReadMultiple(), I2C1_WriteBuffer(), I2C1_WriteData(), and I2C1_WriteMultiple().

static void I2C1_Init ( uint32_t  user) [static]

Discovery I2C1 Bus initialization.

Return values:
None

Definition at line 529 of file stm32l4r9i_discovery.c.

References I2C1_MspInit(), I2c1Handle, and v_bspI2cUsers.

Referenced by AUDIO_IO_Init(), CAMERA_IO_Init(), I2C1_Error(), MFX_IO_Init(), and TS_IO_Init().

static uint8_t I2C1_isDeviceReady ( uint16_t  Addr,
uint32_t  Trials 
) [static]

Checks if target device is ready for communication.

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

Definition at line 774 of file stm32l4r9i_discovery.c.

References I2C1_Error(), and I2c1Handle.

Referenced by MFX_IO_Init().

static void I2C1_MspDeInit ( I2C_HandleTypeDef *  hi2c) [static]

Discovery I2C1 MSP DeInitialization.

Parameters:
hi2c,:I2C1 handle
Return values:
None

Definition at line 636 of file stm32l4r9i_discovery.c.

Referenced by I2C1_DeInit().

static void I2C1_MspInit ( I2C_HandleTypeDef *  hi2c) [static]

Discovery I2C1 MSP Initialization.

Parameters:
hi2c,:I2C1 handle
Return values:
None

Definition at line 561 of file stm32l4r9i_discovery.c.

Referenced by I2C1_Init().

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

Reads 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 809 of file stm32l4r9i_discovery.c.

References I2C1_Error(), I2c1Handle, and I2c1Timeout.

Referenced by AUDIO_IO_Read(), and MFX_IO_ReadMultiple().

static uint8_t I2C1_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 740 of file stm32l4r9i_discovery.c.

References I2C1_Error(), I2c1Handle, and I2c1Timeout.

Referenced by MFX_IO_Read(), and TS_IO_Read().

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

Reads multiple data.

Parameters:
Addr,:I2C address
Reg,:Reg address
MemAddress,:Memory address
Buffer,:Pointer to data buffer
Length,:Length of the data
Return values:
HALstatus

Definition at line 862 of file stm32l4r9i_discovery.c.

References I2C1_Error(), I2c1Handle, and I2c1Timeout.

Referenced by CAMERA_IO_Read(), and TS_IO_ReadMultiple().

static HAL_StatusTypeDef I2C1_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 707 of file stm32l4r9i_discovery.c.

References I2C1_Error(), I2c1Handle, and I2c1Timeout.

Referenced by AUDIO_IO_Write(), and MFX_IO_WriteMultiple().

static void I2C1_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 674 of file stm32l4r9i_discovery.c.

References I2C1_Error(), I2c1Handle, and I2c1Timeout.

Referenced by MFX_IO_Write().

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

Writes a 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:
HALstatus

Definition at line 900 of file stm32l4r9i_discovery.c.

References I2C1_Error(), I2c1Handle, and I2c1Timeout.

Referenced by CAMERA_IO_Write(), TS_IO_Write(), and TS_IO_WriteMultiple().

void MFX_IO_DeInit ( void  )
void MFX_IO_Delay ( uint32_t  Delay)

MFX delay.

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

Definition at line 1090 of file stm32l4r9i_discovery.c.

void MFX_IO_EnableWakeupPin ( void  )

Configures MFX wke up pin.

Return values:
None

Definition at line 1005 of file stm32l4r9i_discovery.c.

References MFX_WAKEUP_GPIO_CLK_ENABLE, MFX_WAKEUP_GPIO_PORT, and MFX_WAKEUP_PIN.

void MFX_IO_Init ( void  )

Initializes MFX low level.

Return values:
None

Definition at line 940 of file stm32l4r9i_discovery.c.

References BSP_ErrorHandler(), BSP_I2C_MFX_USER, I2C1_Init(), I2C1_isDeviceReady(), and IO_I2C_ADDRESS.

void MFX_IO_ITConfig ( void  )

Configures MFX low level interrupt.

Return values:
None

Definition at line 982 of file stm32l4r9i_discovery.c.

References MFX_INT_EXTI_IRQn, MFX_INT_GPIO_CLK_ENABLE, MFX_INT_GPIO_PORT, and MFX_INT_PIN.

Referenced by BSP_JOY_Init(), and BSP_TS_ITConfig().

uint8_t MFX_IO_Read ( uint16_t  Addr,
uint8_t  Reg 
)

MFX reads single data.

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

Definition at line 1054 of file stm32l4r9i_discovery.c.

References I2C1_ReadData().

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

MFX reads multiple data.

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 1067 of file stm32l4r9i_discovery.c.

References I2C1_ReadBuffer().

void MFX_IO_Wakeup ( void  )

Wakeup MFX.

Return values:
None

Definition at line 1024 of file stm32l4r9i_discovery.c.

References MFX_WAKEUP_GPIO_PORT, and MFX_WAKEUP_PIN.

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

MFX writes single data.

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

Definition at line 1043 of file stm32l4r9i_discovery.c.

References I2C1_WriteData().

Referenced by BSP_CAMERA_Init().

void MFX_IO_WriteMultiple ( uint16_t  Addr,
uint8_t  Reg,
uint8_t *  Buffer,
uint16_t  Length 
)

MFX writes multiple data.

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

Definition at line 1080 of file stm32l4r9i_discovery.c.

References I2C1_WriteBuffer().

void TS_IO_Delay ( uint32_t  Delay)

Delay function used in TouchScreen low level driver.

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

Definition at line 1277 of file stm32l4r9i_discovery.c.

void TS_IO_Init ( void  )

Initializes Touchscreen low level.

Return values:
None

Definition at line 1216 of file stm32l4r9i_discovery.c.

References BSP_I2C_TS_USER, and I2C1_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 1239 of file stm32l4r9i_discovery.c.

References I2C1_ReadData().

Referenced by BSP_TS_Init().

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 1253 of file stm32l4r9i_discovery.c.

References I2C1_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 1228 of file stm32l4r9i_discovery.c.

References I2C1_WriteMultiple().

void TS_IO_WriteMultiple ( uint8_t  Addr,
uint8_t  Reg,
uint8_t *  Buffer,
uint16_t  Length 
)

Writes multiple data with I2C communication channel from MCU to TouchScreen.

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

Definition at line 1267 of file stm32l4r9i_discovery.c.

References I2C1_WriteMultiple().

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