Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
user_io_broker.h File Reference

Narrow kernel-invoked user GPIO message contract. More...

Go to the source code of this file.

Data Structures

struct  nx_user_io_message_t
 Untrusted copied message; identity never comes from users. More...
struct  nx_user_io_reply_t
 Fully initialized copied result; value is zero for errors/WRITE. More...
struct  nx_user_io_result_t
 Distinguish admission, cleanup retention and possible effect. More...

Typedefs

typedef struct nx_user_io_broker nx_user_io_broker_t
 Broker and persistent kernel call storage stay provider private.
typedef struct nx_user_io_call nx_user_io_call_t

Enumerations

enum  nx_user_io_constants { NX_USER_IO_ABI = 1U , NX_USER_GPIO_READ = 1U , NX_USER_GPIO_WRITE = 2U }
 Only scalar GPIO operations are admitted by this message ABI. More...

Functions

nx_user_io_result_t nx_user_io_broker_gpio (nx_user_io_broker_t *broker, nx_user_io_call_t *call, const nx_user_io_message_t *message, nx_user_io_reply_t *reply)
 Execute one scalar GPIO message through a trusted gateway.
nx_user_io_result_t nx_user_io_broker_gpio_finish (nx_user_io_broker_t *broker, nx_user_io_call_t *call)
 Retry retained cleanup without reading users or replaying IO.

Detailed Description

Narrow kernel-invoked user GPIO message contract.

Author
Nexus Team
Version
1.0.0
Date
2026-10-11

Definition in file user_io_broker.h.

Typedef Documentation

◆ nx_user_io_broker_t

typedef struct nx_user_io_broker nx_user_io_broker_t

Broker and persistent kernel call storage stay provider private.

Definition at line 44 of file user_io_broker.h.

◆ nx_user_io_call_t

typedef struct nx_user_io_call nx_user_io_call_t

Definition at line 45 of file user_io_broker.h.

Enumeration Type Documentation

◆ nx_user_io_constants

Only scalar GPIO operations are admitted by this message ABI.

Enumerator
NX_USER_IO_ABI 
NX_USER_GPIO_READ 
NX_USER_GPIO_WRITE 

Definition at line 16 of file user_io_broker.h.

Function Documentation

◆ nx_user_io_broker_gpio()

nx_user_io_result_t nx_user_io_broker_gpio ( nx_user_io_broker_t * broker,
nx_user_io_call_t * call,
const nx_user_io_message_t * message,
nx_user_io_reply_t * reply )

Execute one scalar GPIO message through a trusted gateway.

Returns
REJECTED has accepted=false, no pin/effect. ACCEPTED may already be detached or retain cleanup after a failure.
Note
Kernel-invoked privileged Thread with incoming masks clear, one serialized broker executor. Principal comes from the configured trusted kernel identity port. Pin both validated memory ranges before any GPIO call; snapshot input once, copy an initialized reply. Kernel call storage is zero-initialized outside user RAM and must outlive retained pins. No OS SVC/MPU/TZ wiring or user privilege elevation is provided by this component.

◆ nx_user_io_broker_gpio_finish()

nx_user_io_result_t nx_user_io_broker_gpio_finish ( nx_user_io_broker_t * broker,
nx_user_io_call_t * call )

Retry retained cleanup without reading users or replaying IO.

Note
Same privileged serialized kernel owner, incoming masks clear. Successful unpin follows actual provider/observer drain; a failed unpin keeps memory, call slot and identity retained. Does not imply that a previously performed GPIO write can be reversed.