| 1 |
// ra_pin_prefix.c becomes the initial portion of the generated pins file. |
| 2 |
|
| 3 |
#include <stdio.h> |
| 4 |
|
| 5 |
#include "py/obj.h" |
| 6 |
#include "py/mphal.h" |
| 7 |
#include "extmod/modmachine.h" |
| 8 |
#include "pin.h" |
| 9 |
|
| 10 |
#define PIN_ADC(p_name, p_pin, adc_bits, adc_channel) \ |
| 11 |
{ \ |
| 12 |
{ &machine_pin_type }, \ |
| 13 |
.name = MP_QSTR_##p_name, \ |
| 14 |
.pin = p_pin, \ |
| 15 |
.bit = adc_bits, \ |
| 16 |
.channel = adc_channel \ |
| 17 |
} |
| 18 |
|
| 19 |
#define PIN(p_name, p_pin, p_adc) \ |
| 20 |
{ \ |
| 21 |
{ &machine_pin_type }, \ |
| 22 |
.name = MP_QSTR_##p_name, \ |
| 23 |
.pin = p_pin, \ |
| 24 |
.ad = p_adc, \ |
| 25 |
} |