STM3210C_EVAL BSP User Manual: STM3210C EVAL LinkOperations Functions

STM3210C_EVAL BSP

STM3210C_EVAL BSP User Manual
STM3210C EVAL LinkOperations Functions

Functions

void IOE_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 IOE writes single data.
uint8_t IOE_Read (uint8_t Addr, uint8_t Reg)
 IOE reads single data.
uint16_t IOE_ReadMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 IOE reads multiple data.
void IOE_Delay (uint32_t Delay)
 IOE delay.
void LCD_IO_WriteMultipleData (uint8_t *pData, uint32_t Size)
 Write register value.
void LCD_IO_WriteReg (uint8_t Reg)
 register address.
uint16_t LCD_IO_ReadData (uint16_t Reg)
 Read register value.
void LCD_Delay (uint32_t Delay)
 Wait for loop in ms.
void SD_IO_CSState (uint8_t val)
 Set the SD_CS pin.
void SD_IO_WriteReadData (const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength)
 Write a byte on the SD.
void SD_IO_WriteData (const uint8_t *Data, uint16_t DataLength)
 Write a byte on the SD.
void SD_IO_ReadData (const uint8_t *Data, uint16_t DataLength)
 Read a byte from the SD.
uint8_t SD_IO_WriteByte (uint8_t Data)
 Writes a byte on the SD.
HAL_StatusTypeDef EEPROM_I2C_IO_WriteData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Write data to I2C EEPROM driver.
HAL_StatusTypeDef EEPROM_I2C_IO_ReadData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Read data from I2C EEPROM driver.
HAL_StatusTypeDef EEPROM_I2C_IO_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
 Checks if target device is ready for communication.
void TSENSOR_IO_Init (void)
 Initializes peripherals used by the I2C Temperature Sensor driver.
void TSENSOR_IO_Write (uint16_t DevAddress, uint8_t *pBuffer, uint8_t WriteAddr, uint16_t Length)
 Writes one byte to the TSENSOR.
void TSENSOR_IO_Read (uint16_t DevAddress, uint8_t *pBuffer, uint8_t ReadAddr, uint16_t Length)
 Reads one byte from the TSENSOR.
uint16_t TSENSOR_IO_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
 Checks if Temperature Sensor is ready for communication.
void ACCELERO_IO_ITConfig (void)
 Configures ACCELERO INT2 config.
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_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.

Function Documentation

void ACCELERO_IO_ITConfig ( void  )

Configures ACCELERO INT2 config.

EXTI0 is already used by user button so INT1 is configured here

Definition at line 1365 of file stm3210c_eval.c.

References BSP_IO_ConfigPin(), and MEMS_ALL_PINS.

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 1387 of file stm3210c_eval.c.

References I2Cx_ReadBuffer(), and L1S302DL_I2C_ADDRESS.

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 1376 of file stm3210c_eval.c.

References I2Cx_WriteBuffer(), and L1S302DL_I2C_ADDRESS.

void AUDIO_IO_DeInit ( void  )

DeInitializes Audio low level.

Note:
This function is intentionally kept empty, user should define it.

Definition at line 1421 of file stm3210c_eval.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 1443 of file stm3210c_eval.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 1432 of file stm3210c_eval.c.

References I2Cx_WriteData().

HAL_StatusTypeDef EEPROM_I2C_IO_IsDeviceReady ( uint16_t  DevAddress,
uint32_t  Trials 
)

Checks if target device is ready for communication.

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

Definition at line 1300 of file stm3210c_eval.c.

References I2Cx_IsDeviceReady().

Referenced by EEPROM_I2C_Init(), and EEPROM_I2C_WaitEepromStandbyState().

