nuttx/boards/arm/nrf52/nrf52840-dk
Matias N f55a2879ca nrf52 GPIO/GPIOTE: better expose pin interrupt capability
This change improves upon current support for pin interrupts. Before,
a pin interrupt was handled (with nrf52_gpiote_setevent) using one
of the eight available GPIOTE channels. Moreover, it didn't event let
the user specify which channel to use (simply tried to get a free one).
Also, it was buggy since it did not consider unsetting the callback.

Besides GPIOTE channels, there is another way to deal with pin interrupts.
The GPIO peripheral is capable of generating a PORT event
(for the whole GPIO port) depending on the pin SENSE configuration
(HIGH or LOW, or NONE) and GPIO DETECTMODE register
(latching or non-latching).

This change then renames nrf52_gpiote_setevent into nrf52_gpiote_set_ch_event,
maintaining functionality of original function, but now allows specifying
channel (and correctly handles unsetting the callback). Then, a
new nrf52_gpiote_set_pin_event is added, which allows to set a callback
for a given pin. During initialization, interrupt for the PORT event is
enabled and handled in such way that for each pin whose corresponding
bit in LATCH register (indicates the result of pin SENSEing) the
callback for this pin will be invoked. This mechanism means that
every pin can get an ISR. It also avoids using GPIOTE channels for this
purpose which carry higher current consumption.

This new per-pin callback mechanism has some added memory requirement
so it can be disabled and its default is dependant on DEFAULT_SMALL.
When disabled, a callback for the PORT event can be set directly
with nrf52_gpiote_set_port_event

There was only one use of nrf52_gpio_setevent() which was migrated
into nrf52_gpio_set_ch_event() passing channel zero.
2020-11-09 20:23:29 +01:00
..
configs nrf52840-dk: add sx127x example configuration 2020-11-09 08:07:13 -08:00
include nrf52: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
scripts make/expression: improving up asm/C/C++ compile times 2020-11-02 07:53:53 -08:00
src nrf52 GPIO/GPIOTE: better expose pin interrupt capability 2020-11-09 20:23:29 +01:00
Kconfig boards/arm/nrf52/nrf52840-dk: add highpri example configuration 2020-07-18 20:00:52 +01:00
README.txt Merged in raiden00/nuttx_nrf52 (pull request #1096) 2019-12-16 18:35:45 +00:00

nRF52840-DK
===========

README for NuttX port to NRF52840-DK (PCA10056) boards.

Status
======
  Only the basic NSH configuration is supported for now.