STM32L152D_EVAL BSP User Manual: Link Operations Functions

STM32L152D_EVAL BSP

STM32L152D_EVAL BSP User Manual
Link Operations Functions

Functions

void LCD_IO_Init (void)
 Initializes LCD low level.
void LCD_IO_WriteData (uint16_t RegValue)
 Writes data on LCD data register.
void LCD_IO_WriteMultipleData (uint8_t *pData, uint32_t Size)
 Writes multiple data on LCD data register.
void LCD_IO_WriteReg (uint8_t Reg)
 Writes register on LCD register.
uint16_t LCD_IO_ReadData (uint16_t Reg)
 Reads data from LCD data register.
void LCD_Delay (uint32_t Delay)
 Wait for loop in ms.
void EEPROM_SPI_IO_Init (void)
 Initializes the EEPROM SPI and put it into StandBy State (Ready for data transfer).
void EEPROM_SPI_IO_WriteByte (uint8_t Data)
 Write a byte on the EEPROM.
uint8_t EEPROM_SPI_IO_ReadByte (void)
 Read a byte from the EEPROM.
HAL_StatusTypeDef EEPROM_SPI_IO_WriteData (uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Write data to SPI EEPROM driver.
HAL_StatusTypeDef EEPROM_SPI_IO_ReadData (uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Read data from SPI EEPROM driver.
HAL_StatusTypeDef EEPROM_SPI_IO_WaitEepromStandbyState (void)
 Wait response from the SPI EEPROM.
void EEPROM_I2C_IO_Init (void)
 Initializes peripherals used by the I2C EEPROM driver.
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 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.

Function Documentation

void AUDIO_IO_DeInit ( void  )

DeInitializes Audio low level.

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

Definition at line 1402 of file stm32l152d_eval.c.

void AUDIO_IO_Init ( void  )

Initializes Audio low level.

Return values:
None

Definition at line 1369 of file stm32l152d_eval.c.

References AUDIO_RESET_GPIO, AUDIO_RESET_GPIO_CLK_ENABLE, AUDIO_RESET_PIN, and I2Cx_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:
Datato be read

Definition at line 1425 of file stm32l152d_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
Return values:
None

Definition at line 1414 of file stm32l152d_eval.c.

References I2Cx_WriteData().

void EEPROM_I2C_IO_Init ( void  )

Initializes peripherals used by the I2C EEPROM driver.

Return values:
None

Definition at line 1273 of file stm32l152d_eval.c.

References I2Cx_Init().

Referenced by EEPROM_I2C_Init().

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 1311 of file stm32l152d_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 1299 of file stm32l152d_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 1286 of file stm32l152d_eval.c.

References I2Cx_WriteBuffer().

Referenced by EEPROM_I2C_WritePage().

void EEPROM_SPI_IO_Init ( void  )

Initializes the EEPROM SPI and put it into StandBy State (Ready for data transfer).

Return values:
None

Definition at line 1091 of file stm32l152d_eval.c.

References EEPROM_CS_GPIO_CLK_ENABLE, EEPROM_CS_GPIO_PORT, EEPROM_CS_HIGH, EEPROM_CS_PIN, and SPIx_Init().

Referenced by EEPROM_SPI_Init().

uint8_t EEPROM_SPI_IO_ReadByte ( void  )

Read a byte from the EEPROM.

Return values:
uint8_t(The received byte).

Definition at line 1128 of file stm32l152d_eval.c.

References SPIx_Read().

HAL_StatusTypeDef EEPROM_SPI_IO_ReadData ( uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Read data from SPI EEPROM driver.

Parameters:
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be read
Return values:
HAL_StatusTypeDefHAL Status

< Select the EEPROM: Chip Select low

< Send "Read from Memory" instruction and MSB of MemAddress

< Send MemAddress address byte to read to

< while there is data to be read

< Read a byte from the EEPROM

< Point to the next location where the byte read will be saved

Definition at line 1201 of file stm32l152d_eval.c.

References EEPROM_CMD_READ, EEPROM_CS_HIGH, EEPROM_CS_LOW, SPIx_Read(), and SPIx_Write().

Referenced by EEPROM_SPI_ReadBuffer().

HAL_StatusTypeDef EEPROM_SPI_IO_WaitEepromStandbyState ( void  )

Wait response from the SPI EEPROM.

Return values:
HAL_StatusTypeDefHAL Status

< Select the EEPROM: Chip Select low

< Send "Read Status Register" instruction

< Loop as long as the memory is busy with a write cycle

< Send a dummy byte to generate the clock needed by the EEPROM and put the value of the status register in EEPROM Status variable

< Deselect the EEPROM: Chip Select high

Definition at line 1230 of file stm32l152d_eval.c.

References EEPROM_CMD_RDSR, EEPROM_CS_HIGH, EEPROM_CS_LOW, EEPROM_WIP_FLAG, SPIx_Read(), and SPIx_Write().

Referenced by EEPROM_SPI_IO_WriteData(), and EEPROM_SPI_WaitEepromStandbyState().

void EEPROM_SPI_IO_WriteByte ( uint8_t  Data)

Write a byte on the EEPROM.

Parameters:
Data,:byte to send.
Return values:
None

Definition at line 1118 of file stm32l152d_eval.c.

References SPIx_Write().

HAL_StatusTypeDef EEPROM_SPI_IO_WriteData ( uint16_t  MemAddress,
uint8_t *  pBuffer,
uint32_t  BufferSize 
)

Write data to SPI EEPROM driver.

Parameters:
MemAddress,:Internal memory address
pBuffer,:Pointer to data buffer
BufferSize,:Amount of data to be read
Return values:
HAL_StatusTypeDefHAL Status

< Enable the write access to the EEPROM

< Select the EEPROM: Chip Select low

< Send "Write Enable" instruction

< Deselect the EEPROM: Chip Select high

< Select the EEPROM: Chip Select low

< Send "Write to Memory" instruction and MSB of MemAddress

< Send MemAddress address byte to write to

< while there is data to be written on the EEPROM

< Send the current byte

< Point on the next byte to be written

< Wait the end of EEPROM writing

< Disable the write access to the EEROM

< Send "Write Disable" instruction

< Deselect the EEPROM: Chip Select high

Definition at line 1146 of file stm32l152d_eval.c.

References EEPROM_CMD_WRDI, EEPROM_CMD_WREN, EEPROM_CMD_WRITE, EEPROM_CS_HIGH, EEPROM_CS_LOW, EEPROM_SPI_IO_WaitEepromStandbyState(), and SPIx_Write().

Referenced by EEPROM_SPI_WritePage().

void LCD_Delay ( uint32_t  Delay)

Wait for loop in ms.

Parameters:
Delayin ms.
Return values:
None

Definition at line 1076 of file stm32l152d_eval.c.

void LCD_IO_Init ( void  )

Initializes LCD low level.

Return values:
None

Definition at line 1013 of file stm32l152d_eval.c.

References FSMC_BANK4_Init().

uint16_t LCD_IO_ReadData ( uint16_t  Reg)

Reads data from LCD data register.

Parameters:
Reg,:Register to be read
Return values:
Readdata.

Definition at line 1063 of file stm32l152d_eval.c.

References FSMC_BANK4_ReadData(), and FSMC_BANK4_WriteReg().

void LCD_IO_WriteData ( uint16_t  RegValue)

Writes data on LCD data register.

Parameters:
RegValue,:Data to be written
Return values:
None

Definition at line 1023 of file stm32l152d_eval.c.

References FSMC_BANK4_WriteData().

void LCD_IO_WriteMultipleData ( uint8_t *  pData,
uint32_t  Size 
)

Writes multiple data on LCD data register.

Parameters:
pData,:Data to be written
Size,:number of data to write
Return values:
None

Definition at line 1034 of file stm32l152d_eval.c.

References FSMC_BANK4_WriteData().

void LCD_IO_WriteReg ( uint8_t  Reg)

Writes register on LCD register.

Parameters:
Reg,:Register to be written
Return values:
None

Definition at line 1053 of file stm32l152d_eval.c.

References FSMC_BANK4_WriteReg().

void TSENSOR_IO_Init ( void  )

Initializes peripherals used by the I2C Temperature Sensor driver.

Return values:
None

Definition at line 1321 of file stm32l152d_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 1358 of file stm32l152d_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
Return values:
None

Definition at line 1347 of file stm32l152d_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
Return values:
None

Definition at line 1334 of file stm32l152d_eval.c.

References I2Cx_WriteBuffer().

Generated on Thu Aug 24 2017 17:57:47 for STM32L152D_EVAL BSP User Manual by   doxygen 1.7.6.1