_BSP_User_Manual
|
Functions | |
static uint32_t | EEPROM_I2C_Init (void) |
Initializes peripherals used by the I2C EEPROM driver. | |
static uint32_t | EEPROM_I2C_ReadBuffer (uint8_t *pBuffer, uint16_t ReadAddr, uint32_t *NumByteToRead) |
Reads a block of data from the I2C EEPROM. | |
static uint32_t | EEPROM_I2C_WritePage (uint8_t *pBuffer, uint16_t WriteAddr, uint32_t *NumByteToWrite) |
Writes more than one byte to the EEPROM with a single WRITE cycle. | |
static uint32_t | EEPROM_I2C_WaitEepromStandbyState (void) |
Wait for EEPROM I2C Standby state. | |
Variables | |
EEPROM_DrvTypeDef | EEPROM_I2C_Drv |
Function Documentation
static uint32_t EEPROM_I2C_Init | ( | void | ) | [static] |
Initializes peripherals used by the I2C EEPROM driver.
- Note:
- There are 2 different versions of M24CXX (08 or 32 or 64). Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
Definition at line 399 of file stm3210c_eval_eeprom.c.
References EEPROM_ADDRESS_M24C08_BLOCK0, EEPROM_ADDRESS_M24C08_BLOCK1, EEPROM_ADDRESS_M24C08_BLOCK2, EEPROM_ADDRESS_M24C08_BLOCK3, EEPROM_ADDRESS_M24C64_32, EEPROM_FAIL, EEPROM_I2C_IO_Init(), EEPROM_I2C_IO_IsDeviceReady(), EEPROM_MAX_TRIALS, EEPROM_OK, EEPROM_PAGESIZE_M24C08, EEPROM_PAGESIZE_M24C64_32, EEPROMAddress, and EEPROMPageSize.
static uint32_t EEPROM_I2C_ReadBuffer | ( | uint8_t * | pBuffer, |
uint16_t | ReadAddr, | ||
uint32_t * | NumByteToRead | ||
) | [static] |
Reads a block of data from the I2C EEPROM.
Definition at line 446 of file stm3210c_eval_eeprom.c.
References EEPROM_FAIL, EEPROM_I2C_IO_ReadData(), EEPROM_OK, and EEPROMAddress.
static uint32_t EEPROM_I2C_WaitEepromStandbyState | ( | void | ) | [static] |
Wait for EEPROM I2C Standby state.
- Note:
- This function allows to wait and check that EEPROM has finished the last operation. It is mostly used after Write operation: after receiving the buffer to be written, the EEPROM may need additional time to actually perform the write operation. During this time, it doesn't answer to I2C packets addressed to it. Once the write operation is complete the EEPROM responds to its address.
Definition at line 514 of file stm3210c_eval_eeprom.c.
References BSP_EEPROM_TIMEOUT_UserCallback(), EEPROM_I2C_IO_IsDeviceReady(), EEPROM_MAX_TRIALS, EEPROM_OK, EEPROM_TIMEOUT, and EEPROMAddress.
Referenced by EEPROM_I2C_WritePage().
static uint32_t EEPROM_I2C_WritePage | ( | uint8_t * | pBuffer, |
uint16_t | WriteAddr, | ||
uint32_t * | NumByteToWrite | ||
) | [static] |
Writes more than one byte to the EEPROM with a single WRITE cycle.
- Note:
- The number of bytes (combined to write start address) must not cross the EEPROM page boundary. This function can only write into the boundaries of an EEPROM page. This function doesn't check on boundaries condition (in this driver the function BSP_EEPROM_WriteBuffer() which calls EEPROM_WritePage() is responsible of checking on Page boundaries).
- Note:
- The variable pointed by NumByteToWrite is reset to 0 when all the data are written to the EEPROM. Application should monitor this variable in order know when the transfer is complete.
Definition at line 483 of file stm3210c_eval_eeprom.c.
References EEPROM_FAIL, EEPROM_I2C_IO_WriteData(), EEPROM_I2C_WaitEepromStandbyState(), EEPROM_OK, and EEPROMAddress.
Variable Documentation
Definition at line 135 of file stm3210c_eval_eeprom.c.
Referenced by BSP_EEPROM_SelectDevice().
Generated on Thu Dec 11 2014 15:38:29 for _BSP_User_Manual by 1.7.5.1