-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Atmega common mod periph conf #7528
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
Conversation
Why not go all the way here? The common file already contains a lot of `#ifdef' blocks, so why not make them specific to each atmega based board right away? This would be much cleaner... |
@haukepetersen because that would be a shitload of work for me. Just kidding... |
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.
there is also the atmega1281 used in the waspmote-pro, which should be considered here, too, but is currently missing.
* @{ | ||
*/ | ||
#ifdef CPU_ATMEGA328P | ||
#define TIMER_NUMOF (2U) |
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.
looks like there actually only 1 timer, right?
#define TIMER_0_FLAG &TIFR1 | ||
#define TIMER_0_ISRA TIMER1_COMPA_vect | ||
#define TIMER_0_ISRB TIMER1_COMPB_vect | ||
#define TIMER_0_ISRC TIMER1_COMPC_vect |
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.
could be simplified to this line by removing #ifdef CPU_ATMEGA328P
above
From the title I can't tell what this PR is about. Please update. |
Closing because of already restructured boards/common tree. |
This is a preparation for implemeting a PWM driver for the atmeg328p MCU. The periph_conf has not been prepared for board specific configurations.
I just placed a periph_conf.h in the common include directory, which works fine. If it is copied to the board specific include directory then the make system selects that instead.
@miri64 for the board definitions you have placed a empty board.h in every specific include directory and none in the common. Are there reasons to prefer that schema?