5//GPIO_INPUT and GPIO_OUTPUT values when calling the setDigitalDirection() macro.
6//TODO: these are inverted with respect to INPUT_PIN and OUTPUT_PIN defined in GPIOcontrol.h,
7//which might lead to unexpected results in case someone uses those in place of these or viceversa
8#define GPIO_INPUT 1
9#define GPIO_OUTPUT 0
10#define GPIO_HIGH 1
11#define GPIO_LOW 0
12//mapping GPIO numbers to header pins
13//if you want to use different pins/ordering, define here new pins. The ordering here is NOT binding
14enum
15 {
16// these are for PocketBeagle (BelaMini)
17 P2_01_GPIO_NO = 50,
18 P2_02_GPIO_NO = 59,
19 P2_04_GPIO_NO = 58,
20 P2_06_GPIO_NO = 57,
21 P2_08_GPIO_NO = 60,
22 P2_10_GPIO_NO = 52,
23 P2_18_GPIO_NO = 47,
24 P2_20_GPIO_NO = 64,
25 P2_22_GPIO_NO = 46,
26 P2_24_GPIO_NO = 44,
27 P2_25_GPIO_NO = 41,
28 P2_27_GPIO_NO = 40,
29 P2_35_GPIO_NO = 86,
30 P1_35_GPIO_NO = 88,
31 P1_32_GPIO_NO = 42,
32 P1_30_GPIO_NO = 43,
33 };
34
35enum
36 {
37// these are for BeagleBone (Everything else)
38 P8_07_GPIO_NO = 66,
39 P8_08_GPIO_NO = 67,
40 P8_09_GPIO_NO = 69,
41 P8_10_GPIO_NO = 68,
42 P8_11_GPIO_NO = 45,
43 P8_12_GPIO_NO = 44,
44 P9_12_GPIO_NO = 60,
45 P9_14_GPIO_NO = 50,
46 P8_15_GPIO_NO = 47,
47 P8_16_GPIO_NO = 46,
48 P9_16_GPIO_NO = 51,
49 P8_18_GPIO_NO = 65,
50 P8_27_GPIO_NO = 86,
51 P8_28_GPIO_NO = 88,
52 P8_29_GPIO_NO = 87,
53 P8_30_GPIO_NO = 89,
54 };
55
56//mapping pin headers to bits in the digital word.
57//used in the declaration of short int digitalPins[NUM_DIGITALS] below, which is used in PRU::prepareGPIO to export the pins
58//if you want to use different pins, declare them above and use them here
59//The ordering here is NOT binding, but if you want to use a different ordering, please change it here as well as below and in the PRU, for consistency