STM32L476G-Discovery BSP User Manual
|
Functions | |
static void | SPIx_Init (void) |
SPIx Bus initialization. | |
static void | SPIx_MspInit (SPI_HandleTypeDef *hspi) |
SPI MSP Init. | |
static void | SPIx_DeInit (void) |
SPIx Bus Deinitialization. | |
static void | SPIx_MspDeInit (void) |
SPI MSP DeInit. | |
static uint8_t | SPIx_WriteRead (uint8_t Byte) |
Sends a Byte through the SPI interface and return the Byte received from the SPI bus. | |
static void | SPIx_Write (uint8_t Byte) |
Sends a Byte through the SPI interface. | |
static uint8_t | SPIx_Read (void) |
Receives a Byte from the SPI bus. | |
static void | I2C1_Init (void) |
Discovery I2C1 Bus initialization. | |
static void | I2C1_MspInit (I2C_HandleTypeDef *hi2c) |
Discovery I2C1 MSP Initialization. | |
static void | I2C1_DeInit (void) |
Discovery I2C1 Bus Deitialization. | |
static void | I2C1_MspDeInit (I2C_HandleTypeDef *hi2c) |
Discovery I2C1 MSP Deinitialization. | |
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 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 void | I2C2_Init (void) |
Discovery I2C2 Bus initialization. | |
static void | I2C2_MspInit (I2C_HandleTypeDef *hi2c) |
Discovery I2C2 MSP Initialization. | |
static void | I2C2_DeInit (void) |
Discovery I2C2 Bus Deinitialization. | |
static void | I2C2_MspDeInit (I2C_HandleTypeDef *hi2c) |
Discovery I2C2 MSP DeInitialization. | |
static void | I2C2_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 | I2C2_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 | I2C2_ReadData (uint16_t Addr, uint16_t Reg, uint16_t RegSize) |
Read a register of the device through BUS. | |
static HAL_StatusTypeDef | I2C2_ReadBuffer (uint16_t Addr, uint16_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length) |
Reads multiple data on the BUS. | |
static void | I2C2_Error (void) |
Discovery I2C2 error treatment function. | |
void | ACCELERO_IO_Init (void) |
Configures COMPASS/ACCELEROMETER io interface. | |
void | ACCELERO_IO_DeInit (void) |
De-Configures COMPASS/ACCELEROMETER io interface. | |
void | ACCELERO_IO_ITConfig (void) |
Configures COMPASS / ACCELERO click IT. | |
void | ACCELERO_IO_Write (uint8_t RegisterAddr, uint8_t Value) |
Writes one byte to the COMPASS / ACCELEROMETER. | |
uint8_t | ACCELERO_IO_Read (uint8_t RegisterAddr) |
Reads a block of data from the COMPASS / ACCELEROMETER. | |
void | MAGNETO_IO_Init (void) |
Configures COMPASS/MAGNETO SPI interface. | |
void | MAGNETO_IO_DeInit (void) |
de-Configures COMPASS/MAGNETO SPI interface. | |
void | MAGNETO_IO_Write (uint8_t RegisterAddr, uint8_t Value) |
Writes one byte to the COMPASS/MAGNETO. | |
uint8_t | MAGNETO_IO_Read (uint8_t RegisterAddr) |
Reads a block of data from the COMPASS/MAGNETO. | |
void | GYRO_IO_Init (void) |
Configures the GYRO SPI interface. | |
void | GYRO_IO_DeInit (void) |
de-Configures GYRO SPI interface. | |
void | GYRO_IO_Write (uint8_t *pBuffer, uint8_t WriteAddr, uint16_t NumByteToWrite) |
Writes one byte to the GYRO. | |
void | GYRO_IO_Read (uint8_t *pBuffer, uint8_t ReadAddr, uint16_t NumByteToRead) |
Reads a block of data from the GYROSCOPE. | |
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. |
Function Documentation
void ACCELERO_IO_DeInit | ( | void | ) |
De-Configures COMPASS/ACCELEROMETER io interface.
- Return values:
-
None
Definition at line 1188 of file stm32l476g_discovery.c.
References ACCELERO_CS_GPIO_CLK_ENABLE, ACCELERO_CS_GPIO_PORT, ACCELERO_CS_HIGH, ACCELERO_CS_PIN, and SPIx_DeInit().
Referenced by BSP_COMPASS_DeInit().
void ACCELERO_IO_Init | ( | void | ) |
Configures COMPASS/ACCELEROMETER io interface.
- Return values:
-
None
Definition at line 1166 of file stm32l476g_discovery.c.
References ACCELERO_CS_GPIO_CLK_ENABLE, ACCELERO_CS_GPIO_PORT, ACCELERO_CS_HIGH, ACCELERO_CS_PIN, and SPIx_Init().
void ACCELERO_IO_ITConfig | ( | void | ) |
Configures COMPASS / ACCELERO click IT.
- Return values:
-
None
Definition at line 1211 of file stm32l476g_discovery.c.
uint8_t ACCELERO_IO_Read | ( | uint8_t | RegisterAddr | ) |
Reads a block of data from the COMPASS / ACCELEROMETER.
- Parameters:
-
RegisterAddr : specifies the COMPASS / ACCELEROMETER internal address register to read from
- Return values:
-
ACCELEROMETER register value
Definition at line 1236 of file stm32l476g_discovery.c.
References __SPI_DIRECTION_1LINE_RX, __SPI_DIRECTION_1LINE_TX, ACCELERO_CS_HIGH, ACCELERO_CS_LOW, SpiHandle, SPIx_Read(), and SPIx_Write().
void ACCELERO_IO_Write | ( | uint8_t | RegisterAddr, |
uint8_t | Value | ||
) |
Writes one byte to the COMPASS / ACCELEROMETER.
- Parameters:
-
RegisterAddr specifies the COMPASS / ACCELEROMETER register to be written. Value : Data to be written
- Return values:
-
None
Definition at line 1221 of file stm32l476g_discovery.c.
References __SPI_DIRECTION_1LINE_TX, ACCELERO_CS_HIGH, ACCELERO_CS_LOW, SpiHandle, and SPIx_Write().
void AUDIO_IO_DeInit | ( | void | ) |
Deinitializes Audio low level.
- Return values:
-
None
Definition at line 1692 of file stm32l476g_discovery.c.
References I2C1_DeInit().
void AUDIO_IO_Delay | ( | uint32_t | Delay | ) |
AUDIO Codec delay.
- Parameters:
-
Delay,: Delay in ms
- Return values:
-
None
Definition at line 1748 of file stm32l476g_discovery.c.
void AUDIO_IO_Init | ( | void | ) |
Initializes Audio low level.
- Return values:
-
None
Definition at line 1658 of file stm32l476g_discovery.c.
References AUDIO_RESET_GPIO, AUDIO_RESET_GPIO_CLK_ENABLE, AUDIO_RESET_PIN, CODEC_AUDIO_POWER_OFF, CODEC_AUDIO_POWER_ON, and I2C1_Init().
uint8_t AUDIO_IO_Read | ( | uint8_t | Addr, |
uint8_t | Reg | ||
) |
Reads a single data.
- Parameters:
-
Addr,: I2C address Reg,: Reg address
- Return values:
-
Data to be read
Definition at line 1734 of file stm32l476g_discovery.c.
References I2C1_ReadBuffer().
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 1723 of file stm32l476g_discovery.c.
References I2C1_WriteBuffer().
void GYRO_IO_DeInit | ( | void | ) |
de-Configures GYRO SPI interface.
- Return values:
-
None
Definition at line 1398 of file stm32l476g_discovery.c.
References GYRO_CS_GPIO_CLK_ENABLE, GYRO_CS_GPIO_PORT, GYRO_CS_HIGH, GYRO_CS_PIN, GYRO_INT1_GPIO_CLK_ENABLE, GYRO_INT1_GPIO_PORT, GYRO_INT1_PIN, GYRO_INT2_GPIO_CLK_ENABLE, GYRO_INT2_GPIO_PORT, GYRO_INT2_PIN, and SPIx_DeInit().
Referenced by BSP_GYRO_DeInit().
void GYRO_IO_Init | ( | void | ) |
Configures the GYRO SPI interface.
- Return values:
-
None
Definition at line 1334 of file stm32l476g_discovery.c.
References ACCELERO_CS_GPIO_CLK_ENABLE, ACCELERO_CS_GPIO_PORT, ACCELERO_CS_HIGH, ACCELERO_CS_PIN, GYRO_CS_GPIO_CLK_ENABLE, GYRO_CS_GPIO_PORT, GYRO_CS_HIGH, GYRO_CS_PIN, GYRO_INT1_GPIO_CLK_ENABLE, GYRO_INT1_GPIO_PORT, GYRO_INT1_PIN, GYRO_INT2_GPIO_CLK_ENABLE, GYRO_INT2_GPIO_PORT, GYRO_INT2_PIN, MAGNETO_CS_GPIO_CLK_ENABLE, MAGNETO_CS_GPIO_PORT, MAGNETO_CS_HIGH, MAGNETO_CS_PIN, and SPIx_Init().
void GYRO_IO_Read | ( | uint8_t * | pBuffer, |
uint8_t | ReadAddr, | ||
uint16_t | NumByteToRead | ||
) |
Reads a block of data from the GYROSCOPE.
- Parameters:
-
pBuffer : pointer to the buffer that receives the data read from the GYROSCOPE. ReadAddr : GYROSCOPE's internal address to read from. NumByteToRead : number of bytes to read from the GYROSCOPE.
- Return values:
-
None
Definition at line 1467 of file stm32l476g_discovery.c.
References __SPI_DIRECTION_2LINES, GYRO_CS_HIGH, GYRO_CS_LOW, MULTIPLEBYTE_CMD, READWRITE_CMD, SpiHandle, and SPIx_WriteRead().
void GYRO_IO_Write | ( | uint8_t * | pBuffer, |
uint8_t | WriteAddr, | ||
uint16_t | NumByteToWrite | ||
) |
Writes one byte to the GYRO.
- Parameters:
-
pBuffer : pointer to the buffer containing the data to be written to the GYRO. WriteAddr : GYRO's internal address to write to. NumByteToWrite,: Number of bytes to write.
- Return values:
-
None
Definition at line 1431 of file stm32l476g_discovery.c.
References __SPI_DIRECTION_2LINES, GYRO_CS_HIGH, GYRO_CS_LOW, MULTIPLEBYTE_CMD, SpiHandle, and SPIx_WriteRead().
static void I2C1_DeInit | ( | void | ) | [static] |
Discovery I2C1 Bus Deitialization.
- Return values:
-
None
Definition at line 825 of file stm32l476g_discovery.c.
References I2C1_MspDeInit(), and I2c1Handle.
Referenced by AUDIO_IO_DeInit().
static void I2C1_Error | ( | void | ) | [static] |
Discovery I2C1 error treatment function.
- Return values:
-
None
Definition at line 921 of file stm32l476g_discovery.c.
References I2C1_Init(), and I2c1Handle.
Referenced by I2C1_ReadBuffer(), and I2C1_WriteBuffer().
static void I2C1_Init | ( | void | ) | [static] |
Discovery I2C1 Bus initialization.
- Return values:
-
None
Definition at line 750 of file stm32l476g_discovery.c.
References DISCOVERY_I2C1, I2C1_MspInit(), and I2c1Handle.
Referenced by AUDIO_IO_Init(), and I2C1_Error().
static void I2C1_MspDeInit | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Discovery I2C1 MSP Deinitialization.
- Parameters:
-
hi2c,: I2C handle
- Return values:
-
None
Definition at line 840 of file stm32l476g_discovery.c.
References DISCOVERY_I2C1, DISCOVERY_I2C1_CLK_DISABLE, DISCOVERY_I2C1_ER_IRQn, DISCOVERY_I2C1_EV_IRQn, DISCOVERY_I2C1_FORCE_RESET, DISCOVERY_I2C1_RELEASE_RESET, DISCOVERY_I2C1_SCL_GPIO_CLK_ENABLE, DISCOVERY_I2C1_SCL_GPIO_PORT, DISCOVERY_I2C1_SCL_PIN, DISCOVERY_I2C1_SDA_GPIO_CLK_ENABLE, and DISCOVERY_I2C1_SDA_PIN.
Referenced by I2C1_DeInit().
static void I2C1_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Discovery I2C1 MSP Initialization.
- Parameters:
-
hi2c,: I2C handle
- Return values:
-
None
Definition at line 774 of file stm32l476g_discovery.c.
References DISCOVERY_I2C1, DISCOVERY_I2C1_CLK_ENABLE, DISCOVERY_I2C1_ER_IRQn, DISCOVERY_I2C1_EV_IRQn, DISCOVERY_I2C1_FORCE_RESET, DISCOVERY_I2C1_RELEASE_RESET, DISCOVERY_I2C1_SCL_GPIO_CLK_ENABLE, DISCOVERY_I2C1_SCL_GPIO_PORT, DISCOVERY_I2C1_SCL_PIN, DISCOVERY_I2C1_SCL_SDA_AF, DISCOVERY_I2C1_SDA_GPIO_CLK_ENABLE, and DISCOVERY_I2C1_SDA_PIN.
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:
-
0 if no problems to read multiple data
Definition at line 902 of file stm32l476g_discovery.c.
References I2C1_Error(), I2c1Handle, and I2c1Timeout.
Referenced by AUDIO_IO_Read().
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 878 of file stm32l476g_discovery.c.
References I2C1_Error(), I2c1Handle, and I2c1Timeout.
Referenced by AUDIO_IO_Write().
static void I2C2_DeInit | ( | void | ) | [static] |
Discovery I2C2 Bus Deinitialization.
- Return values:
-
None
Definition at line 1005 of file stm32l476g_discovery.c.
References I2C2_MspDeInit(), and I2c2Handle.
Referenced by MFX_IO_DeInit().
static void I2C2_Error | ( | void | ) | [static] |
Discovery I2C2 error treatment function.
- Return values:
-
None
Definition at line 1146 of file stm32l476g_discovery.c.
References I2C2_Init(), and I2c2Handle.
Referenced by I2C2_ReadBuffer(), I2C2_ReadData(), I2C2_WriteBuffer(), and I2C2_WriteData().
static void I2C2_Init | ( | void | ) | [static] |
Discovery I2C2 Bus initialization.
- Return values:
-
None
Definition at line 934 of file stm32l476g_discovery.c.
References DISCOVERY_I2C2, I2C2_MspInit(), and I2c2Handle.
Referenced by I2C2_Error(), and MFX_IO_Init().
static void I2C2_MspDeInit | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Discovery I2C2 MSP DeInitialization.
- Parameters:
-
hi2c,: I2C2 handle
- Return values:
-
None
Definition at line 1020 of file stm32l476g_discovery.c.
References DISCOVERY_I2C2, DISCOVERY_I2C2_CLK_DISABLE, DISCOVERY_I2C2_ER_IRQn, DISCOVERY_I2C2_EV_IRQn, DISCOVERY_I2C2_FORCE_RESET, DISCOVERY_I2C2_RELEASE_RESET, DISCOVERY_I2C2_SCL_GPIO_CLK_ENABLE, DISCOVERY_I2C2_SCL_GPIO_PORT, DISCOVERY_I2C2_SCL_PIN, DISCOVERY_I2C2_SDA_GPIO_CLK_ENABLE, and DISCOVERY_I2C2_SDA_PIN.
Referenced by I2C2_DeInit().
static void I2C2_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Discovery I2C2 MSP Initialization.
- Parameters:
-
hi2c,: I2C2 handle
- Return values:
-
None
Definition at line 958 of file stm32l476g_discovery.c.
References DISCOVERY_I2C2, DISCOVERY_I2C2_CLK_ENABLE, DISCOVERY_I2C2_ER_IRQn, DISCOVERY_I2C2_EV_IRQn, DISCOVERY_I2C2_FORCE_RESET, DISCOVERY_I2C2_RELEASE_RESET, DISCOVERY_I2C2_SCL_GPIO_CLK_ENABLE, DISCOVERY_I2C2_SCL_GPIO_PORT, DISCOVERY_I2C2_SCL_PIN, DISCOVERY_I2C2_SCL_SDA_AF, DISCOVERY_I2C2_SDA_GPIO_CLK_ENABLE, and DISCOVERY_I2C2_SDA_PIN.
Referenced by I2C2_Init().
static HAL_StatusTypeDef I2C2_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:
-
0 if no problems to read multiple data
Definition at line 1126 of file stm32l476g_discovery.c.
References I2C2_Error(), I2c2Handle, and I2c2Timeout.
Referenced by MFX_IO_ReadMultiple().
static uint8_t I2C2_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:
-
read register value
Definition at line 1100 of file stm32l476g_discovery.c.
References I2C2_Error(), I2c2Handle, and I2c2Timeout.
Referenced by MFX_IO_Read().
static HAL_StatusTypeDef I2C2_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 1077 of file stm32l476g_discovery.c.
References I2C2_Error(), I2c2Handle, and I2c2Timeout.
Referenced by MFX_IO_WriteMultiple().
static void I2C2_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 1054 of file stm32l476g_discovery.c.
References I2C2_Error(), I2c2Handle, and I2c2Timeout.
Referenced by MFX_IO_Write().
void MAGNETO_IO_DeInit | ( | void | ) |
de-Configures COMPASS/MAGNETO SPI interface.
- Return values:
-
None
Definition at line 1275 of file stm32l476g_discovery.c.
References MAGNETO_CS_GPIO_CLK_ENABLE, MAGNETO_CS_GPIO_PORT, MAGNETO_CS_HIGH, MAGNETO_CS_PIN, MAGNETO_DRDY_PIN, MAGNETO_INT1_PIN, and SPIx_DeInit().
Referenced by BSP_COMPASS_DeInit().
void MAGNETO_IO_Init | ( | void | ) |
Configures COMPASS/MAGNETO SPI interface.
- Return values:
-
None
Definition at line 1253 of file stm32l476g_discovery.c.
References MAGNETO_CS_GPIO_CLK_ENABLE, MAGNETO_CS_GPIO_PORT, MAGNETO_CS_HIGH, MAGNETO_CS_PIN, and SPIx_Init().
uint8_t MAGNETO_IO_Read | ( | uint8_t | RegisterAddr | ) |
Reads a block of data from the COMPASS/MAGNETO.
- Parameters:
-
RegisterAddr : specifies the COMPASS/MAGNETO internal address register to read from
- Return values:
-
ACCELEROMETER register value
Definition at line 1318 of file stm32l476g_discovery.c.
References __SPI_DIRECTION_1LINE_RX, __SPI_DIRECTION_1LINE_TX, MAGNETO_CS_HIGH, MAGNETO_CS_LOW, SpiHandle, SPIx_Read(), and SPIx_Write().
void MAGNETO_IO_Write | ( | uint8_t | RegisterAddr, |
uint8_t | Value | ||
) |
Writes one byte to the COMPASS/MAGNETO.
- Parameters:
-
RegisterAddr specifies the COMPASS/MAGNETO register to be written. Value : Data to be written
- Return values:
-
None
Definition at line 1303 of file stm32l476g_discovery.c.
References __SPI_DIRECTION_1LINE_TX, MAGNETO_CS_HIGH, MAGNETO_CS_LOW, SpiHandle, and SPIx_Write().
void MFX_IO_DeInit | ( | void | ) |
Deinitializes MFX low level.
- Return values:
-
None
Definition at line 1512 of file stm32l476g_discovery.c.
References I2C2_DeInit(), IDD_INT_EXTI_IRQn, IDD_INT_GPIO_CLK_ENABLE, IDD_INT_GPIO_PORT, IDD_INT_PIN, IDD_WAKEUP_GPIO_CLK_ENABLE, IDD_WAKEUP_GPIO_PORT, and IDD_WAKEUP_PIN.
void MFX_IO_Delay | ( | uint32_t | Delay | ) |
MFX delay.
- Parameters:
-
Delay,: Delay in ms
- Return values:
-
None
Definition at line 1647 of file stm32l476g_discovery.c.
void MFX_IO_EnableWakeupPin | ( | void | ) |
Configures MFX wke up pin.
- Return values:
-
None
Definition at line 1562 of file stm32l476g_discovery.c.
References IDD_WAKEUP_GPIO_CLK_ENABLE, IDD_WAKEUP_GPIO_PORT, and IDD_WAKEUP_PIN.
void MFX_IO_Init | ( | void | ) |
Initializes MFX low level.
- Return values:
-
None
Definition at line 1503 of file stm32l476g_discovery.c.
References I2C2_Init().
void MFX_IO_ITConfig | ( | void | ) |
Configures MFX low level interrupt.
- Return values:
-
None
Definition at line 1539 of file stm32l476g_discovery.c.
References IDD_INT_EXTI_IRQn, IDD_INT_GPIO_CLK_ENABLE, IDD_INT_GPIO_PORT, and IDD_INT_PIN.
uint8_t MFX_IO_Read | ( | uint16_t | Addr, |
uint8_t | Reg | ||
) |
MFX reads single data.
- Parameters:
-
Addr,: I2C address Reg,: Register address
- Return values:
-
Read data
Definition at line 1611 of file stm32l476g_discovery.c.
References I2C2_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:
-
Number of read data
Definition at line 1624 of file stm32l476g_discovery.c.
References I2C2_ReadBuffer().
void MFX_IO_Wakeup | ( | void | ) |
Wakeup MFX.
- Return values:
-
None
Definition at line 1581 of file stm32l476g_discovery.c.
References IDD_WAKEUP_GPIO_PORT, and IDD_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 1600 of file stm32l476g_discovery.c.
References I2C2_WriteData().
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 1637 of file stm32l476g_discovery.c.
References I2C2_WriteBuffer().
void SPIx_DeInit | ( | void | ) | [static] |
SPIx Bus Deinitialization.
- Return values:
-
None
Definition at line 627 of file stm32l476g_discovery.c.
References SpiHandle, and SPIx_MspDeInit().
Referenced by ACCELERO_IO_DeInit(), GYRO_IO_DeInit(), and MAGNETO_IO_DeInit().
static void SPIx_Init | ( | void | ) | [static] |
SPIx Bus initialization.
- Return values:
-
None
Definition at line 571 of file stm32l476g_discovery.c.
References DISCOVERY_SPIx, SpiHandle, and SPIx_MspInit().
Referenced by ACCELERO_IO_Init(), GYRO_IO_Init(), and MAGNETO_IO_Init().
static void SPIx_MspDeInit | ( | void | ) | [static] |
SPI MSP DeInit.
- Return values:
-
None
Definition at line 641 of file stm32l476g_discovery.c.
References DISCOVERY_SPIx_CLOCK_DISABLE, DISCOVERY_SPIx_GPIO_CLK_ENABLE, DISCOVERY_SPIx_GPIO_FORCE_RESET, DISCOVERY_SPIx_GPIO_PORT, DISCOVERY_SPIx_GPIO_RELEASE_RESET, DISCOVERY_SPIx_MISO_PIN, DISCOVERY_SPIx_MOSI_PIN, and DISCOVERY_SPIx_SCK_PIN.
Referenced by SPIx_DeInit().
static void SPIx_MspInit | ( | SPI_HandleTypeDef * | hspi | ) | [static] |
SPI MSP Init.
- Parameters:
-
hspi,: SPI handle
- Return values:
-
None
Definition at line 604 of file stm32l476g_discovery.c.
References DISCOVERY_SPIx_AF, DISCOVERY_SPIx_CLOCK_ENABLE, DISCOVERY_SPIx_GPIO_CLK_ENABLE, DISCOVERY_SPIx_GPIO_PORT, DISCOVERY_SPIx_MISO_PIN, DISCOVERY_SPIx_MOSI_PIN, and DISCOVERY_SPIx_SCK_PIN.
Referenced by SPIx_Init().
static uint8_t SPIx_Read | ( | void | ) | [static] |
Receives a Byte from the SPI bus.
- Return values:
-
The received byte value
Definition at line 716 of file stm32l476g_discovery.c.
References SpiHandle.
Referenced by ACCELERO_IO_Read(), and MAGNETO_IO_Read().
static void SPIx_Write | ( | uint8_t | Byte | ) | [static] |
Sends a Byte through the SPI interface.
- Parameters:
-
Byte : Byte to send.
- Return values:
-
none.
Definition at line 692 of file stm32l476g_discovery.c.
References SpiHandle.
Referenced by ACCELERO_IO_Read(), ACCELERO_IO_Write(), MAGNETO_IO_Read(), and MAGNETO_IO_Write().
static uint8_t SPIx_WriteRead | ( | uint8_t | Byte | ) | [static] |
Sends a Byte through the SPI interface and return the Byte received from the SPI bus.
- Parameters:
-
Byte : Byte send.
- Return values:
-
none.
Definition at line 662 of file stm32l476g_discovery.c.
References SpiHandle.
Referenced by GYRO_IO_Read(), and GYRO_IO_Write().
Generated on Tue Jun 23 2015 17:15:45 for STM32L476G-Discovery BSP User Manual by 1.7.6.1