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

Explicit host-model fixtures; no physical MCU qualification. More...

#include "nexus/io/adc.h"
#include "nexus/io/exti.h"
#include "nexus/io/flash.h"
#include "nexus/io/gpio.h"
#include "nexus/io/i2c.h"
#include "nexus/io/spi.h"
#include "nexus/io/timer.h"
#include "nexus/io/uart.h"
#include "nexus/io/watchdog.h"

Go to the source code of this file.

Data Structures

struct  nx_native_uart_config_t
 UART storage belongs to the fixture until port stop and IRQ quiescence. More...

Functions

nx_result_t nx_native_clock_configure (bool enabled, nx_time_us_t now)
 Switch host model to a deterministic clock domain.
nx_result_t nx_native_clock_advance (uint64_t duration_us)
 Advance deterministic time without an implicit hardware IRQ.
nx_result_t nx_native_gpio_configure (uint32_t mask, uint32_t initial)
 Configure the fixed GPIO model after writer quiescence.
void nx_native_gpio_input (uint32_t value)
 Inject one GPIO input snapshot in the deterministic model.
uint32_t nx_native_gpio_output (void)
 Observe output state for a host behavioral assertion.
nx_result_t nx_native_uart_configure (const nx_native_uart_config_t *config)
 Configure exact RX/TX fixture capacities on the fixed UART.
nx_result_t nx_native_uart_tx_validate (void *context, const nx_uart_tx_request_t *request)
 Validate exact Native TX context for selected RS485 binding.
nx_result_t nx_native_uart_model_irq_configure (const nx_uart_port_t *binding, const nx_irq_policy_t *policy, const nx_irq_source_t *source)
 Copy explicit IRQ facts into a quiescent host UART model.
void nx_native_uart_irq_step (void)
 Execute one deterministic TX IRQ byte/TC event.
nx_result_t nx_native_uart_receive (uint8_t byte, uint32_t flags)
 Inject one RX IRQ fact into bounded selected-profile storage.
void nx_native_uart_fault (bool start_failure, bool hold_drain)
 Configure start failure or inability to prove hardware drain.
size_t nx_native_uart_transmitted (void)
 Observe captured TX bytes.
nx_result_t nx_native_spi_configure (uint8_t *registers, size_t length)
 Configure a fixed SPI echo or register-file model.
void nx_native_spi_fault (size_t fail_after, bool busy)
 Inject bounded SPI partial failure or controller occupancy.
bool nx_native_spi_cs_active (void)
 Check the modeled CS level after a transaction.
nx_result_t nx_native_i2c_configure (uint8_t *memory, size_t length, uint8_t address)
 Configure one 7-bit-address register-file I2C model.
void nx_native_i2c_fault (nx_result_t result, bool stuck)
 Inject NACK, arbitration loss or a stuck bus.
nx_result_t nx_native_flash_configure (uint8_t *memory, const nx_flash_geometry_t *geometry)
 Configure physical-geometry RAM model, clearly nonpersistent.
void nx_native_flash_fault (size_t pulse_count)
 Inject program/erase failure after complete modeled pulses.
void nx_native_watchdog_boot (uint32_t causes)
 Reset the watchdog fixture as a simulated new boot.
bool nx_native_watchdog_expired (void)
 Observe expiration of the enabled deterministic IWDG.
nx_result_t nx_native_exti_configure (uint8_t line, nx_exti_edge_t edge, nx_exti_event_t *events, size_t capacity)
 Configure exact storage for one static EXTI line.
nx_result_t nx_native_exti_emit (uint8_t line, nx_exti_edge_t edge)
 Inject a timestamped selected edge fact.
nx_result_t nx_native_pwm_configure (uint32_t tick_hz, uint32_t period_ticks)
 Configure fixed PWM model timer facts after writer quiescence.
nx_result_t nx_native_adc_configure (const uint16_t *samples, size_t count, uint8_t resolution_bits, uint32_t reference_mv)
 Configure fixed ADC raw-count sequence and format.
