Hi Jan,

On 13.01.2015 11:13, Jan Wagner wrote:
Hi christian,
i will create the gfx soon. I also wanted to do some testing about the PIN
nunberig.
https://github.com/RIOT-OS/RIOT/blob/master/boards/yunjia-nrf51822/include/periph_conf.h

#define GPIO_0_PIN 7
#define GPIO_1_PIN 8
#define GPIO_2_PIN 9
etc.

I dont get why its starting at 7. i dont own a yunia board.
The rationale for the pin numbering is quite simple: do with it for your board whatever you feel like... :-)

We designed the peripheral drivers in a way, that we do a 1-to-1 mapping between peripherals and pins, meaning that each pin is mapped to exactly one peripheral, so the pin is mapped to one of e.g. SPI or GPIO or UART. For the yunjia board I just decided to use pins 7 to 14 for GPIO for no hard reason. And as the NRF SoC only has one port, it is enough for this platform to just define pins...

So for your board you just change the pin layout to whatever you see fit.

Regarding the LED defines: At least the defines for RED and GREEN must be present, but it is completely ok to leave them blank. The rationale for the hard-coded LED control defines in RIOT is simply that they are often used for timing measurements and for this we try to keep the overhead as low as possible. But if a board does not include LEDs and you don't plan on using them for profiling/debugging, it is completely fine to leave those defines empty.

Let me know if there is anything unclear!

Cheers,
Hauke
_______________________________________________
devel mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/devel

Reply via email to