Skip to content

Conversation

ant9000
Copy link
Contributor

@ant9000 ant9000 commented Dec 13, 2016

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.

@haukepetersen
Copy link
Contributor

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 cpu/saml21/include/atmel/...?!

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?!

@haukepetersen
Copy link
Contributor

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

@haukepetersen haukepetersen changed the title Saml21e18b i2c cpu/saml21: i2c support for the saml21e18b Dec 15, 2016
@haukepetersen
Copy link
Contributor

oh, and I took the freedom to rename the PR to cpu/saml21: i2c support for the saml21e18b

@ant9000
Copy link
Contributor Author

ant9000 commented Dec 15, 2016

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

@ant9000
Copy link
Contributor Author

ant9000 commented Jan 10, 2017

This PR might be closed - an updated patch based on #6242 is ready and I will PR it ASAP.

@PeterKietzmann
Copy link
Member

Thx for the information!

@ant9000 ant9000 deleted the saml21e18b_i2c branch January 10, 2017 11:07
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

Successfully merging this pull request may close these issues.

3 participants