void nx_native_adc_fault (size_t sample_count)
 Inject ADC failure after a prefix of complete samples.
void nx_native_gpio_model_input (const nx_gpio_port_t *binding, uint32_t value)
 Operate on the selected Native model face only.
uint32_t nx_native_gpio_model_output (const nx_gpio_port_t *binding)
 Operate on the selected Native model face only.
nx_result_t nx_native_uart_model_configure (const nx_uart_port_t *binding, const nx_native_uart_config_t *config)
 Operate on the selected Native model face only.
void nx_native_uart_model_irq_step (const nx_uart_port_t *binding)
 Operate on the selected Native model face only.
nx_result_t nx_native_uart_model_receive (const nx_uart_port_t *binding, uint8_t byte, uint32_t flags)
 Operate on the selected Native model face only.
void nx_native_uart_model_fault (const nx_uart_port_t *binding, bool start_failure, bool hold_drain)
 Operate on the selected Native model face only.
size_t nx_native_uart_model_transmitted (const nx_uart_port_t *binding)
 Operate on the selected Native model face only.
nx_result_t nx_native_spi_model_configure (const nx_spi_endpoint_t *binding, uint8_t *registers, size_t length)
 Operate on the selected Native model face only.
void nx_native_spi_model_fault (const nx_spi_port_t *binding, size_t fail_after, bool busy)
 Operate on the selected Native model face only.
bool nx_native_spi_model_cs_active (const nx_spi_endpoint_t *binding)
 Operate on the selected Native model face only.
nx_result_t nx_native_i2c_model_configure (const nx_i2c_endpoint_t *binding, uint8_t *memory, size_t length, uint8_t address)
 Operate on the selected Native model face only.
void nx_native_i2c_model_fault (const nx_i2c_port_t *binding, nx_result_t result, bool stuck)
 Operate on the selected Native model face only.
nx_result_t nx_native_flash_model_configure (const nx_flash_port_t *binding, uint8_t *memory, const nx_flash_geometry_t *geometry)
 Operate on the selected Native model face only.
void nx_native_flash_model_fault (const nx_flash_port_t *binding, size_t pulse_count)
 Operate on the selected Native model face only.
void nx_native_watchdog_model_boot (const nx_watchdog_port_t *binding, uint32_t causes)
 Operate on the selected Native model face only.
bool nx_native_watchdog_model_expired (const nx_watchdog_port_t *binding)
 Operate on the selected Native model face only.
nx_result_t nx_native_exti_model_configure (const nx_exti_port_t *binding, uint8_t line, nx_exti_edge_t edge, nx_exti_event_t *events, size_t capacity)
 Operate on the selected Native model face only.
nx_result_t nx_native_exti_model_emit (const nx_exti_port_t *binding, uint8_t line, nx_exti_edge_t edge)
 Operate on the selected Native model face only.
nx_result_t nx_native_pwm_model_configure (const nx_pwm_port_t *binding, uint32_t tick_hz, uint32_t period_ticks)
 Operate on the selected Native model face only.
nx_result_t nx_native_adc_model_configure (const nx_adc_port_t *binding, const uint16_t *samples, size_t count, uint8_t resolution_bits, uint32_t reference_mv)
 Operate on the selected Native model face only.
void nx_native_adc_model_fault (const nx_adc_port_t *binding, size_t sample_count)
 Operate on the selected Native model face only.
void nx_native_spi_model_async_configure (const nx_spi_port_t *binding, bool automatic_irq)
 Choose explicit or automatic modeled SPI IRQ stepping.
void nx_native_spi_model_irq_step (const nx_spi_port_t *binding)
 Inject one bounded SPI byte/idle event on the exact Native bus.
void nx_native_spi_model_drain_hold (const nx_spi_port_t *binding, bool hold)
 Inject inability to prove SPI hardware drain.
nx_result_t nx_native_uart_model_idle (const nx_uart_port_t *binding)
 Inject UART IDLE and publish its current valid byte prefix.
