-
Notifications
You must be signed in to change notification settings - Fork 2.1k
periph/gpio: support for extension API #12333
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
Changes from all commits
377d838
9934c86
9a95ef9
af28d82
04b6405
cf2714c
54128bf
160ff7e
7d28f3e
edc275a
174bfa7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,19 +35,19 @@ extern "C" { | |
| * @{ | ||
| */ | ||
| #define HAVE_GPIO_T | ||
| typedef uint8_t gpio_t; | ||
| typedef uint16_t gpio_t; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is going to have a performance penalty, as the ATmegas are 8bit. I think the defines in But if this increases maintenance effort and/or lines of code more than a bit, I'd say using 16bit on ATmesags is fine. (The Arduino community are also using
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know. But ATmega 2560 defines 10 ports and
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe then 8 bit unless ATmega2560 is used?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be possible in that way. |
||
| /** @} */ | ||
| #endif | ||
|
|
||
| /** | ||
| * @brief Definition of a fitting UNDEF value | ||
| */ | ||
| #define GPIO_UNDEF (0xff) | ||
| #define GPIO_UNDEF (0xffff) | ||
|
|
||
| /** | ||
| * @brief Define a CPU specific GPIO pin generator macro | ||
| */ | ||
| #define GPIO_PIN(x, y) ((x << 4) | y) | ||
| #define GPIO_PIN(x, y) ((x << 4) | y) | ||
|
|
||
| /** | ||
| * @brief Override the GPIO flanks | ||
|
|
||
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.
Unrelated. (If you split this up into a separate PR, I'll ACK and merge that right away.)