39 #define GPIO0 (1 << 0)
40 #define GPIO1 (1 << 1)
41 #define GPIO2 (1 << 2)
42 #define GPIO3 (1 << 3)
43 #define GPIO4 (1 << 4)
44 #define GPIO5 (1 << 5)
45 #define GPIO6 (1 << 6)
46 #define GPIO7 (1 << 7)
47 #define GPIO8 (1 << 8)
48 #define GPIO9 (1 << 9)
49 #define GPIO10 (1 << 10)
50 #define GPIO11 (1 << 11)
51 #define GPIO12 (1 << 12)
52 #define GPIO13 (1 << 13)
53 #define GPIO14 (1 << 14)
54 #define GPIO15 (1 << 15)
55 #define GPIO16 (1 << 16)
56 #define GPIO17 (1 << 17)
57 #define GPIO18 (1 << 18)
58 #define GPIO19 (1 << 19)
59 #define GPIO20 (1 << 20)
60 #define GPIO21 (1 << 21)
61 #define GPIO22 (1 << 22)
62 #define GPIO23 (1 << 23)
63 #define GPIO24 (1 << 24)
64 #define GPIO25 (1 << 25)
65 #define GPIO26 (1 << 26)
66 #define GPIO27 (1 << 27)
67 #define GPIO28 (1 << 28)
68 #define GPIO29 (1 << 29)
69 #define GPIO30 (1 << 30)
70 #define GPIO31 (1 << 31)
82 }
else if (port == 1) {
96 }
else if (port == 1) {
110 }
else if (port == 1) {
124 }
else if (port == 1) {
139 IO0CLR = set_gpios & gpios;
141 IO0SET = ~set_gpios & gpios;
142 }
else if (port == 1) {
145 IO1CLR = set_gpios & gpios;
147 IO1SET = ~set_gpios & gpios;
160 }
else if (port == 1) {
ioportid_t gpio_port_t
Abstract gpio port type for hardware independent part.
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.
static void gpio_toggle(gpio_port_t port, uint32_t gpios)
Toggle a one or more pins of the given GPIO port.
uint16_t gpio_get(uint32_t gpioport, uint16_t gpios)
Read a gpio value.