modm API documentation
|
Classes | |
class | modm::platform::IntHandler |
Macros | |
#define | MODM_EXTINT_HANDLER_STORAGE sizeof(void*) |
Enums | |
enum | modm::platform::IntPriority : uint8_t { Highest = 0x00, Default = 0x80, Lowest = 0xff } |
enum | InputTrigger : uint32_t { None = 0x00u, LowLevel = 0x01u, HighLevel = 0x02u, BothLevels = LowLevel | HighLevel, FallingEdge = 0x04u, RisingEdge = 0x08u, BothEdges = FallingEdge | RisingEdge, All = BothLevels | BothEdges } |
lbuild module: modm:platform:extint
This driver provides an API for configuring all IRQ lines via register access.
Each core can register callbacks in the same IntHandler, but for the different pins (current implementation's constraint).
Also, enable/disable and connect/disconnect calls affect the NVIC of the executing core only.
The callback is implemented using modm::inplace_function
, therefore uses no heap, but has a fixed storage size of sizeof(void*)
by default. You can increase this storage size by defining a new global storage size MODM_EXTINT_HANDLER_STORAGE=bytes
in your project.xml
:
You can explicitly enable or disable handling of the specific IRQ type in your project.xml
:
Generated with: yes in [yes, no]
Generated with: no in [yes, no]
enum modm::platform::IntPriority : uint8_t |
Priority level of 0-192 in steps of 64 for each interrupt. A higher level corresponds to a lower priority, so level 0 is the highest programmable interrupt priority. ... The processor implements only bits[7:6] of each field, bits [5:0] read as zero and ignore writes. This means writing 255 to a priority register saves value 192 to the register.
https://developer.arm.com/documentation/dui0662/b/Cortex-M0–Peripherals/Nested-Vectored-Interrupt-Controller https://developer.arm.com/documentation/dui0662/b/Cortex-M0–Peripherals/Nested-Vectored-Interrupt-Controller/Interrupt-Priority-Registers