cpu/saml21: i2c support for the saml21e18b#6205
cpu/saml21: i2c support for the saml21e18b#6205ant9000 wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
|
The actual changes to the i2c driver code look sane to me (except some minor style things :-) ). I must say I lost track slightly of the refactored samd/l21 code -> But I think there is some duplication introduced by pulling in all those Atmel headers. If I am not completely off, then those headers exist already in How about the following: I will propose a cleanup PR later today, putting the saml/d21 code in the same style as some other CPUs, and you can then put this PR on top of the re-structured base code and we should be able to easily see if all needed headers are present?! |
|
Ok, here it is: #6223. Would you mind having a look at those changes and then see if that would simplify this PR, also?! Thx |
|
oh, and I took the freedom to rename the PR to |
|
Yes, there is code duplication among cpu/sam21_common/ and cpu/saml21 - a bunch of Atmel header files, not entirely equivalent but with the same purpose, are included in both locations. The cmsis Atmel includes for samd21 and samr21 have been moved in sam21_common not long ago, but no such thing happened for saml21. My I2C driver pulls in the cmsis header files following the unification idea. The ones under cpu/saml21/include/atmel/ still need to be weeded out entirely as was done for samd21 - but that needs (at least) some refactoring for sercom or saml21 stuff won't compile. AFAICT, #6223 should not affect this PR that much - I can try and merge it as soon as it is approved. Antonio |
|
This PR might be closed - an updated patch based on #6242 is ready and I will PR it ASAP. |
|
Thx for the information! |
My version of I2C support for SAM L21 - I've pulled in Atmel includes under cpu/sam21_common/, and simplified a bit the solution provided by @dylad in #5992.