18 #ifndef LAZULI_SYS_ARCH_ARCH_H 19 #define LAZULI_SYS_ARCH_ARCH_H void Arch_SetSerialConfiguration(const Lz_SerialConfiguration *const configuration)
Configure the seria line according to the parameter.
void Arch_InfiniteLoop(void)
Function that loops forever, never returns.
uint8_t InterruptsStatus
Define the type used to store interrupts status.
void Arch_InitSystemTimer(void)
Initialize the system timer.
void Arch_InitIdleCpuMode(void)
Initialize idle CPU modes.
Represents the result of a uin16_t division.
void * Arch_LoadPointerFromProgmem(const void *source)
Return a pointer stored in program memory.
#define _EXTERN_C_DECL_BEGIN
Open C++ header file declarations.
void Arch_DisableInterrupts(void)
Disable all interrupts.
void Arch_EnableInterrupts(void)
Enable all interrupts.
void Arch_RestoreContextAndReturnFromInterrupt(void *stackPointer)
Restore the context of a previously saved task, and run it by returning from interrupt.
U16DivisionResult Arch_Divide_U16(uint16_t numerator, uint16_t denominator)
Perform the Euclidean division between two uint16_t operands.
bool Arch_TryAcquireLock(volatile uint8_t *const lock)
Try to acquire a lock by atomically changing the value pointed by the lock parameter.
Macro aliases on compiler facilities.
InterruptsStatus Arch_DisableInterruptsGetStatus(void)
Disable all interrupts and return the previous interrupts status.
void Arch_RestoreInterruptsStatus(const InterruptsStatus interruptsStatus)
Restore a previously saved interrupts status.
void Arch_GetSerialConfiguration(Lz_SerialConfiguration *const configuration)
Retrieve the current configuration of the serial line.
uint16_t remainder
The remainder of the division.
unsigned int uint16_t
Represents a unsigned integer type with width of exactly 16 bits.
uint16_t Arch_LoadU16FromProgmem(const void *source)
Return a double-byte word stored in program memory.
bool Arch_AreInterruptsEnabled(void)
Obtain a value indicating if global interrupts are enabled.
void Arch_InitInstrumentation(void)
Initialize the context switch instrumentation.
Doubly linked lists interface.
void(*)(void) Arch_LoadFunctionPointerFromProgmem(const void *source)
Return a function pointer stored in program memory.
Serial port configuration interface.
void Arch_LoadFromProgmem(const void *source, void *destination, const size_t size)
Copy bytes from program memory to RAM.
unsigned char uint8_t
Represents a unsigned integer type with width of exactly 8 bits.
void Arch_CpuSleep(void)
Put the CPU to sleep according to the sleep settings.
Represents the configuration of a serial interface.
void Arch_InitSerial(void)
Initialize serial line with default configuration at system startup.
Basic type definitions and useful macros.
uint16_t quotient
The quotient of the division.
#define _EXTERN_C_DECL_END
Close C++ header file declarations.
void Arch_ResetSystem(void)
Reset the whole system.
void Arch_StartSystemTimer(void)
Start the system timer.
uint8_t Arch_LoadU8FromProgmem(const void *source)
Return a byte stored in program memory.
void Arch_StartRunning(void *stackPointer, size_t offsetOfPc)
Start running the scheduler for the first time with the specified context.