nx_result_t nx_native_adc_model_trigger (const nx_adc_port_t *binding)
 Inject one ADC timer-trigger scan into a free selected block.

Variables

const nx_gpio_port_t *const nx_native_gpio
 Fixed model bindings; no allocation, lookup, probe or construction.
const nx_uart_port_t *const nx_native_uart
const nx_spi_endpoint_t *const nx_native_spi
const nx_spi_port_t *const nx_native_spi_port
const nx_i2c_port_t *const nx_native_i2c_port
const nx_i2c_endpoint_t *const nx_native_i2c
const nx_flash_port_t *const nx_native_flash
const nx_watchdog_port_t *const nx_native_watchdog
const nx_exti_port_t *const nx_native_exti
const nx_pwm_port_t *const nx_native_pwm
const nx_adc_port_t *const nx_native_adc

Detailed Description

Explicit host-model fixtures; no physical MCU qualification.

Author
Nexus Team

Definition in file model.h.

Function Documentation

◆ nx_native_adc_configure()

nx_result_t nx_native_adc_configure ( const uint16_t * samples,
size_t count,
uint8_t resolution_bits,
uint32_t reference_mv )

Configure fixed ADC raw-count sequence and format.

Parameters
[in]samplesFixture-owned nominal sample sequence.
[in]countPositive channel count.
[in]resolution_bitsOne through sixteen.
[in]reference_mvPositive nominal reference voltage.
Returns
Success or INVALID.

◆ nx_native_adc_fault()

void nx_native_adc_fault ( size_t sample_count)

Inject ADC failure after a prefix of complete samples.

Parameters
[in]sample_countComplete samples allowed; SIZE_MAX disables.

◆ nx_native_adc_model_configure()

nx_result_t nx_native_adc_model_configure ( const nx_adc_port_t * binding,
const uint16_t * samples,
size_t count,
uint8_t resolution_bits,
uint32_t reference_mv )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_adc_model_fault()

void nx_native_adc_model_fault ( const nx_adc_port_t * binding,
size_t sample_count )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_adc_model_trigger()

nx_result_t nx_native_adc_model_trigger ( const nx_adc_port_t * binding)

Inject one ADC timer-trigger scan into a free selected block.

Returns
Success, OVERFLOW while a required block remains held, IO for a failed scan, STATE after stop, or INVALID for a foreign provider. No hardware cadence or analog accuracy is claimed.
Note
Each success publishes one interleaved raw-count scan; partial failed scans are detached and never published.

◆ nx_native_clock_advance()

nx_result_t nx_native_clock_advance ( uint64_t duration_us)

Advance deterministic time without an implicit hardware IRQ.

Parameters
[in]duration_usPositive or zero microsecond increment.
Returns
Success, STATE outside manual mode or EXHAUSTED on overflow.

◆ nx_native_clock_configure()

nx_result_t nx_native_clock_configure ( bool enabled,
nx_time_us_t now )

Switch host model to a deterministic clock domain.

Parameters
[in]enabledTrue selects manual clock, false real monotonic.
[in]nowInitial manual microsecond value, below UINT64_MAX.
Returns
Success or INVALID. Caller must first settle every request; switching creates a new domain and invalidates old deadlines.

◆ nx_native_exti_configure()

nx_result_t nx_native_exti_configure ( uint8_t line,
nx_exti_edge_t edge,
nx_exti_event_t * events,
size_t capacity )

Configure exact storage for one static EXTI line.

Parameters
[in]lineZero through fifteen.
[in]edgeRISING/FALLING/BOTH selection.
[in,out]eventsFixture-owned queue storage.
[in]capacityPositive event capacity.
Returns
Success or INVALID; quiesce producer/consumer before reset.

◆ nx_native_exti_emit()

nx_result_t nx_native_exti_emit ( uint8_t line,
nx_exti_edge_t edge )

Inject a timestamped selected edge fact.

Parameters
[in]lineConfigured static line.
[in]edgeRISING or FALLING occurrence.
Returns
Success, INVALID/STATE/OVERFLOW; loss remains observable.

