libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
gpio.c
Go to the documentation of this file.
1/** @defgroup gpio_file General-Purpose I/O
2 *
3 * @ingroup MSP432E4xx
4 *
5 * @brief libopencm3 MSP432E4xx General Purpose Input/Outputs
6 *
7 * @version 1.0.0
8 *
9 * @date 23 September 2018
10 *
11 * LGPL License Terms @ref lgpl_license
12 */
13
14/*
15 * This file is part of the libopencm3 project.
16 *
17 * Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>
18 * Copyright (C) 2013 Alexandru Gagniuc <mr.nuke.me@gmail.com>
19 * Copyright (C) 2018 Dmitry Rezvanov <dmitry.rezvanov@yandex.ru>
20 *
21 * This library is free software: you can redistribute it and/or modify
22 * it under the terms of the GNU Lesser General Public License as published by
23 * the Free Software Foundation, either version 3 of the License, or
24 * (at your option) any later version.
25 *
26 * This library is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU Lesser General Public License for more details.
30 *
31 * You should have received a copy of the GNU Lesser General Public License
32 * along with this library. If not, see <http://www.gnu.org/licenses/>.
33 */
34
37
38/** @brief General Purpose Input/Outputs Set Pin Mode
39 *
40 * Sets the Pin Direction, Analog/Digital Mode and Output Pin Pull,
41 * for a set of GPIO pins on a given GPIO port.
42 *
43 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
44 * @param[in] mode Pin mode @ref gpio_mode
45 * - GPIO_MODE_OUTPUT -- Configure pin as output
46 * - GPIO_MODE_INPUT -- Configure pin as input
47 * - GPIO_MODE_ANALOG -- Configure pin as analog function
48 * @param[in] pull_up_down Pin pull up/down configuration @ref gpio_pull_up_down
49 * - GPIO_PUPD_NONE -- Do not pull the pin high or low
50 * - GPIO_PUPD_PULLUP -- Pull the pin high
51 * - GPIO_PUPD_PULLDOWN -- Pull the pin low
52 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
53 * to be set, use bitwise OR '|' to separate them.
54 */
55void gpio_mode_setup(uint32_t gpioport, enum gpio_mode mode,
56 enum gpio_pull_up_down pull_up_down, uint8_t gpios)
57{
58 GPIO_AFSEL(gpioport) &= ~gpios;
59
60 switch (mode) {
62 GPIO_DIR(gpioport) |= gpios;
63 GPIO_DEN(gpioport) |= gpios;
64 GPIO_AMSEL(gpioport) &= ~gpios;
65 break;
66 case GPIO_MODE_INPUT:
67 GPIO_DIR(gpioport) &= ~gpios;
68 GPIO_DEN(gpioport) |= gpios;
69 GPIO_AMSEL(gpioport) &= ~gpios;
70 break;
72 GPIO_AFSEL(gpioport) |= gpios;
73 GPIO_DEN(gpioport) &= ~gpios;
74 GPIO_AMSEL(gpioport) |= gpios;
75 break;
76 default:
77 /* Don't do anything */
78 break;
79 }
80
81 /*
82 * Setting a bit in the GPIO_PDR register clears the corresponding bit
83 * in the GPIO_PUR register, and vice-versa.
84 */
85 switch (pull_up_down) {
87 GPIO_PDR(gpioport) &= ~gpios;
88 GPIO_PUR(gpioport) |= gpios;
89 break;
91 GPIO_PUR(gpioport) &= ~gpios;
92 GPIO_PDR(gpioport) |= gpios;
93 break;
94 case GPIO_PUPD_NONE: /* Fall through */
95 default:
96 GPIO_PUR(gpioport) &= ~gpios;
97 GPIO_PDR(gpioport) &= ~gpios;
98 break;
99 }
100}
101
102/** @brief General Purpose Input/Outputs Set Output Options
103 *
104 * When the pin is set to output mode, this sets the configuration
105 * (open drain/push pull), drive strength, speed and slew rate control,
106 * for a set of GPIO pins on a given GPIO port.
107 *
108 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
109 * @param[in] otype Output driver configuration @ref gpio_output_type
110 * - GPIO_OTYPE_PP -- Configure pin driver as push-pull \n
111 * - GPIO_OTYPE_OD -- Configure pin driver as open drain
112 * @param[in] drive Pin drive strength @ref gpio_drive_strength
113 * - GPIO_DRIVE_2MA -- 2mA drive \n
114 * - GPIO_DRIVE_4MA -- 4mA drive \n
115 * - GPIO_DRIVE_6MA -- 4mA drive \n
116 * - GPIO_DRIVE_8MA -- 8mA drive \n
117 * - GPIO_DRIVE_10MA -- 10mA drive \n
118 * - GPIO_DRIVE_12MA -- 12mA drive
119 * @param[in] slewctl Pin slew rate control select @ref gpio_slew_ctl
120 * @note Available only for 8, 10 and 12-ma drive strength.
121 * - GPIO_SLEW_CTL_ENABLE -- Slew rate control enable
122 * - GPIO_SLEW_CTL_DISABLE -- Slew rate control disable
123 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
124 * to be set, use bitwise OR '|' to separate them.
125 */
126void gpio_set_output_options(uint32_t gpioport,
127 enum gpio_output_type otype,
128 enum gpio_drive_strength drive,
129 enum gpio_slew_ctl slewctl,
130 uint8_t gpios)
131{
132 uint8_t i;
133 uint8_t pin_mask;
134
135 if (otype == GPIO_OTYPE_OD) {
136 GPIO_ODR(gpioport) |= gpios;
137 } else {
138 GPIO_ODR(gpioport) &= ~gpios;
139 }
140
141 GPIO_PP(gpioport) |= GPIO_PP_EDE;
142
143 for (i = 0; i < 8; i++) {
144 pin_mask = (1 << i);
145
146 if (!(gpios & pin_mask)) {
147 continue;
148 }
149
150 GPIO_PC(gpioport) &= ~GPIO_PC_EDM_MASK(i);
152 }
153
154 GPIO_DR4R(gpioport) &= ~gpios;
155 GPIO_DR8R(gpioport) &= ~gpios;
156 GPIO_DR12R(gpioport) &= ~gpios;
157
158 switch (drive) {
159 case GPIO_DRIVE_4MA:
160 GPIO_DR4R(gpioport) |= gpios;
161 break;
162 case GPIO_DRIVE_6MA:
163 GPIO_DR8R(gpioport) |= gpios;
164 break;
165 case GPIO_DRIVE_8MA:
166 GPIO_DR4R(gpioport) |= gpios;
167 GPIO_DR8R(gpioport) |= gpios;
168 break;
169 case GPIO_DRIVE_10MA:
170 GPIO_DR8R(gpioport) |= gpios;
171 GPIO_DR12R(gpioport) |= gpios;
172 break;
173 case GPIO_DRIVE_12MA:
174 GPIO_DR4R(gpioport) |= gpios;
175 GPIO_DR8R(gpioport) |= gpios;
176 GPIO_DR12R(gpioport) |= gpios;
177 break;
178 case GPIO_DRIVE_2MA: /* Fall through */
179 default:
180 /* don't anything */
181 break;
182 }
183
184 if ((slewctl == GPIO_SLEW_CTL_ENABLE) &&
185 ((drive == GPIO_DRIVE_8MA) || (drive == GPIO_DRIVE_10MA) ||
186 (drive == GPIO_DRIVE_12MA))) {
187 GPIO_SLR(gpioport) |= gpios;
188 } else {
189 GPIO_SLR(gpioport) &= ~gpios;
190 }
191}
192
193/** @brief General Purpose Input/Outputs Set Alternate Function Selection
194 *
195 * Mux the pin or group of pins to the given alternate function. Note that a
196 * number of pins may be set but only with a single AF number.
197 *
198 * Because AF0 is not used on the MSP432E4,
199 * passing GPIO_AF_DISABLE as the alt_func_num parameter will disable
200 * the alternate function of the given pins.
201 *
202 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
203 * @param[in] alt_func_num Pin alternate function number or GPIO_AF_DISABLE to
204 * disable the alternate function multiplexing.
205 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
206 * to be set, use bitwise OR '|' to separate them.
207 */
208void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint8_t gpios)
209{
210 uint32_t pctl32;
211 uint8_t pin_mask;
212 uint8_t i;
213
214 /* Did we mean to disable the alternate function? */
215 if (alt_func_num == 0) {
216 GPIO_AFSEL(gpioport) &= ~gpios;
217 return;
218 }
219
220 /* Enable the alternate function */
221 GPIO_AFSEL(gpioport) |= gpios;
222
223 /* Now take care of the actual multiplexing */
224 pctl32 = GPIO_PCTL(gpioport);
225 for (i = 0; i < 8; i++) {
226 pin_mask = (1 << i);
227
228 if (!(gpios & pin_mask)) {
229 continue;
230 }
231
232 pctl32 &= ~GPIO_PCTL_MASK(i);
233 pctl32 |= GPIO_PCTL_AF(i, (alt_func_num & 0xf));
234 }
235
236 GPIO_PCTL(gpioport) = pctl32;
237}
238
239/** @brief General Purpose Input/Outputs Configure Interrupt Trigger
240 *
241 * Sets the trigger level/edge, for a set of GPIO pins on a given GPIO port.
242 *
243 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
244 * @param[in] trigger Trigger configuration @ref gpio_trigger
245 * - GPIO_TRIG_LVL_LOW -- Trigger on low level
246 * - GPIO_TRIG_LVL_HIGH -- Trigger on high level
247 * - GPIO_TRIG_EDGE_FALL -- Trigger on falling edges
248 * - GPIO_TRIG_EDGE_RISE -- Trigger on rising edges
249 * - GPIO_TRIG_EDGE_BOTH -- Trigger on all edges
250 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
251 * to be configure, use bitwise OR '|' to separate them.
252 */
253void gpio_configure_trigger(uint32_t gpioport, enum gpio_trigger trigger,
254 uint8_t gpios)
255{
256 switch (trigger) {
258 GPIO_IS(gpioport) |= gpios;
259 GPIO_IEV(gpioport) &= ~gpios;
260 break;
262 GPIO_IS(gpioport) |= gpios;
263 GPIO_IEV(gpioport) |= gpios;
264 break;
266 GPIO_IS(gpioport) &= ~gpios;
267 GPIO_IBE(gpioport) &= ~gpios;
268 GPIO_IEV(gpioport) &= ~gpios;
269 break;
271 GPIO_IS(gpioport) &= ~gpios;
272 GPIO_IBE(gpioport) &= ~gpios;
273 GPIO_IEV(gpioport) |= gpios;
274 break;
276 GPIO_IS(gpioport) &= ~gpios;
277 GPIO_IBE(gpioport) |= gpios;
278 break;
279 default:
280 /* Don't do anything */
281 break;
282 }
283}
284
285/** @brief General Purpose Input/Outputs Set a Group of Pins Atomic
286 *
287 * Set one or more pins of the given GPIO port to 1 in an atomic operation.
288 *
289 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
290 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
291 * to be changed, use bitwise OR '|' to separate them.
292 */
293void gpio_set(uint32_t gpioport, uint8_t gpios)
294{
295 GPIO_DATA(gpioport)[gpios] = 0xFF;
296}
297
298/** @brief General Purpose Input/Outputs Clear a Group of Pins Atomic
299 *
300 * Clear one or more pins of the given GPIO port to 0 in an atomic operation.
301 *
302 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
303 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
304 * to be changed, use bitwise OR '|' to separate them.
305 */
306void gpio_clear(uint32_t gpioport, uint8_t gpios)
307{
308 GPIO_DATA(gpioport)[gpios] = 0x0;
309}
310
311/** @brief General Purpose Input/Outputs Read a Group of Pins
312 *
313 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
314 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
315 * to be read, use bitwise OR '|' to separate them.
316 *
317 * @return Unsigned int8 value of the pin values. The bit position of the pin
318 value returned corresponds to the pin number.
319 */
320uint8_t gpio_get(uint32_t gpioport, uint8_t gpios)
321{
322 return (uint8_t)GPIO_DATA(gpioport)[gpios];
323}
324
325/** @brief General Purpose Input/Outputs Toggle a Group of Pins
326 *
327 * Toggle one or more pins of the given GPIO port.
328 * The non-toggled pins are not affected.
329 *
330 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
331 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
332 * to be changed, use bitwise OR '|' to separate them.
333 */
334void gpio_toggle(uint32_t gpioport, uint8_t gpios)
335{
336 /* The mask makes sure we only toggle the GPIOs we want to */
337 GPIO_DATA(gpioport)[gpios] ^= GPIO_ALL;
338}
339
340/** @brief General Purpose Input/Outputs Read from a Port
341 *
342 * Read the current value of the given GPIO port.
343 *
344 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
345 *
346 * @return Unsigned int8. The value held in the specified GPIO port.
347 */
348uint8_t gpio_port_read(uint32_t gpioport)
349{
350 return (uint8_t)GPIO_DATA(gpioport)[GPIO_ALL];
351}
352
353/** @brief General Purpose Input/Outputs Write to a Port
354 *
355 * Write a value to the given GPIO port.
356 *
357 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
358 * @param[in] data Unsigned int8. The value to be written to the GPIO port.
359 */
360void gpio_port_write(uint32_t gpioport, uint8_t data)
361{
362 GPIO_DATA(gpioport)[GPIO_ALL] = data;
363}
364
365/** @brief General Purpose Input/Outputs Enable Interrupts on specified pins
366 *
367 * Enable interrupts on the specified GPIO pins.
368 *
369 * @note The NVIC must be enabled and properly configured for the interrupt
370 * to be routed to the CPU.
371 *
372 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base)
373 * @param[in] gpios Pin identifiers @ref gpio_pin_id.
374 * Pins whose interrupts to enable.
375 * If multiple pins are to be enable interrupt,
376 * use bitwise OR '|' to separate them.
377 */
378void gpio_enable_interrupts(uint32_t gpioport, uint8_t gpios)
379{
380 GPIO_IM(gpioport) |= gpios;
381}
382
383/** @brief General Purpose Input/Outputs Disable interrupts on specified pins
384 *
385 * Disable interrupts on the specified GPIO pins.
386 *
387 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
388 * @param[in] gpios Pin identifiers @ref gpio_pin_id.
389 * Pins whose interrupts to disable.
390 * If multiple pins are to be disable interrupt,
391 * use bitwise OR '|' to separate them.
392 */
393void gpio_disable_interrupts(uint32_t gpioport, uint8_t gpios)
394{
395 GPIO_IM(gpioport) &= ~gpios;
396}
397
398/** @brief General Purpose Input/Outputs Unlock The Commit Control
399 *
400 * Unlocks the commit control of the given pin or group of pins. If a pin is a
401 * JTAG/SWD or NMI, the pin may then be reconfigured as a GPIO pin. If the pin
402 * is not locked by default, this has no effect.
403 *
404 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
405 * @param[in] gpios Pin identifiers @ref gpio_pin_id.
406 * If multiple pins are to be unlock,
407 * use bitwise OR '|' to separate them.
408 */
409void gpio_unlock_commit(uint32_t gpioport, uint8_t gpios)
410{
411 /* Unlock the GPIO_CR register */
413 /* Enable committing changes */
414 GPIO_CR(gpioport) |= gpios;
415 /* Lock the GPIO_CR register */
416 GPIO_LOCK(gpioport) = ~GPIO_LOCK_UNLOCK_CODE;
417}
418
419/** @brief General Purpose Input/Outputs Determine if interrupt is generated
420 * by the given pin
421 *
422 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
423 * @param[in] gpios Source pin identifiers @ref gpio_pin_id.
424 * If multiple pins are to be check,
425 * use bitwise OR '|' to separate them.
426 *
427 * @return Unsigned int8. The bit position of the pin
428 value returned corresponds to the pin number.
429 */
430uint8_t gpio_is_interrupt_source(uint32_t gpioport, uint8_t gpios)
431{
432 return GPIO_MIS(gpioport) & gpios;
433}
434
435/** @brief General Purpose Input/Outputs Mark Interrupt as Serviced
436 *
437 * After an interrupt is services, its flag must be cleared. If the flag is not
438 * cleared, then execution will jump back to the start of the ISR after the ISR
439 * returns.
440 *
441 * @param[in] gpioport GPIO block register address base @ref gpio_reg_base
442 * @param[in] gpios Pin identifiers @ref gpio_pin_id. If multiple pins are
443 * to be clear interrupt flag, use bitwise OR '|' to separate them.
444 */
445void gpio_clear_interrupt_flag(uint32_t gpioport, uint8_t gpios)
446{
447 GPIO_ICR(gpioport) |= gpios;
448}
void gpio_unlock_commit(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Unlock The Commit Control.
Definition: gpio.c:409
void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint8_t gpios)
General Purpose Input/Outputs Set Alternate Function Selection.
Definition: gpio.c:208
gpio_drive_strength
GPIO Drive Strength Definitions.
Definition: gpio.h:2473
void gpio_clear(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Clear a Group of Pins Atomic.
Definition: gpio.c:306
void gpio_clear_interrupt_flag(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Mark Interrupt as Serviced.
Definition: gpio.c:445
void gpio_port_write(uint32_t gpioport, uint8_t data)
General Purpose Input/Outputs Write to a Port.
Definition: gpio.c:360
gpio_mode
GPIO Mode Definitions.
Definition: gpio.h:2453
void gpio_enable_interrupts(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Enable Interrupts on specified pins.
Definition: gpio.c:378
void gpio_configure_trigger(uint32_t gpioport, enum gpio_trigger trigger, uint8_t gpios)
General Purpose Input/Outputs Configure Interrupt Trigger.
Definition: gpio.c:253
uint8_t gpio_is_interrupt_source(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Determine if interrupt is generated by the given pin.
Definition: gpio.c:430
void gpio_mode_setup(uint32_t gpioport, enum gpio_mode mode, enum gpio_pull_up_down pull_up_down, uint8_t gpios)
General Purpose Input/Outputs Set Pin Mode.
Definition: gpio.c:55
uint8_t gpio_port_read(uint32_t gpioport)
General Purpose Input/Outputs Read from a Port.
Definition: gpio.c:348
uint8_t gpio_get(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Read a Group of Pins.
Definition: gpio.c:320
void gpio_disable_interrupts(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Disable interrupts on specified pins.
Definition: gpio.c:393
gpio_pull_up_down
GPIO Pull-Up/Pull-Down Definitions.
Definition: gpio.h:2460
void gpio_toggle(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Toggle a Group of Pins.
Definition: gpio.c:334
gpio_output_type
GPIO Output Type Definitions.
Definition: gpio.h:2467
void gpio_set(uint32_t gpioport, uint8_t gpios)
General Purpose Input/Outputs Set a Group of Pins Atomic.
Definition: gpio.c:293
gpio_trigger
GPIO Trigger Level/Edge Definitions.
Definition: gpio.h:2489
void gpio_set_output_options(uint32_t gpioport, enum gpio_output_type otype, enum gpio_drive_strength drive, enum gpio_slew_ctl slewctl, uint8_t gpios)
General Purpose Input/Outputs Set Output Options.
Definition: gpio.c:126
gpio_slew_ctl
GPIO Slew Control Definitions.
Definition: gpio.h:2483
@ GPIO_DRIVE_6MA
6mA drive
Definition: gpio.h:2476
@ GPIO_DRIVE_8MA
8mA drive
Definition: gpio.h:2477
@ GPIO_DRIVE_10MA
10mA drive
Definition: gpio.h:2478
@ GPIO_DRIVE_12MA
12mA drive
Definition: gpio.h:2479
@ GPIO_DRIVE_2MA
2mA drive
Definition: gpio.h:2474
@ GPIO_DRIVE_4MA
4mA drive
Definition: gpio.h:2475
@ GPIO_MODE_ANALOG
Configure pin as analog function.
Definition: gpio.h:2456
@ GPIO_MODE_INPUT
Configure pin as input.
Definition: gpio.h:2455
@ GPIO_MODE_OUTPUT
Configure pin as output.
Definition: gpio.h:2454
@ GPIO_PUPD_PULLUP
Pull the pin high.
Definition: gpio.h:2462
@ GPIO_PUPD_PULLDOWN
Pull the pin low.
Definition: gpio.h:2463
@ GPIO_PUPD_NONE
Do not pull the pin high or low.
Definition: gpio.h:2461
@ GPIO_OTYPE_OD
Open drain configuration.
Definition: gpio.h:2469
@ GPIO_TRIG_EDGE_BOTH
Both edges trigger.
Definition: gpio.h:2494
@ GPIO_TRIG_EDGE_FALL
Falling edge trigger.
Definition: gpio.h:2492
@ GPIO_TRIG_LVL_LOW
Level trigger, signal low.
Definition: gpio.h:2490
@ GPIO_TRIG_LVL_HIGH
Level trigger, signal high.
Definition: gpio.h:2491
@ GPIO_TRIG_EDGE_RISE
Rising edge trigger.
Definition: gpio.h:2493
@ GPIO_SLEW_CTL_ENABLE
Slew rate control enable.
Definition: gpio.h:2484
#define GPIO_LOCK_UNLOCK_CODE
Definition: gpio.h:261
#define GPIO_PC_EDM_FULL_RANGE
Full range, 2, 4, 6, 8, 10 and 12 mA are available.
Definition: gpio.h:343
#define GPIO_PC_EDM(n, mode)
Extended Drive Mode Bit N.
Definition: gpio.h:333
#define GPIO_PCTL_AF(pin, af)
GPIO Port Control Set AF for Pin.
Definition: gpio.h:270
#define GPIO_ALL
GPIO All Pins Identifier.
Definition: gpio.h:99
#define GPIO_PP_EDE
Extended Drive Enable.
Definition: gpio.h:326
#define GPIO_MIS(port)
GPIO Masked Interrupt Status.
Definition: gpio.h:151
#define GPIO_PC(port)
GPIO Peripheral Configuration.
Definition: gpio.h:200
#define GPIO_DR8R(port)
GPIO 8-mA Drive Select.
Definition: gpio.h:161
#define GPIO_AFSEL(port)
GPIO Alternate Function Select.
Definition: gpio.h:155
#define GPIO_ODR(port)
GPIO Open Drain Select.
Definition: gpio.h:163
#define GPIO_DEN(port)
GPIO Digital Enable.
Definition: gpio.h:171
#define GPIO_ICR(port)
GPIO Interrupt Clear.
Definition: gpio.h:153
#define GPIO_PUR(port)
GPIO Pull-Up Select.
Definition: gpio.h:165
#define GPIO_AMSEL(port)
GPIO Analog Mode Select.
Definition: gpio.h:177
#define GPIO_PDR(port)
GPIO Pull-Down Select.
Definition: gpio.h:167
#define GPIO_IBE(port)
GPIO Interrupt Both Edges.
Definition: gpio.h:143
#define GPIO_CR(port)
GPIO Commit.
Definition: gpio.h:175
#define GPIO_DIR(port)
GPIO Direction.
Definition: gpio.h:139
#define GPIO_DR4R(port)
GPIO 4-mA Drive Select.
Definition: gpio.h:159
#define GPIO_PP(port)
GPIO Peripheral Property.
Definition: gpio.h:198
#define GPIO_SLR(port)
GPIO Slew Rate Control Select.
Definition: gpio.h:169
#define GPIO_LOCK(port)
GPIO Lock.
Definition: gpio.h:173
#define GPIO_DATA(port)
GPIO Data.
Definition: gpio.h:137
#define GPIO_PCTL(port)
GPIO Port Control.
Definition: gpio.h:179
#define GPIO_DR12R(port)
GPIO 12-mA Drive Select.
Definition: gpio.h:187
#define GPIO_IM(port)
GPIO Interrupt Mask.
Definition: gpio.h:147
#define GPIO_IEV(port)
GPIO Interrupt Event.
Definition: gpio.h:145
#define GPIO_IS(port)
GPIO Interrupt Sense.
Definition: gpio.h:141