ee24
ee24 copied to clipboard
Example of writing to eeprom
Library does not fully support writing operation. It is important to remember about switching WP (Write Protection) pin before call write function.
_Bool status = false;
status = EE24_Init(&eeprom24, &hi2c1, EE24_ADDRESS_DEFAULT);
uint8_t data[4] = {0xBE, 0xEF, 0xAB, 0xCD};
HAL_GPIO_WritePin(EEPROM_WP_GPIO_Port, EEPROM_WP_Pin, GPIO_PIN_RESET);
status = EE24_Write(&eeprom24, 0u, &data, 4, 1000);
HAL_GPIO_WritePin(EEPROM_WP_GPIO_Port, EEPROM_WP_Pin, GPIO_PIN_SET);
memset(&data, 0u, sizeof(data));
status = EE24_Read(&eeprom24, 0u, &data, 4, 1000);
The rest of library is ok. Simple and working library. Thanks :D
Hello. OK. I will add WP pin support soon.
I have updated the LIB. please try again for any devices you have.