◆ nx_native_exti_model_configure()

nx_result_t nx_native_exti_model_configure ( const nx_exti_port_t * binding,
uint8_t line,
nx_exti_edge_t edge,
nx_exti_event_t * events,
size_t capacity )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_exti_model_emit()

nx_result_t nx_native_exti_model_emit ( const nx_exti_port_t * binding,
uint8_t line,
nx_exti_edge_t edge )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_flash_configure()

nx_result_t nx_native_flash_configure ( uint8_t * memory,
const nx_flash_geometry_t * geometry )

Configure physical-geometry RAM model, clearly nonpersistent.

Parameters
[in,out]memoryCaller-owned geometry-sized bytes; erased to 0xff.
[in]geometryCaller-owned immutable contiguous sector geometry.
Returns
Success or INVALID; no heap, product reserve or persistence.

◆ nx_native_flash_fault()

void nx_native_flash_fault ( size_t pulse_count)

Inject program/erase failure after complete modeled pulses.

Parameters
[in]pulse_countComplete pulses allowed; SIZE_MAX disables fault.

◆ nx_native_flash_model_configure()

nx_result_t nx_native_flash_model_configure ( const nx_flash_port_t * binding,
uint8_t * memory,
const nx_flash_geometry_t * geometry )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_flash_model_fault()

void nx_native_flash_model_fault ( const nx_flash_port_t * binding,
size_t pulse_count )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_gpio_configure()

nx_result_t nx_native_gpio_configure ( uint32_t mask,
uint32_t initial )

Configure the fixed GPIO model after writer quiescence.

Parameters
[in]maskAuthorized input/output bit mask.
[in]initialInitial output snapshot within mask.
Returns
Success or INVALID; no fake Board/electrical qualification.

◆ nx_native_gpio_input()

void nx_native_gpio_input ( uint32_t value)

Inject one GPIO input snapshot in the deterministic model.

Parameters
[in]valuePhysical-port snapshot; read masks unauthorized bits.

◆ nx_native_gpio_model_input()

void nx_native_gpio_model_input ( const nx_gpio_port_t * binding,
uint32_t value )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_gpio_model_output()

uint32_t nx_native_gpio_model_output ( const nx_gpio_port_t * binding)

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_gpio_output()

uint32_t nx_native_gpio_output ( void )

Observe output state for a host behavioral assertion.

Returns
Model output snapshot; no measured waveform semantics.

◆ nx_native_i2c_configure()

nx_result_t nx_native_i2c_configure ( uint8_t * memory,
size_t length,
uint8_t address )

Configure one 7-bit-address register-file I2C model.

Parameters
[in,out]memoryCaller-owned register bytes retained by fixture.
[in]lengthPositive register capacity, at most 256.
[in]addressValid nonreserved 7-bit address.
Returns
Success or INVALID.

◆ nx_native_i2c_fault()

void nx_native_i2c_fault ( nx_result_t result,
bool stuck )

Inject NACK, arbitration loss or a stuck bus.

Parameters
[in]resultSuccess disables fault; NACK/ARBITRATION/IO supported.
[in]stuckTrue makes explicit recovery fail until released.

◆ nx_native_i2c_model_configure()

nx_result_t nx_native_i2c_model_configure ( const nx_i2c_endpoint_t * binding,
uint8_t * memory,
size_t length,
uint8_t address )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_i2c_model_fault()

void nx_native_i2c_model_fault ( const nx_i2c_port_t * binding,
nx_result_t result,
bool stuck )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_pwm_configure()

nx_result_t nx_native_pwm_configure ( uint32_t tick_hz,
uint32_t period_ticks )

Configure fixed PWM model timer facts after writer quiescence.

Parameters
[in]tick_hzPositive post-prescaler frequency.
[in]period_ticksFixed shared-base positive period.
Returns
Success or INVALID.

◆ nx_native_pwm_model_configure()

nx_result_t nx_native_pwm_model_configure ( const nx_pwm_port_t * binding,
uint32_t tick_hz,
uint32_t period_ticks )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_spi_configure()

nx_result_t nx_native_spi_configure ( uint8_t * registers,
size_t length )

Configure a fixed SPI echo or register-file model.

Parameters
[in,out]registersOptional caller-owned register bytes; NULL is echo.
[in]lengthRegister capacity; zero only for echo mode.
Returns
Success or INVALID; fixture has one serialized executor.

◆ nx_native_spi_cs_active()

bool nx_native_spi_cs_active ( void )

Check the modeled CS level after a transaction.

Returns
True while model transaction owns active CS.

◆ nx_native_spi_fault()

void nx_native_spi_fault ( size_t fail_after,
bool busy )

Inject bounded SPI partial failure or controller occupancy.

Parameters
[in]fail_afterByte index to fail at, SIZE_MAX disables fault.
[in]busyTrue rejects transactions without CS/buffer access.

◆ nx_native_spi_model_async_configure()

void nx_native_spi_model_async_configure ( const nx_spi_port_t * binding,
bool automatic_irq )

Choose explicit or automatic modeled SPI IRQ stepping.

Note
Quiesce the controller first. Automatic service advances at most one byte or a separate final idle fact per call; this does not model physical DMA or wire timing.

◆ nx_native_spi_model_configure()

nx_result_t nx_native_spi_model_configure ( const nx_spi_endpoint_t * binding,
uint8_t * registers,
size_t length )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_spi_model_cs_active()

bool nx_native_spi_model_cs_active ( const nx_spi_endpoint_t * binding)

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_spi_model_drain_hold()

void nx_native_spi_model_drain_hold ( const nx_spi_port_t * binding,
bool hold )

Inject inability to prove SPI hardware drain.

Note
Retained requests become QUARANTINED until hold is released and the executor services the bus again. No loan is revoked.

◆ nx_native_spi_model_fault()

void nx_native_spi_model_fault ( const nx_spi_port_t * binding,
size_t fail_after,
bool busy )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_spi_model_irq_step()

void nx_native_spi_model_irq_step ( const nx_spi_port_t * binding)

Inject one bounded SPI byte/idle event on the exact Native bus.

◆ nx_native_uart_configure()

nx_result_t nx_native_uart_configure ( const nx_native_uart_config_t * config)

Configure exact RX/TX fixture capacities on the fixed UART.

Parameters
[in]configCaller-owned selected-profile storage description.
Returns
Success, INVALID or BUSY if an active request remains.

◆ nx_native_uart_fault()

void nx_native_uart_fault ( bool start_failure,
bool hold_drain )

Configure start failure or inability to prove hardware drain.

Parameters
[in]start_failureFail after direct admission, not as rejection.
[in]hold_drainRetain QUARANTINED request until explicitly released.

◆ nx_native_uart_irq_step()

void nx_native_uart_irq_step ( void )

Execute one deterministic TX IRQ byte/TC event.

Note
No actual hardware IRQ, latency or wire timing is simulated.

◆ nx_native_uart_model_configure()

nx_result_t nx_native_uart_model_configure ( const nx_uart_port_t * binding,
const nx_native_uart_config_t * config )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_uart_model_fault()

void nx_native_uart_model_fault ( const nx_uart_port_t * binding,
bool start_failure,
bool hold_drain )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_uart_model_idle()

nx_result_t nx_native_uart_model_idle ( const nx_uart_port_t * binding)

Inject UART IDLE and publish its current valid byte prefix.

Returns
Success, EMPTY without a prefix, STATE outside a running block stream, BUSY while its modeled writer is active, or INVALID for a foreign provider. No producer loan is revoked.

◆ nx_native_uart_model_irq_configure()

nx_result_t nx_native_uart_model_irq_configure ( const nx_uart_port_t * binding,
const nx_irq_policy_t * policy,
const nx_irq_source_t * source )

Copy explicit IRQ facts into a quiescent host UART model.

Parameters
[in]bindingConfigured Native UART face with no IRQ users.
[in]policyImmutable CPU/kernel facts copied during this call.
[in]sourceActual modeled publisher facts copied during call.
Returns
Success, INVALID, CONTEXT, STATE or BUSY before side effects.
Note
Task-only cold configuration; caller has stopped publishers. No active request, stream or attached wake may remain. Default preparation explicitly models BASEPRI/four-bit IRQs; this entry can model Baseline without inventing a SoC/Board.

◆ nx_native_uart_model_irq_step()

void nx_native_uart_model_irq_step ( const nx_uart_port_t * binding)

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_uart_model_receive()

nx_result_t nx_native_uart_model_receive ( const nx_uart_port_t * binding,
uint8_t byte,
uint32_t flags )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_uart_model_transmitted()

size_t nx_native_uart_model_transmitted ( const nx_uart_port_t * binding)

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_uart_receive()

nx_result_t nx_native_uart_receive ( uint8_t byte,
uint32_t flags )

Inject one RX IRQ fact into bounded selected-profile storage.

Parameters
[in]byteReceived byte; ignored for NO_BYTE status facts.
[in]flagsNX_UART_EVENT_* error facts; zero for normal reception.
Returns
Success, OVERFLOW or STATE if disabled.

◆ nx_native_uart_transmitted()

size_t nx_native_uart_transmitted ( void )

Observe captured TX bytes.

Returns
Number captured in caller-owned tx_log.

◆ nx_native_uart_tx_validate()

nx_result_t nx_native_uart_tx_validate ( void * context,
const nx_uart_tx_request_t * request )

Validate exact Native TX context for selected RS485 binding.

Parameters
[in]contextConfigured Native UART face's exact context.
[in]requestLive READY/QUEUED descriptor, never retained.
Returns
Same pure rejectable checks as Native submit/start.
Note
Task-only; no model IRQ, admission, GPIO or state mutation.

◆ nx_native_watchdog_boot()

void nx_native_watchdog_boot ( uint32_t causes)

Reset the watchdog fixture as a simulated new boot.

Parameters
[in]causesLatched reset cause mask.
Note
Test-only; production IWDG cannot be disabled by this action.

◆ nx_native_watchdog_expired()

bool nx_native_watchdog_expired ( void )

Observe expiration of the enabled deterministic IWDG.

Returns
True once its nominal model deadline expires; latches IWDG.

◆ nx_native_watchdog_model_boot()

void nx_native_watchdog_model_boot ( const nx_watchdog_port_t * binding,
uint32_t causes )

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

◆ nx_native_watchdog_model_expired()

bool nx_native_watchdog_model_expired ( const nx_watchdog_port_t * binding)

Operate on the selected Native model face only.

Note
Null or foreign-provider faces return INVALID for status operations, zero/false for observations, and have no effect for injections. Referenced fixture storage remains owned by the caller; reconfiguration requires writer and IRQ quiescence and never revokes a live UART borrow.

Variable Documentation

◆ nx_native_adc

const nx_adc_port_t* const nx_native_adc
extern

◆ nx_native_exti

const nx_exti_port_t* const nx_native_exti
extern

◆ nx_native_flash

const nx_flash_port_t* const nx_native_flash
extern

◆ nx_native_gpio

const nx_gpio_port_t* const nx_native_gpio
extern

Fixed model bindings; no allocation, lookup, probe or construction.

◆ nx_native_i2c

const nx_i2c_endpoint_t* const nx_native_i2c
extern

◆ nx_native_i2c_port

const nx_i2c_port_t* const nx_native_i2c_port
extern

◆ nx_native_pwm

const nx_pwm_port_t* const nx_native_pwm
extern

◆ nx_native_spi

const nx_spi_endpoint_t* const nx_native_spi
extern

◆ nx_native_spi_port

const nx_spi_port_t* const nx_native_spi_port
extern

◆ nx_native_uart

const nx_uart_port_t* const nx_native_uart
extern

◆ nx_native_watchdog

const nx_watchdog_port_t* const nx_native_watchdog
extern