Module nrf5x::gpio
[−]
[src]
GPIO and GPIOTE (task and events), nRF5x-family
Author
- Philip Levis pal@cs.stanford.edu
- Date: August 18, 2016
Reexports
use core::cell::Cell; |
use core::ops::Index; |
use core::ops::IndexMut; |
use kernel::common::VolatileCell; |
use kernel::hil; |
use peripheral_registers::GPIO; |
use peripheral_registers::GPIO_BASE; |
Structs
| GPIOPin | |
| GpioteRegisters |
The nRF5x doesn't automatically provide GPIO interrupts. Instead, to receive interrupts from a GPIO line, you must allocate a GPIOTE (GPIO Task and Event) channel, and bind the channel to the desired pin. There are 4 channels for the nrf51 and 8 channels for the nrf52. This means that requesting an interrupt can fail, if they are all already allocated. |
| Port |
Constants
| GPIOTE_BASE | |
| NUM_GPIOTE |
Statics
| PORT |
Functions
| GPIO | |
| GPIOTE | |
| allocate_channel |
Allocate a GPIOTE channel |
| find_channel |
Return which channel is allocated to a pin, or -1 if none. |