37 #define GPIO0 (1 << 0)
38 #define GPIO1 (1 << 1)
39 #define GPIO2 (1 << 2)
40 #define GPIO3 (1 << 3)
41 #define GPIO4 (1 << 4)
42 #define GPIO5 (1 << 5)
43 #define GPIO6 (1 << 6)
44 #define GPIO7 (1 << 7)
45 #define GPIO8 (1 << 8)
46 #define GPIO9 (1 << 9)
47 #define GPIO10 (1 << 10)
48 #define GPIO11 (1 << 11)
49 #define GPIO12 (1 << 12)
50 #define GPIO13 (1 << 13)
51 #define GPIO14 (1 << 14)
52 #define GPIO15 (1 << 15)
53 #define GPIO16 (1 << 16)
54 #define GPIO17 (1 << 17)
55 #define GPIO18 (1 << 18)
56 #define GPIO19 (1 << 19)
57 #define GPIO20 (1 << 20)
58 #define GPIO21 (1 << 21)
59 #define GPIO22 (1 << 22)
60 #define GPIO23 (1 << 23)
61 #define GPIO24 (1 << 24)
62 #define GPIO25 (1 << 25)
63 #define GPIO26 (1 << 26)
64 #define GPIO27 (1 << 27)
65 #define GPIO28 (1 << 28)
66 #define GPIO29 (1 << 29)
67 #define GPIO30 (1 << 30)
68 #define GPIO31 (1 << 31)
80 }
else if (port == 1) {
94 }
else if (port == 1) {
108 }
else if (port == 1) {
122 }
else if (port == 1) {
137 IO0CLR = set_gpios & gpios;
139 IO0SET = ~set_gpios & gpios;
140 }
else if (port == 1) {
143 IO1CLR = set_gpios & gpios;
145 IO1SET = ~set_gpios & gpios;
158 }
else if (port == 1) {
static void gpio_toggle(uint32_t port, uint32_t gpios)
Toggle a one or more pins of the given GPIO port.
void gpio_setup_output(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as outputs.
void gpio_setup_input(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as inputs.
void gpio_set(uint32_t port, uint16_t pin)
Set a gpio output to high level.
void gpio_clear(uint32_t port, uint16_t pin)
Clear a gpio output to low level.
uint16_t gpio_get(uint32_t gpioport, uint16_t gpios)
Read a gpio value.