-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat(MiscDrivers,Examples): Add 24LC256 EEPROM driver, add I2C EEPROM example for MAX32655 #751
feat(MiscDrivers,Examples): Add 24LC256 EEPROM driver, add I2C EEPROM example for MAX32655 #751
Conversation
24LC256 EEPROM example for Max32655 EVKIT added. clang format fixes implemented.
Thanks @kenan-balci, we will review this as soon as we can. This week we are mostly testing our release candidate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks!
A few change requests below
@@ -73,28 +76,23 @@ int main(void) | |||
printf("Press ENTER key to Continue\n\n"); | |||
getchar(); | |||
|
|||
err = MXC_I2C_Init(I2C_MASTER, 1, 0); | |||
err = Eeprom_24LC256_Init(&eeprom1_req, I2C_MASTER, EEPROM_24LC256_I2C_SLAVE_ADDR0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kenan-balci, this looks good. I have one more design suggestion:
- Remove the
&eeprom1_req
as a required parameter for the functions.
You can move the eeprom_24lc256_req_t
struct to be internal to the drivers so that the user doesn't need to pass the pointer in every time.
Since the user will not be interacting with this struct directly there's no need to expose it unless you want to preserve the ability to interface with multiple EEPROMs at the same time. If that's the case then you can leave it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My purpose is to give the driver the ability to communicate with more than one EEPROM, as you said. Up to 8 EEPROMs with different slave addresses can be connected to the same I2C bus. I tested communication with two EEPROMs, and the driver worked properly.
Seems to be suffering from #601 Verify Register workflow can be ignored |
@sihyung-maxim / @Jacob-Scheiffler please take a look at this when you have the chance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sihyung-maxim, the new files in this PR will need to be updated with our latest copyrights.
Add 24LC256 EEPROM driver
Add I2C EEPROM example for MAX32655
Clang format fixes implemented.