Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of writing to eeprom #9

Open
IndiaMike opened this issue Jan 19, 2024 · 2 comments
Open

Example of writing to eeprom #9

IndiaMike opened this issue Jan 19, 2024 · 2 comments

Comments

@IndiaMike
Copy link

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

@nimaltd
Copy link
Owner

nimaltd commented Jan 20, 2024

Hello. OK. I will add WP pin support soon.

@nimaltd
Copy link
Owner

nimaltd commented Mar 28, 2024

I have updated the LIB. please try again for any devices you have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants