STM32F4-Discovery BSP User Manual
|
Functions | |
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 | I2Cx_WriteData (uint8_t Addr, uint8_t Reg, uint8_t Value) |
Write a value in a register of the device through BUS. | |
static uint8_t | I2Cx_ReadData (uint8_t Addr, uint8_t Reg) |
Read a register of the device through BUS. | |
static void | I2Cx_Error (uint8_t Addr) |
Manages error callback by re-initializing I2C. | |
void | ACCELERO_IO_ITConfig (void) |
Configures the Accelerometer INT2. | |
void | ACCELERO_IO_Write (uint8_t *pBuffer, uint8_t WriteAddr, uint16_t NumByteToWrite) |
Writes one byte to the Accelerometer. | |
void | ACCELERO_IO_Read (uint8_t *pBuffer, uint8_t ReadAddr, uint16_t NumByteToRead) |
Reads a block of data from the Accelerometer. | |
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. |
Function Documentation
void ACCELERO_IO_ITConfig | ( | void | ) |
Configures the Accelerometer INT2.
EXTI0 is already used by user button so INT1 is not configured here.
Definition at line 535 of file stm32f4_discovery.c.
References ACCELERO_INT2_EXTI_IRQn, ACCELERO_INT2_PIN, ACCELERO_INT_GPIO_CLK_ENABLE, and ACCELERO_INT_GPIO_PORT.
void ACCELERO_IO_Read | ( | uint8_t * | pBuffer, |
uint8_t | ReadAddr, | ||
uint16_t | NumByteToRead | ||
) |
Reads a block of data from the Accelerometer.
- Parameters:
-
pBuffer,: pointer to the buffer that receives the data read from the Accelerometer. ReadAddr,: Accelerometer's internal address to read from. NumByteToRead,: number of bytes to read from the Accelerometer.
Definition at line 594 of file stm32f4_discovery.c.
References ACCELERO_CS_HIGH, ACCELERO_CS_LOW, DUMMY_BYTE, MULTIPLEBYTE_CMD, READWRITE_CMD, and SPIx_WriteRead().
void ACCELERO_IO_Write | ( | uint8_t * | pBuffer, |
uint8_t | WriteAddr, | ||
uint16_t | NumByteToWrite | ||
) |
Writes one byte to the Accelerometer.
- Parameters:
-
pBuffer,: pointer to the buffer containing the data to be written to the Accelerometer. WriteAddr,: Accelerometer's internal address to write to. NumByteToWrite,: Number of bytes to write.
Definition at line 560 of file stm32f4_discovery.c.
References ACCELERO_CS_HIGH, ACCELERO_CS_LOW, MULTIPLEBYTE_CMD, and SPIx_WriteRead().
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 682 of file stm32f4_discovery.c.
References I2Cx_ReadData().
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
Definition at line 671 of file stm32f4_discovery.c.
References I2Cx_WriteData().
static void I2Cx_Error | ( | uint8_t | Addr | ) | [static] |
Manages error callback by re-initializing I2C.
- Parameters:
-
Addr,: I2C Address
Definition at line 456 of file stm32f4_discovery.c.
References I2cHandle, and I2Cx_Init().
Referenced by I2Cx_ReadData(), and I2Cx_WriteData().
static uint8_t I2Cx_ReadData | ( | uint8_t | Addr, |
uint8_t | Reg | ||
) | [static] |
Read a register of the device through BUS.
- Parameters:
-
Addr,: Device address on BUS Reg,: The target register address to read
- Return values:
-
HAL status
Definition at line 436 of file stm32f4_discovery.c.
References I2cHandle, I2Cx_Error(), and I2cxTimeout.
Referenced by AUDIO_IO_Read().
static void I2Cx_WriteData | ( | uint8_t | Addr, |
uint8_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:
-
HAL status
Definition at line 416 of file stm32f4_discovery.c.
References I2cHandle, I2Cx_Error(), and I2cxTimeout.
Referenced by AUDIO_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:
-
The received byte value
Definition at line 340 of file stm32f4_discovery.c.
References SpiHandle, SPIx_Error(), and SpixTimeout.
Referenced by ACCELERO_IO_Read(), and ACCELERO_IO_Write().
Generated on Thu Jan 19 2017 15:34:14 for STM32F4-Discovery BSP User Manual by
