STM32F072B-Discovery BSP User Manual
|
Functions | |
static void | I2Cx_Init (void) |
Discovery I2Cx Bus initialization. | |
static uint32_t | I2Cx_WriteData (uint8_t Addr, uint16_t Reg, uint8_t Value) |
Write a value in a register of the device through BUS. | |
static uint32_t | I2Cx_WriteBuffer (uint8_t Addr, uint16_t Reg, uint8_t *pBuffer, uint16_t Length) |
Write a value in a register of the device through BUS. | |
static uint32_t | I2Cx_ReadData (uint8_t Addr, uint16_t Reg, uint8_t *Value) |
Read a register of the device through BUS. | |
static uint32_t | I2Cx_ReadBuffer (uint8_t Addr, uint16_t Reg, uint8_t *pBuffer, uint16_t Length) |
Reads multiple data on the BUS. | |
static void | I2Cx_Error (uint8_t Addr) |
Discovery I2Cx error treatment function. | |
static void | SPIx_Init (void) |
SPI1 Bus initialization. | |
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_Error (void) |
SPI1 error treatment function. | |
static void | SPIx_MspInit (SPI_HandleTypeDef *hspi) |
SPI MSP Init. | |
static void | I2Cx_MspInit (I2C_HandleTypeDef *hi2c) |
Discovery I2Cx MSP Initialization. |
Function Documentation
static void I2Cx_Error | ( | uint8_t | Addr | ) | [static] |
Discovery I2Cx error treatment function.
- Return values:
-
None
Definition at line 503 of file stm32f072b_discovery.c.
References I2cHandle, and I2Cx_Init().
Referenced by I2Cx_ReadBuffer(), I2Cx_ReadData(), I2Cx_WriteBuffer(), and I2Cx_WriteData().
static void I2Cx_Init | ( | void | ) | [static] |
Discovery I2Cx Bus initialization.
- Return values:
-
None
Definition at line 386 of file stm32f072b_discovery.c.
References DISCOVERY_I2Cx, DISCOVERY_I2Cx_TIMING, I2cHandle, and I2Cx_MspInit().
Referenced by EEPROM_IO_Init(), and I2Cx_Error().
static void I2Cx_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) | [static] |
Discovery I2Cx MSP Initialization.
- Parameters:
-
hi2c I2C handle
- Return values:
-
None
Definition at line 314 of file stm32f072b_discovery.c.
References DISCOVERY_EEPROM_DMA_CHANNEL_RX, DISCOVERY_EEPROM_DMA_CHANNEL_TX, DISCOVERY_EEPROM_DMA_CLK_ENABLE, DISCOVERY_EEPROM_DMA_PREPRIO, DISCOVERY_EEPROM_DMA_RX_IRQn, DISCOVERY_EEPROM_DMA_SUBPRIO, DISCOVERY_EEPROM_DMA_TX_IRQn, DISCOVERY_I2Cx_AF, DISCOVERY_I2Cx_CLK_ENABLE, DISCOVERY_I2Cx_GPIO_CLK_ENABLE, DISCOVERY_I2Cx_GPIO_PORT, DISCOVERY_I2Cx_SCL_PIN, and DISCOVERY_I2Cx_SDA_PIN.
Referenced by I2Cx_Init().
static uint32_t I2Cx_ReadBuffer | ( | uint8_t | Addr, |
uint16_t | Reg, | ||
uint8_t * | pBuffer, | ||
uint16_t | Length | ||
) | [static] |
Reads multiple data on the BUS.
- Parameters:
-
Addr I2C Address Reg Reg Address pBuffer pointer to read data buffer Length length of the data
- Return values:
-
0 if no problems to read multiple data
Definition at line 483 of file stm32f072b_discovery.c.
References I2cHandle, and I2Cx_Error().
Referenced by EEPROM_IO_ReadData().
static uint32_t I2Cx_ReadData | ( | uint8_t | Addr, |
uint16_t | Reg, | ||
uint8_t * | Value | ||
) | [static] |
Read a register of the device through BUS.
- Parameters:
-
Addr Device address on BUS Reg The target register address to read
- Return values:
-
Value,: read register value
Definition at line 459 of file stm32f072b_discovery.c.
References I2cHandle, I2Cx_Error(), and I2Cx_TIMEOUT_MAX.
Referenced by EEPROM_IO_ReadData().
static uint32_t I2Cx_WriteBuffer | ( | uint8_t | Addr, |
uint16_t | Reg, | ||
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 pBuffer The target register value to be written Length buffer size to be written
- Return values:
-
None
Definition at line 437 of file stm32f072b_discovery.c.
References I2cHandle, and I2Cx_Error().
Referenced by EEPROM_IO_WriteData().
static uint32_t I2Cx_WriteData | ( | uint8_t | Addr, |
uint16_t | Reg, | ||
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 Value The target register value to be written
- Return values:
-
None
Definition at line 413 of file stm32f072b_discovery.c.
References I2cHandle, I2Cx_Error(), and I2Cx_TIMEOUT_MAX.
Referenced by EEPROM_IO_WriteData().
static void SPIx_Error | ( | void | ) | [static] |
SPI1 error treatment function.
- Return values:
-
None
Definition at line 573 of file stm32f072b_discovery.c.
References SpiHandle, and SPIx_Init().
Referenced by SPIx_WriteRead().
static void SPIx_Init | ( | void | ) | [static] |
SPI1 Bus initialization.
- Return values:
-
None
Definition at line 519 of file stm32f072b_discovery.c.
References DISCOVERY_SPIx, SpiHandle, and SPIx_MspInit().
Referenced by GYRO_IO_Init(), and SPIx_Error().
static void SPIx_MspInit | ( | SPI_HandleTypeDef * | hspi | ) | [static] |
SPI MSP Init.
- Parameters:
-
hspi SPI handle
- Return values:
-
None
Definition at line 588 of file stm32f072b_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_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:
-
The received byte value
Definition at line 553 of file stm32f072b_discovery.c.
References SpiHandle, SPIx_Error(), and SpixTimeout.
Referenced by GYRO_IO_Read(), and GYRO_IO_Write().
Generated on Wed Jul 5 2017 09:43:19 for STM32F072B-Discovery BSP User Manual by
