Open alignan opened 8 years ago
How about using the arduino GPIO API as a starting point?
[rant] God no! [/rant]
Joking :smile:
We would need that, not only for GPIO, but for all drivers. CMSIS aims at standardizing APIs for Cortex-M, but this could probably apply to other platforms too.
Regarding GPIOs, there are two parts:
We have been using the RIOT API for GPIOs 1 in our Mulle Contiki port 2, (as well as most other in-CPU peripherals) to reduce the maintenance burden and to make apps easily portable between the two systems. We have also modified the Makefiles to build the RIOT drivers in a separate archive so it is easily replaceable (to clearly show the intent to comply with the LGPL and its requirements on modifying and relinking).
Thanks @gebart! I have also reviewed the RIOT API while porting the RE-Mote
and is OK. The link to your Contiki port seems broken.
@bthebaudeau I will check U-Boot also, I only used it briefly but having something close to Unix users seems a good idea.
Thanks, @gebart! I have also reviewed the RIOT API while porting the RE-Mote; and, it is OK. The link to your Contiki port seems broken.
Yes, he used an unusual style of writing URL links. Then, he put a phrase in parentheses next to the second link. Unfortunately, that made the phrase look like a standard Markdown link. Here is his comment again, written in the standard Markdown style:
We have been using the RIOT API for GPIOs [1] in our Mulle Contiki port [2] (as well as most other in-CPU peripherals) to reduce the maintenance burden and to make apps easily portable between the two systems. We have also modified the Makefiles to build the RIOT drivers in a separate archive so it is easily replaceable (to clearly show the intent to comply with the LGPL and its requirements on modifying and relinking).
sorry about that, I have edited my comment above to fix the links
More than an issue this is a call for discussion and comments.
CPU implementations define their own GPIO functions and calls, but I think we need to have an unified GPIO API, even if the current register-based macros are more efficient. This will allow more portable implementations of sensors and actuators, as well as implement guidelines for people contributing their own platforms.