-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/sam0_common: merge GPIO driver #7559
Conversation
Tested on Arduino Zero, I could make on-board LED blink using SAUL and |
@aabadie I rebased this PR as you wanted. |
I'll try to test this today. |
@dylad, I tested some networking functions (just ping nodes) with samr21-xpro (with EXTI inside) and it's broken with this PR. I have no idea why. |
@aabadie Good to know. I'll investigate tonight & submit a fix (if I find what's wrong) |
@dylad, looking at your changes you seem to have mixed a bit the order of the different initialization steps for the samd21. That's probably the reason of my failing test. |
Yes I wanted to avoid as much #ifdef as I can. |
@aabadie I've arranged the calls order. EXTI should work now. |
@dylad tried this on my samd21 board and it appears to work. One note is that for EXTI the code calls for generic clock 2 which is either the ultra low power internal or external 32 kHz if you use RTC/RTT. It should work either way but there probably should be a comment or something indicating the choice. If I can get some traction, PR #7315 does attempt to organize these generic clock calls. |
@photonthunder Thanks for testing, I'll add a comment regarding the generic clock. I'm sure we can optimize a bit more this PR but I'll wait to have the required hardware to do so. I'll also work on an extension to #7315 for SAML21 whenever I find some time :) Note: I re-tested this PR on saml21-xpro -> works like a charm |
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.
Tested on samr21-xpro, works now.
ACK, please squash
@aabadie Squashed. |
I pursuit my effort to merge samd21 & saml21 drivers together.
Both files were almost the same.
I just move EXTI lines definitions to
cpu/sam0_common/include/periph_cpu_common.h
instead ofcpu/samx21/periph/gpio.c
because this is where they should belong IMHO. (Maybe I'm wrong ?)What do you think ?
Tested on
saml21-xpro
withtests/periph_gpio
(2 EXTI + 2 GPIO out). Everything was fine but I'll need help for testing on a samd21 based board.Cheers.