Skip to content

File syn_port_system.h

FileList > port > syn_port_system.h

Go to the source code of this file

System-level port interface — functions the user must implement. More...

  • #include "../common/syn_compiler.h"
  • #include "../common/syn_defs.h"

Public Functions

Type Name
void syn_port_delay_ms (uint32_t ms)
Blocking delay for the specified number of milliseconds.
void syn_port_enter_critical (void)
Enter a critical section (disable interrupts).
void syn_port_exit_critical (void)
Exit a critical section (re-enable interrupts).
uint32_t syn_port_get_tick_ms (void)
Return the current system tick in milliseconds.
SYN_NORETURN void syn_port_system_reset (void)
Perform a system reset.

Detailed Description

Provides critical-section management, a millisecond tick source, delay, and system reset. These are required by several SyntropicOS modules.

Public Functions Documentation

function syn_port_delay_ms

Blocking delay for the specified number of milliseconds.

void syn_port_delay_ms (
    uint32_t ms
) 

The implementation may busy-wait or yield to an RTOS. The delay must be at least ms milliseconds.

Parameters:

  • ms Number of milliseconds to delay.

function syn_port_enter_critical

Enter a critical section (disable interrupts).

void syn_port_enter_critical (
    void
) 

Calls may be nested; the implementation must track nesting depth and only re-enable interrupts when the outermost critical section exits.


function syn_port_exit_critical

Exit a critical section (re-enable interrupts).

void syn_port_exit_critical (
    void
) 

Must be called once for each corresponding syn_port_enter_critical().


function syn_port_get_tick_ms

Return the current system tick in milliseconds.

uint32_t syn_port_get_tick_ms (
    void
) 

This value must be monotonically increasing and should wrap naturally at UINT32_MAX. Typical sources: SysTick, a hardware timer, or an RTOS tick.

Returns:

Milliseconds since system start (or last wrap).


function syn_port_system_reset

Perform a system reset.

SYN_NORETURN void syn_port_system_reset (
    void
) 

This function should not return. On Cortex-M, this is typically NVIC_SystemReset().



The documentation for this class was generated from the following file src/syntropic/port/syn_port_system.h