Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Namespaces | Typedefs | Functions | Variables
threads.h File Reference

Interface for the platform specific tasks and threads. More...

Go to the source code of this file.

Namespaces

namespace  lampda
 Program scope.
 
namespace  lampda::platform
 Handle the platform specific interactions.
 
namespace  lampda::platform::threads
 Define tasks and threads specifics.
 

Typedefs

typedef void(* lampda::platform::threads::taskfunc_t) (void)
 model of a task function
 

Functions

void lampda::platform::threads::start_thread (taskfunc_t taskFunction, const char *const taskName, const int priority, const int stackSize)
 Start a separate thread, running until the system shuts off.
 
void lampda::platform::threads::start_suspended_thread (taskfunc_t taskFunction, const char *const taskName, const int priority, const int stackSize)
 Start a separate thread, running until the system shuts off. Start in suspended state.
 
void lampda::platform::threads::yield_this_thread ()
 make this thread pass the control to other threads
 
void lampda::platform::threads::suspend_this_thread ()
 threads can only suspend itself
 
void lampda::platform::threads::suspend_all_threads ()
 Suspend all threads.
 
int lampda::platform::threads::is_all_suspended ()
 check that all threads are suspended (mandatory for sleep mode)
 
void lampda::platform::threads::resume_thread (const char *const taskName)
 resume a target thread
 
void lampda::platform::threads::notify_thread (const char *const taskName, int wakeUpEvent)
 notify a thread to resume
 
int lampda::platform::threads::wait_notification (const int timeout_ms)
 block this thread until a timeout or notification is received
 
void lampda::platform::threads::get_thread_debug (char *textBuff)
 

Variables

const char *const lampda::platform::threads::pd_taskName = "usbpd"
 name of the USB power delivery task
 
const char *const lampda::platform::threads::pdInterruptHandle_taskName = "intpd"
 name of the USB power delivery interrupt handle task
 
const char *const lampda::platform::threads::power_taskName = "power"
 name of the main power task
 
const char *const lampda::platform::threads::user_taskName = "user"
 name of the optional user task
 
const char *const lampda::platform::threads::taskScheduler_taskName = "task_sched"
 name of the task scheduling task
 

Detailed Description

Interface for the platform specific tasks and threads.