Lazuli
Loading...
Searching...
No Matches
Lazuli API documentation

This is the Lazuli kernel API and user API documentation.

These pages only document the APIs. For more general documentation about the project and use cases please refer to the corresponding documentation.
The project is hosted at https://github.com/randruc/Lazuli

User API

The user API consists in all header files located in sys/include/Lazuli.
User tasks should only include header files from this directory. They are included as system headers, and the root directory is Lazuli.
Some examples:

#include <Lazuli/common.h>
#include <Lazuli/lazuli.h>
#include <Lazuli/mutex.h>
Basic type definitions and useful macros.
The public API of the Lazuli kernel.
Mutexes interface.

All user API types conform to the following naming convention: Lz_XXXXX where XXXXX represents a type written in camel case. Some examples:

Represents a mutex.
Definition mutex.h:28
Represents the configuration of a serial interface.
Definition serial.h:222

All user API functions conform to the following naming convention: Lz_XXXXX_YYYYY where XXXXX represents a type or a "functional domain" writtent in camel case and YYYYY represents an action written in camel case. Some examples:

void Lz_Mutex_Lock(Lz_Mutex *const mutex)
Lock the mutex and enter critical section.
Definition mutex.c:78
void Lz_Task_Terminate(void)
Terminate the calling task.
Definition scheduler.c:821
void Lz_Serial_GetConfiguration(Lz_SerialConfiguration *const serialConfiguration)
Retrieve the configuration of the serial line.
Definition serial.c:20

Kernel API

The kernel API consists in all header files located in sys/include/Lazuli/sys and sys/include/Lazuli/sys/arch.
Header files from theses directories can be included all across the kernel and drivers source code.
They are included as system headers, and the root directory is Lazuli/sys.
Some examples:

Architecture Abstraction API.
Base task definition and context description.

The only naming convention applicable to kernel types is camel case. Some examples:

Represents the layout of the stack when saving the context of a task.
Definition task.h:209
Represents a task.
Definition task.h:82

All kernel API functions conform to the following naming convention: XXXXX_YYYYY where XXXXX represents a type or a "functional domain" written in camel case and YYYYY represents an action written in camel case. Some examples:

void Arch_DisableInterrupts(void)
Disable all interrupts.
void Scheduler_AbortTask(void)
Abort the current running task.
Definition scheduler.c:651
Note
It's important to note that user API header files never include kernel header files.