STM32F3-Discovery BSP User Manual: Bus Operation functions

STM32F3-Discovery BSP Drivers

STM32F3-Discovery BSP User Manual
Bus Operation functions

Functions

static void I2Cx_Init (void)
 Discovery I2Cx Bus initialization.
static void I2Cx_WriteData (uint16_t Addr, uint8_t Reg, uint8_t Value)
 Write a value in a register of the device through BUS.
static uint8_t I2Cx_ReadData (uint16_t Addr, uint8_t Reg)
 Read a value in a register of the device through BUS.
static void I2Cx_Error (void)
 I2C3 error treatment function.
static void I2Cx_MspInit (I2C_HandleTypeDef *hi2c)
 Discovery I2Cx MSP Initialization.
static void SPIx_Init (void)
 SPIx 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)
 SPIx error treatment function.
static void SPIx_MspInit (SPI_HandleTypeDef *hspi)
 SPI MSP Init.

Function Documentation

static void I2Cx_Error ( void  ) [static]

I2C3 error treatment function.

Return values:
None

Definition at line 413 of file stm32f3_discovery.c.

References I2cHandle, and I2Cx_Init().

Referenced by I2Cx_ReadData(), and I2Cx_WriteData().

static void I2Cx_Init ( void  ) [static]

Discovery I2Cx Bus initialization.

Return values:
None

Definition at line 347 of file stm32f3_discovery.c.

References ACCELERO_I2C_ADDRESS, DISCOVERY_I2Cx, I2cHandle, and I2Cx_MspInit().

Referenced by COMPASSACCELERO_IO_Init(), and I2Cx_Error().

static void I2Cx_MspInit ( I2C_HandleTypeDef *  hi2c) [static]

Discovery I2Cx MSP Initialization.

Parameters:
hi2cI2C handle
Return values:
None

Definition at line 323 of file stm32f3_discovery.c.

References 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 uint8_t I2Cx_ReadData ( uint16_t  Addr,
uint8_t  Reg 
) [static]

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

Parameters:
AddrDevice address on BUS Bus.
RegThe target register address to write
Return values:
Dataread at register @

Definition at line 392 of file stm32f3_discovery.c.

References I2cHandle, I2Cx_Error(), and I2cxTimeout.

Referenced by COMPASSACCELERO_IO_Read().

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

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

Parameters:
AddrDevice address on BUS Bus.
RegThe target register address to write
ValueThe target register value to be written
Return values:
None

Definition at line 372 of file stm32f3_discovery.c.

References I2cHandle, I2Cx_Error(), and I2cxTimeout.

Referenced by COMPASSACCELERO_IO_Write().

static void SPIx_Error ( void  ) [static]

SPIx error treatment function.

Return values:
None

Definition at line 485 of file stm32f3_discovery.c.

References SpiHandle, and SPIx_Init().

Referenced by SPIx_WriteRead().

static void SPIx_Init ( void  ) [static]

SPIx Bus initialization.

Return values:
None

Definition at line 430 of file stm32f3_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:
hspiSPI handle
Return values:
None

Definition at line 500 of file stm32f3_discovery.c.

References DISCOVERY_SPIx_AF, DISCOVERY_SPIx_CLK_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:
ByteByte send.
Return values:
Thereceived byte value

Definition at line 465 of file stm32f3_discovery.c.

References SpiHandle, SPIx_Error(), and SpixTimeout.

Referenced by GYRO_IO_Read(), and GYRO_IO_Write().

Generated on Wed May 31 2017 10:47:41 for STM32F3-Discovery BSP User Manual by   doxygen 1.7.6.1