circuitpython/ports/nrf/boards/nrf52_prefix.c
arturo182 c2d4d0a10b nrf: Simplify pin generation and definition
This commit cleans up the pin generation code, all the pins and their
AF (only ADC, for now) are specified in nrf52_af.csv and board use their
own csv file to specify which pins are available on that board and if
they have any special names.
2018-06-20 23:26:32 +02:00

17 lines
356 B
C

// nrf52_prefix.c becomes the initial portion of the generated pins file.
#include <stdio.h>
#include "py/obj.h"
#include "py/mphal.h"
#include "pin.h"
#define PIN(p_name, p_port, p_pin, p_adc_channel) \
{ \
{ &mcu_pin_type }, \
.name = MP_QSTR_ ## p_name, \
.port = (p_port), \
.pin = (p_pin), \
.adc_channel = (p_adc_channel), \
}