HAL_StatusTypeDef EEPROM_I2C_IO_ReadData ( uint16_t  DevAddress,
uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Read data from I2C EEPROM driver.

Parameters:
DevAddress,:Target device address
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be read
Return values:
HALstatus

Definition at line 1288 of file stm3210c_eval.c.

References I2Cx_ReadBuffer().

Referenced by EEPROM_I2C_ReadBuffer().

HAL_StatusTypeDef EEPROM_I2C_IO_WriteData ( uint16_t  DevAddress,
uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Write data to I2C EEPROM driver.

Parameters:
DevAddress,:Target device address
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be sent
Return values:
HALstatus

Definition at line 1275 of file stm3210c_eval.c.

References I2Cx_WriteBuffer().

Referenced by EEPROM_I2C_WritePage().

void IOE_Delay ( uint32_t  Delay)

IOE delay.

Parameters:
Delay,:Delay in ms

Definition at line 1015 of file stm3210c_eval.c.

References HAL_Delay().

uint8_t IOE_Read ( uint8_t  Addr,
uint8_t  Reg 
)

IOE reads single data.

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

Definition at line 993 of file stm3210c_eval.c.

References I2Cx_ReadData().

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

IOE reads multiple data.

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

Definition at line 1006 of file stm3210c_eval.c.

References I2Cx_ReadMultiple().

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

IOE writes single data.

Parameters:
Addr,:I2C address
Reg,:Reg address
Value,:Data to be written

Definition at line 982 of file stm3210c_eval.c.

References I2Cx_WriteData().

void LCD_Delay ( uint32_t  Delay)

Wait for loop in ms.

Parameters:
Delayin ms.
Return values:
None

Definition at line 1143 of file stm3210c_eval.c.

References HAL_Delay().

uint16_t LCD_IO_ReadData ( uint16_t  Reg)

Read register value.

Parameters:
Reg

Definition at line 1113 of file stm3210c_eval.c.

References HAL_Delay(), LCD_CS_HIGH, LCD_CS_LOW, LCD_IO_WriteReg(), LCD_READ_REG, SPIx_Read(), SPIx_Write(), and START_BYTE.

void LCD_IO_WriteMultipleData ( uint8_t *  pData,
uint32_t  Size 
)

Write register value.

Parameters:
pDataPointer on the register value
SizeSize of byte to transmit to the register

Definition at line 1054 of file stm3210c_eval.c.

References heval_Spi, LCD_CS_HIGH, LCD_CS_LOW, LCD_WRITE_REG, SPIx_Write(), and START_BYTE.

void LCD_IO_WriteReg ( uint8_t  Reg)

register address.

Parameters:
Reg

Definition at line 1093 of file stm3210c_eval.c.

References LCD_CS_HIGH, LCD_CS_LOW, SET_INDEX, SPIx_Write(), and START_BYTE.

Referenced by LCD_IO_ReadData().

void SD_IO_CSState ( uint8_t  val)

Set the SD_CS pin.

Parameters:
pinvalue.
Return values:
None

Definition at line 1197 of file stm3210c_eval.c.

References SD_CS_HIGH, and SD_CS_LOW.

Referenced by BSP_SD_Erase(), BSP_SD_GetCardState(), BSP_SD_ReadBlocks(), BSP_SD_WriteBlocks(), SD_GetCIDRegister(), SD_GetCSDRegister(), SD_GetDataResponse(), SD_GoIdleState(), and SD_SendCmd().

void SD_IO_ReadData ( const uint8_t *  Data,
uint16_t  DataLength 
)

Read a byte from the SD.

Parameters:
Data,:value to be read
DataLength,:length of data

Definition at line 1237 of file stm3210c_eval.c.

References SPIx_ReadData().

Referenced by BSP_SD_ReadBlocks().

uint8_t SD_IO_WriteByte ( uint8_t  Data)
void SD_IO_WriteData ( const uint8_t *  Data,
uint16_t  DataLength 
)

Write a byte on the SD.

Parameters:
Data,:value to be written
DataLength,:length of data

Definition at line 1226 of file stm3210c_eval.c.

References SPIx_WriteData().

Referenced by BSP_SD_WriteBlocks().

void SD_IO_WriteReadData ( const uint8_t *  DataIn,
uint8_t *  DataOut,
uint16_t  DataLength 
)

Write a byte on the SD.

Parameters:
DataIn,:value to be written
DataOut,:value to be read
DataLength,:length of data

Definition at line 1215 of file stm3210c_eval.c.

References SPIx_WriteReadData().

Referenced by SD_SendCmd().

void TSENSOR_IO_Init ( void  )

Initializes peripherals used by the I2C Temperature Sensor driver.

Return values:
None

Definition at line 1310 of file stm3210c_eval.c.

References I2Cx_Init().

uint16_t TSENSOR_IO_IsDeviceReady ( uint16_t  DevAddress,
uint32_t  Trials 
)

Checks if Temperature Sensor is ready for communication.

Parameters:
DevAddress,:Target device address
Trials,:Number of trials
Return values:
HALstatus

Definition at line 1345 of file stm3210c_eval.c.

References I2Cx_IsDeviceReady().

void TSENSOR_IO_Read ( uint16_t  DevAddress,
uint8_t *  pBuffer,
uint8_t  ReadAddr,
uint16_t  Length 
)

Reads one byte from the TSENSOR.

Parameters:
DevAddress,:Target device address
pBuffer: pointer to the buffer that receives the data read from the TSENSOR.
ReadAddr: TSENSOR's internal address to read from.
Length,:Number of data to read

Definition at line 1334 of file stm3210c_eval.c.

References I2Cx_ReadBuffer().

void TSENSOR_IO_Write ( uint16_t  DevAddress,
uint8_t *  pBuffer,
uint8_t  WriteAddr,
uint16_t  Length 
)

Writes one byte to the TSENSOR.

Parameters:
DevAddress,:Target device address
pBuffer,:Pointer to data buffer
WriteAddr,:TSENSOR's internal address to write to.
Length,:Number of data to write

Definition at line 1322 of file stm3210c_eval.c.

References I2Cx_WriteBuffer().

Generated on Fri Apr 14 2017 13:00:47 for STM3210C_EVAL BSP User Manual by   doxygen 1.7.6.1