Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
exti.h
Go to the documentation of this file.
1
8#ifndef NEXUS_EXTI_H
9#define NEXUS_EXTI_H
10
11#include "nexus/core/time.h"
12#include "nexus/io/wake.h"
13#ifdef __cplusplus
14extern "C" {
15#endif
22#define NX_EXTI_EVENT_LOSS 1u
23#define NX_EXTI_EVENT_COALESCED 2u
41
48typedef struct {
49 nx_result_t (*read)(void* context, nx_exti_event_t* events, size_t capacity,
50 size_t* count);
51 nx_result_t (*stop)(void* context);
52 nx_result_t (*attach_wake)(void* context, const nx_irq_wake_t* wake,
53 uint8_t syscall_ceiling);
55
63 void* context;
64};
65
80 nx_exti_event_t* events, size_t capacity,
81 size_t* count);
116 const nx_irq_wake_t* wake,
117 uint8_t syscall_ceiling);
118#ifdef __cplusplus
119}
120#endif
121
122#endif
nx_exti_edge_t
Definition exti.h:17
@ NX_EXTI_FALLING
Definition exti.h:19
@ NX_EXTI_BOTH
Definition exti.h:20
@ NX_EXTI_RISING
Definition exti.h:18
nx_result_t nx_exti_port_read(const nx_exti_port_t *port, nx_exti_event_t *events, size_t capacity, size_t *count)
Read queued EXTI events from an exact static line binding.
nx_result_t nx_exti_port_attach_wake(const nx_exti_port_t *port, const nx_irq_wake_t *wake, uint8_t syscall_ceiling)
Attach or detach an explicit event/loss IRQ wake target.
struct nx_exti_port nx_exti_port_t
Definition exti.h:16
nx_result_t nx_exti_port_stop(const nx_exti_port_t *port)
Disable the line source, clear pending and drain its handler.
nx_result_t
Operation result; success at submission means admission only.
Definition status.h:21
Edge facts; timestamp precision and coalescing are provider-specific.
Definition exti.h:35
uint8_t line
Definition exti.h:38
nx_time_us_t timestamp_us
Definition exti.h:36
uint32_t flags
Definition exti.h:37
nx_exti_edge_t edge
Definition exti.h:39
Shared read-only methods using one provider state.
Definition exti.h:48
nx_result_t(* attach_wake)(void *context, const nx_irq_wake_t *wake, uint8_t syscall_ceiling)
Definition exti.h:52
nx_result_t(* read)(void *context, nx_exti_event_t *events, size_t capacity, size_t *count)
Definition exti.h:49
nx_result_t(* stop)(void *context)
Definition exti.h:51
Immutable interface pointing to caller-owned state.
Definition exti.h:61
const nx_exti_ops_t * ops
Definition exti.h:62
void * context
Definition exti.h:63
Optional immutable wake target borrowed by an IRQ provider.
Definition wake.h:26
Absolute monotonic microsecond deadlines and wrap extension.
uint64_t nx_time_us_t
Microseconds in one boot/clock domain; no wall-clock semantics.
Definition time.h:20
Explicit borrowed IRQ wake target and syscall-ceiling check.