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

feat(MiscDrivers,Examples): Add 24LC256 EEPROM driver, add I2C EEPROM example for MAX32655 #751

Merged
merged 7 commits into from
Nov 13, 2023

Conversation

kenan-balci
Copy link
Contributor

Add 24LC256 EEPROM driver
Add I2C EEPROM example for MAX32655
Clang format fixes implemented.

24LC256 EEPROM example for Max32655 EVKIT added.
clang format fixes implemented.
@github-actions github-actions bot added the MAX32655 Related to the MAX32655 (ME17) label Oct 4, 2023
@Jake-Carter
Copy link
Contributor

Thanks @kenan-balci, we will review this as soon as we can. This week we are mostly testing our release candidate

Copy link
Contributor

@Jake-Carter Jake-Carter left a 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

Libraries/MiscDrivers/EEPROM/eeprom_24lc256_driver.c Outdated Show resolved Hide resolved
Libraries/MiscDrivers/EEPROM/eeprom_24lc256_driver.h Outdated Show resolved Hide resolved
Libraries/MiscDrivers/EEPROM/eeprom_24lc256_driver.c Outdated Show resolved Hide resolved
@@ -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,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Examples/MAX32655/I2C_EEPROM/main.c Outdated Show resolved Hide resolved
@Jake-Carter
Copy link
Contributor

Seems to be suffering from #601

Verify Register workflow can be ignored

@Jake-Carter
Copy link
Contributor

@sihyung-maxim / @Jacob-Scheiffler please take a look at this when you have the chance

Copy link
Contributor

@lorne-maxim lorne-maxim left a 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.

@Jacob-Scheiffler Jacob-Scheiffler merged commit af061f2 into main Nov 13, 2023
7 of 8 checks passed
@Jacob-Scheiffler Jacob-Scheiffler deleted the add_24lc256_eeprom_driver_and_Max32655example branch November 13, 2023 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32655 Related to the MAX32655 (ME17)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants