Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
arch.h
Go to the documentation of this file.
1
9#ifndef NEXUS_ARCH_ARCH_H
10#define NEXUS_ARCH_ARCH_H
11#include <stdbool.h>
12#include <stdint.h>
13#ifdef __cplusplus
14extern "C" {
15#endif
22typedef struct {
23 uint32_t value;
25
32typedef struct {
33 uint32_t primask;
34 uint32_t basepri;
35 uint32_t faultmask;
37
111bool nx_arch_in_isr(void);
118void nx_arch_dmb(void);
125void nx_arch_dsb(void);
132void nx_arch_isb(void);
148bool nx_arch_cycle_snapshot(uint32_t* cycles);
149#ifdef __cplusplus
150}
151#endif
152#endif
bool nx_arch_is_privileged(void)
Query privilege in the current CPU execution context.
void nx_arch_irq_restore(nx_arch_irq_state_t previous)
Restore the incoming mask, preserving nested exclusions.
void nx_arch_dsb(void)
Complete preceding explicit memory accesses.
void nx_arch_dmb(void)
Order explicit data memory accesses in the CPU domain.
bool nx_arch_cycle_snapshot(uint32_t *cycles)
Snapshot an already enabled free-running cycle counter.
void nx_arch_isb(void)
Synchronize subsequent CPU instruction execution.
bool nx_arch_irq_is_masked(void)
Test masks that could prevent required completion progress.
nx_arch_irq_masks_t nx_arch_irq_masks(void)
Snapshot the implemented local interrupt-mask registers.
uint32_t nx_arch_exception_number(void)
Query the exact current CPU exception identity.
nx_arch_irq_state_t nx_arch_irq_save(void)
Save incoming local mask and mask configurable exceptions.
bool nx_arch_in_isr(void)
Query current CPU exception context.
Read-only snapshot of implemented local interrupt masks.
Definition arch.h:32
uint32_t primask
Definition arch.h:33
uint32_t basepri
Definition arch.h:34
uint32_t faultmask
Definition arch.h:35
Saved incoming PRIMASK or calling-thread Native nesting.
Definition arch.h:22
uint32_t value
Definition arch.h:23