Mark3 Realtime Kernel
mark3c.h File Reference

Header providing C-language API bindings for the Mark3 kernel. More...

#include "mark3cfg.h"
#include "fake_types.h"
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define THREAD_SIZE   (sizeof(Fake_Thread))
 
#define TIMER_SIZE   (sizeof(Fake_Timer))
 
#define SEMAPHORE_SIZE   (sizeof(Fake_Semaphore))
 
#define MUTEX_SIZE   (sizeof(Fake_Mutex))
 
#define MESSAGE_SIZE   (sizeof(Fake_Message))
 
#define MESSAGEQUEUE_SIZE   (sizeof(Fake_MessageQueue))
 
#define MAILBOX_SIZE   (sizeof(Fake_Mailbox))
 
#define NOTIFY_SIZE   (sizeof(Fake_Notify))
 
#define MESSAGEPOOL_SIZE   (sizeof(Fake_MessagePool))
 
#define CONDITIONVARIABLE_SIZE   (sizeof(Fake_ConditionVariable))
 
#define READERWRITERLOCK_SIZE   (sizeof(Fake_ReaderWriterLock))
 
#define COROUTINE_SIZE   (sizeof(Fake_Coroutine))
 
#define TOKEN_1(x, y)   x##y
 
#define TOKEN_2(x, y)   TOKEN_1(x, y)
 
#define WORD_ROUND(x)   (((x) + (sizeof(K_WORD) - 1)) / sizeof(K_WORD))
 
#define DECLARE_THREAD(name)
 
#define DECLARE_TIMER(name)
 
#define DECLARE_SEMAPHORE(name)
 
#define DECLARE_MUTEX(name)
 
#define DECLARE_MESSAGE(name)
 
#define DECLARE_MESSAGEPOOL(name)
 
#define DECLARE_MESSAGEQUEUE(name)
 
#define DECLARE_MAILBOX(name)
 
#define DECLARE_NOTIFY(name)
 
#define DECLARE_CONDITIONVARIABLE(name)
 
#define DECLARE_READERWRITERLOCK(name)
 
#define DECLARE_COROUTINE(name)
 

Typedefs

typedef void * Mailbox_t
 Mailbox opaque handle data type. More...
 
typedef void * Message_t
 Message opaque handle data type. More...
 
typedef void * MessagePool_t
 MessagePool opaque handle data type. More...
 
typedef void * MessageQueue_t
 MessageQueue opaque handle data type. More...
 
typedef void * Mutex_t
 Mutex opaque handle data type. More...
 
typedef void * Notify_t
 Notification object opaque handle data type. More...
 
typedef void * Semaphore_t
 Semaphore opaque handle data type. More...
 
typedef void * Thread_t
 Thread opaque handle data type. More...
 
typedef void * Timer_t
 Timer opaque handle data type. More...
 
typedef void * ConditionVariable_t
 Condition Variable opaque handle data type. More...
 
typedef void * ReaderWriterLock_t
 Reader-writer-lock opaque handle data type. More...
 
typedef void * Coroutine_t
 Coroutine opaaque handle data type. More...
 
typedef void(* kernel_debug_print_t) (const char *szString_)
 
typedef void(* coroutine_callback_t) (Coroutine_t caller, void *pvContext)
 
typedef void(* panic_func_t) (uint16_t u16PanicCode_)
 
typedef void(* thread_entry_func_t) (void *pvArg_)
 
typedef void(* timer_callback_t) (Thread_t hOwner_, void *pvData_)
 

Enumerations

enum  thread_state_t {
  THREAD_STATE_EXIT = 0, THREAD_STATE_READY, THREAD_STATE_BLOCKED, THREAD_STATE_STOP,
  THREAD_STATE_INVALID
}
 

Functions

void * Alloc_Memory (size_t eSize_)
 Alloc_Memory. More...
 
void Free_Memory (void *pvObject_)
 Free_Memory. More...
 
Semaphore_t Alloc_Semaphore (void)
 Alloc_Semaphore. More...
 
void Free_Semaphore (Semaphore_t handle)
 
Mutex_t Alloc_Mutex (void)
 Alloc_Mutex. More...
 
void Free_Mutex (Mutex_t handle)
 
Message_t Alloc_Message (void)
 Alloc_Message. More...
 
void Free_Message (Message_t handle)
 
MessageQueue_t Alloc_MessageQueue (void)
 Alloc_MessageQueue. More...
 
void Free_MessageQueue (MessageQueue_t handle)
 
MessagePool_t Alloc_MessagePool (void)
 
void Free_MessagePool (MessagePool_t handle)
 
Notify_t Alloc_Notify (void)
 Alloc_Notify. More...
 
void Free_Notify (Notify_t handle)
 
Mailbox_t Alloc_Mailbox (void)
 Alloc_Mailbox. More...
 
void Free_Mailbox (Mailbox_t handle)
 
Thread_t Alloc_Thread (void)
 Alloc_Thread. More...
 
void Free_Thread (Thread_t handle)
 
Timer_t Alloc_Timer (void)
 Alloc_Timer. More...
 
void Free_Timer (Timer_t handle)
 
void Kernel_Init (void)
 Kernel_Init. More...
 
void Kernel_Start (void)
 Kernel_Start. More...
 
bool Kernel_IsStarted (void)
 Kernel_IsStarted. More...
 
void Kernel_SetPanic (panic_func_t pfPanic_)
 Kernel_SetPanic. More...
 
bool Kernel_IsPanic (void)
 Kernel_IsPanic. More...
 
void Kernel_Panic (uint16_t u16Cause_)
 Kernel_Panic. More...
 
uint32_t Kernel_GetTicks (void)
 Kernel_GetTicks. More...
 
void Scheduler_Enable (bool bEnable_)
 Scheduler_Enable. More...
 
bool Scheduler_IsEnabled (void)
 Scheduler_IsEnabled. More...
 
Thread_t Scheduler_GetCurrentThread (void)
 Scheduler_GetCurrentThread. More...
 
void Thread_Init (Thread_t handle, K_WORD *pwStack_, uint16_t u16StackSize_, PORT_PRIO_TYPE uXPriority_, thread_entry_func_t pfEntryPoint_, void *pvArg_)
 Thread_Init. More...
 
void Thread_Start (Thread_t handle)
 Thread_Start. More...
 
void Thread_Stop (Thread_t handle)
 Thread_Stop. More...
 
PORT_PRIO_TYPE Thread_GetPriority (Thread_t handle)
 Thread_GetPriority. More...
 
PORT_PRIO_TYPE Thread_GetCurPriority (Thread_t handle)
 Thread_GetCurPriority. More...
 
void Thread_SetPriority (Thread_t handle, PORT_PRIO_TYPE uXPriority_)
 Thread_SetPriority. More...
 
void Thread_Exit (Thread_t handle)
 Thread_Exit. More...
 
void Thread_Sleep (uint32_t u32TimeMs_)
 Thread_Sleep. More...
 
void Thread_Yield (void)
 Thread_Yield. More...
 
void Thread_CoopYield (void)
 Thread_CoopYield. More...
 
void Thread_SetID (Thread_t handle, uint8_t u8ID_)
 Thread_SetID. More...
 
uint8_t Thread_GetID (Thread_t handle)
 Thread_GetID. More...
 
thread_state_t Thread_GetState (Thread_t handle)
 Thread_GetState. More...
 
void Timer_Init (Timer_t handle)
 Timer_Init. More...
 
void Timer_Start (Timer_t handle, bool bRepeat_, uint32_t u32IntervalMs_, timer_callback_t pfCallback_, void *pvData_)
 Timer_Start. More...
 
void Timer_Restart (Timer_t handle)
 Timer_Restart. More...
 
void Timer_Stop (Timer_t handle)
 Timer_Stop. More...
 
void Semaphore_Init (Semaphore_t handle, uint16_t u16InitVal_, uint16_t u16MaxVal_)
 Semaphore_Init. More...
 
void Semaphore_Post (Semaphore_t handle)
 Semaphore_Post. More...
 
void Semaphore_Pend (Semaphore_t handle)
 Semaphore_Pend. More...
 
bool Semaphore_TimedPend (Semaphore_t handle, uint32_t u32WaitTimeMS_)
 Semaphore_TimedPend. More...
 
void Mutex_Init (Mutex_t handle)
 Mutex_Init. More...
 
void Mutex_Claim (Mutex_t handle)
 Mutex_Claim. More...
 
void Mutex_Release (Mutex_t handle)
 Mutex_Release. More...
 
bool Mutex_TimedClaim (Mutex_t handle, uint32_t u32WaitTimeMS_)
 Mutex_TimedClaim. More...
 
void Notify_Init (Notify_t handle)
 Notify_Init. More...
 
void Notify_Signal (Notify_t handle)
 Notify_Signal. More...
 
void Notify_Wait (Notify_t handle, bool *pbFlag_)
 Notify_Wait. More...
 
bool Notify_TimedWait (Notify_t handle, uint32_t u32WaitTimeMS_, bool *pbFlag_)
 Notify_TimedWait. More...
 
uint8_t Atomic_Set8 (uint8_t *pu8Source_, uint8_t u8Val_)
 Atomic_Set8. More...
 
uint16_t Atomic_Set16 (uint16_t *pu16Source_, uint16_t u16Val_)
 Atomic_Set16. More...
 
uint32_t Atomic_Set32 (uint32_t *pu32Source_, uint32_t u32Val_)
 Atomic_Set32. More...
 
uint8_t Atomic_Add8 (uint8_t *pu8Source_, uint8_t u8Val_)
 Atomic_Add8. More...
 
uint16_t Atomic_Add16 (uint16_t *pu16Source_, uint16_t u16Val_)
 Atomic_Add16. More...
 
uint32_t Atomic_Add32 (uint32_t *pu32Source_, uint32_t u32Val_)
 Atomic_Add32. More...
 
uint8_t Atomic_Sub8 (uint8_t *pu8Source_, uint8_t u8Val_)
 Atomic_Sub8. More...
 
uint16_t Atomic_Sub16 (uint16_t *pu16Source_, uint16_t u16Val_)
 Atomic_Sub16. More...
 
uint32_t Atomic_Sub32 (uint32_t *pu32Source_, uint32_t u32Val_)
 Atomic_Sub32. More...
 
bool Atomic_TestAndSet (bool *pbLock)
 Atomic_TestAndSet. More...
 
void Message_Init (Message_t handle)
 Message_Init. More...
 
void Message_SetData (Message_t handle, void *pvData_)
 Message_SetData. More...
 
void * Message_GetData (Message_t handle)
 Message_GetData. More...
 
void Message_SetCode (Message_t handle, uint16_t u16Code_)
 Message_SetCode. More...
 
uint16_t Message_GetCode (Message_t handle)
 Message_GetCode. More...
 
void MessageQueue_Init (MessageQueue_t handle)
 MessageQueue_Init. More...
 
Message_t MessageQueue_Receive (MessageQueue_t handle)
 MessageQueue_Receive. More...
 
Message_t MessageQueue_TimedReceive (MessageQueue_t handle, uint32_t u32TimeWaitMS_)
 MessageQueue_TimedReceive. More...
 
void MessageQueue_Send (MessageQueue_t handle, Message_t hMessage_)
 MessageQueue_Send. More...
 
uint16_t MessageQueue_GetCount (MessageQueue_t handle)
 MessageQueue_GetCount. More...
 
void MessagePool_Init (MessagePool_t handle)
 MessagePool_Init. More...
 
void MessagePool_Push (MessagePool_t handle, Message_t msg)
 MessagePool_Push. More...
 
Message_t MessagePool_Pop (MessagePool_t handle)
 MessagePool_Pop. More...
 
void Mailbox_Init (Mailbox_t handle, void *pvBuffer_, uint16_t u16BufferSize_, uint16_t u16ElementSize_)
 Mailbox_Init. More...
 
bool Mailbox_Send (Mailbox_t handle, void *pvData_)
 Mailbox_Send. More...
 
bool Mailbox_SendTail (Mailbox_t handle, void *pvData_)
 Mailbox_SendTail. More...
 
bool Mailbox_TimedSend (Mailbox_t handle, void *pvData_, uint32_t u32TimeoutMS_)
 Mailbox_TimedSend. More...
 
bool Mailbox_TimedSendTail (Mailbox_t handle, void *pvData_, uint32_t u32TimeoutMS_)
 Mailbox_TimedSendTail. More...
 
void Mailbox_Receive (Mailbox_t handle, void *pvData_)
 Mailbox_Receive. More...
 
void Mailbox_ReceiveTail (Mailbox_t handle, void *pvData_)
 Mailbox_ReceiveTail. More...
 
bool Mailbox_TimedReceive (Mailbox_t handle, void *pvData_, uint32_t u32TimeoutMS_)
 Mailbox_TimedReceive. More...
 
bool Mailbox_TimedReceiveTail (Mailbox_t handle, void *pvData_, uint32_t u32TimeoutMS_)
 Mailbox_TimedReceiveTail. More...
 
uint16_t Mailbox_GetFreeSlots (Mailbox_t handle)
 Mailbox_GetFreeSlots. More...
 
bool Mailbox_IsFull (Mailbox_t handle)
 Mailbox_IsFull. More...
 
bool Mailbox_IsEmpty (Mailbox_t handle)
 Mailbox_IsEmpty. More...
 
void ConditionVariable_Init (ConditionVariable_t handle)
 ConditionVariable_Init. More...
 
void ConditionVariable_Wait (ConditionVariable_t handle, Mutex_t hMutex_)
 ConditionVariable_Wait. More...
 
void ConditionVariable_Signal (ConditionVariable_t handle)
 ConditionVariable_Signal. More...
 
void ConditionVariable_Broadcast (ConditionVariable_t handle)
 ConditionVariable_Broadcast. More...
 
bool ConditionVariable_TimedWait (ConditionVariable_t handle, Mutex_t hMutex_, uint32_t u32WaitTimeMS_)
 ConditionVariable_TimedWait. More...
 
void ReaderWriterLock_Init (ReaderWriterLock_t handle)
 ReaderWriterLock_Init. More...
 
void ReaderWriterLock_AcquireReader (ReaderWriterLock_t handle)
 ReaderWriterLock_AcquireReader. More...
 
void ReaderWriterLock_ReleaseReader (ReaderWriterLock_t handle)
 ReaderWriterLock_ReleaseReader. More...
 
void ReaderWriterLock_AcquireWriter (ReaderWriterLock_t handle)
 ReaderWriterLock_AcquireWriter. More...
 
void ReaderWriterLock_ReleaseWriter (ReaderWriterLock_t handle)
 ReaderWriterLock_ReleaseWriter. More...
 
bool ReaderWriterLock_TimedAcquireWriter (ReaderWriterLock_t handle, uint32_t u32TimeoutMs_)
 ReaderWriterLock_TimedAcquireWriter. More...
 
bool ReaderWriterLock_TimedAcquireReader (ReaderWriterLock_t handle, uint32_t u32TimeoutMs_)
 ReaderWriterLock_TimedAcquireReader. More...
 
void Kernel_SetDebugPrintFunction (kernel_debug_print_t pfPrintFunction_)
 Kernel_SetDebugPrintFunction. More...
 
void Kernel_DebugPrint (const char *szString_)
 KernelDebug_DebugPrint. More...
 

Detailed Description

Header providing C-language API bindings for the Mark3 kernel.

Definition in file mark3c.h.

Macro Definition Documentation

◆ CONDITIONVARIABLE_SIZE

#define CONDITIONVARIABLE_SIZE   (sizeof(Fake_ConditionVariable))

Definition at line 81 of file mark3c.h.

◆ COROUTINE_SIZE

#define COROUTINE_SIZE   (sizeof(Fake_Coroutine))

Definition at line 83 of file mark3c.h.

◆ DECLARE_CONDITIONVARIABLE

#define DECLARE_CONDITIONVARIABLE (   name)
Value:
K_WORD TOKEN_2(__condvar_, name)[WORD_ROUND(EVENTFLAG_SIZE)]; \
ConditionVariable_t name = (ConditionVariable_t)TOKEN_2(__condvar_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
void * ConditionVariable_t
Condition Variable opaque handle data type.
Definition: mark3c.h:48
#define TOKEN_2(x, y)
Definition: mark3c.h:115

Definition at line 163 of file mark3c.h.

◆ DECLARE_COROUTINE

#define DECLARE_COROUTINE (   name)
Value:
K_WORD TOKEN_2(__coroutine_, name)[WORD_ROUND(COROUTINE_SIZE)]; \
Coroutine_t name = (Coroutine_t)TOKEN_2(__coroutine_, name);
#define COROUTINE_SIZE
Definition: mark3c.h:83
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
void * Coroutine_t
Coroutine opaaque handle data type.
Definition: mark3c.h:50
#define TOKEN_2(x, y)
Definition: mark3c.h:115

Definition at line 171 of file mark3c.h.

◆ DECLARE_MAILBOX

#define DECLARE_MAILBOX (   name)
Value:
K_WORD TOKEN_2(__mailbox_, name)[WORD_ROUND(MAILBOX_SIZE)]; \
Mailbox_t name = (Mailbox_t)TOKEN_2(__mailbox_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
void * Mailbox_t
Mailbox opaque handle data type.
Definition: mark3c.h:39
#define MAILBOX_SIZE
Definition: mark3c.h:75
#define TOKEN_2(x, y)
Definition: mark3c.h:115

Definition at line 149 of file mark3c.h.

◆ DECLARE_MESSAGE

#define DECLARE_MESSAGE (   name)
Value:
K_WORD TOKEN_2(__message_, name)[WORD_ROUND(MESSAGE_SIZE)]; \
Message_t name = (Message_t)TOKEN_2(__message_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
void * Message_t
Message opaque handle data type.
Definition: mark3c.h:40
#define WORD_ROUND(x)
Definition: mark3c.h:119
#define MESSAGE_SIZE
Definition: mark3c.h:73
#define TOKEN_2(x, y)
Definition: mark3c.h:115

Definition at line 137 of file mark3c.h.

◆ DECLARE_MESSAGEPOOL

#define DECLARE_MESSAGEPOOL (   name)
Value:
K_WORD TOKEN_2(__messagepool_, name)[WORD_ROUND(MESSAGEPOOL_SIZE)]; \
MessagePool_t name = (MessagePool_t)TOKEN_2(__messagepool_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
#define TOKEN_2(x, y)
Definition: mark3c.h:115
void * MessagePool_t
MessagePool opaque handle data type.
Definition: mark3c.h:41
#define MESSAGEPOOL_SIZE
Definition: mark3c.h:80

Definition at line 141 of file mark3c.h.

◆ DECLARE_MESSAGEQUEUE

#define DECLARE_MESSAGEQUEUE (   name)
Value:
K_WORD TOKEN_2(__messagequeue_, name)[WORD_ROUND(MESSAGEQUEUE_SIZE)]; \
MessageQueue_t name = (MessageQueue_t)TOKEN_2(__messagequeue_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
#define TOKEN_2(x, y)
Definition: mark3c.h:115
void * MessageQueue_t
MessageQueue opaque handle data type.
Definition: mark3c.h:42
#define MESSAGEQUEUE_SIZE
Definition: mark3c.h:74

Definition at line 145 of file mark3c.h.

◆ DECLARE_MUTEX

#define DECLARE_MUTEX (   name)
Value:
K_WORD TOKEN_2(__mutex_, name)[WORD_ROUND(MUTEX_SIZE)]; \
Mutex_t name = (Mutex_t)TOKEN_2(__mutex_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
void * Mutex_t
Mutex opaque handle data type.
Definition: mark3c.h:43
#define MUTEX_SIZE
Definition: mark3c.h:72
#define WORD_ROUND(x)
Definition: mark3c.h:119
#define TOKEN_2(x, y)
Definition: mark3c.h:115

Definition at line 133 of file mark3c.h.

◆ DECLARE_NOTIFY

#define DECLARE_NOTIFY (   name)
Value:
K_WORD TOKEN_2(__notify_, name)[WORD_ROUND(NOTIFY_SIZE)]; \
Notify_t name = (Notify_t)TOKEN_2(__notify_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
void * Notify_t
Notification object opaque handle data type.
Definition: mark3c.h:44
#define NOTIFY_SIZE
Definition: mark3c.h:76
#define TOKEN_2(x, y)
Definition: mark3c.h:115

Definition at line 153 of file mark3c.h.

◆ DECLARE_READERWRITERLOCK

#define DECLARE_READERWRITERLOCK (   name)
Value:
K_WORD TOKEN_2(__readerwriterlock_, name)[WORD_ROUND(EVENTFLAG_SIZE)]; \
ReaderWriterLock_t name = (ReaderWriterLock_t)TOKEN_2(__readerwriterlock_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
#define TOKEN_2(x, y)
Definition: mark3c.h:115
void * ReaderWriterLock_t
Reader-writer-lock opaque handle data type.
Definition: mark3c.h:49

Definition at line 167 of file mark3c.h.

◆ DECLARE_SEMAPHORE

#define DECLARE_SEMAPHORE (   name)
Value:
K_WORD TOKEN_2(__semaphore_, name)[WORD_ROUND(SEMAPHORE_SIZE)]; \
Semaphore_t name = (Semaphore_t)TOKEN_2(__semaphore_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
void * Semaphore_t
Semaphore opaque handle data type.
Definition: mark3c.h:45
#define WORD_ROUND(x)
Definition: mark3c.h:119
#define TOKEN_2(x, y)
Definition: mark3c.h:115
#define SEMAPHORE_SIZE
Definition: mark3c.h:71

Definition at line 129 of file mark3c.h.

◆ DECLARE_THREAD

#define DECLARE_THREAD (   name)
Value:
K_WORD TOKEN_2(__thread_, name)[WORD_ROUND(THREAD_SIZE)]; \
Thread_t name = (Thread_t)TOKEN_2(__thread_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define WORD_ROUND(x)
Definition: mark3c.h:119
void * Thread_t
Thread opaque handle data type.
Definition: mark3c.h:46
#define TOKEN_2(x, y)
Definition: mark3c.h:115
#define THREAD_SIZE
Definition: mark3c.h:69

Definition at line 121 of file mark3c.h.

◆ DECLARE_TIMER

#define DECLARE_TIMER (   name)
Value:
K_WORD TOKEN_2(__timer_, name)[WORD_ROUND(TIMER_SIZE)]; \
Timer_t name = (Timer_t)TOKEN_2(__timer_, name);
#define K_WORD
Size of a data word.
Definition: portcfg.h:62
#define TIMER_SIZE
Definition: mark3c.h:70
#define WORD_ROUND(x)
Definition: mark3c.h:119
#define TOKEN_2(x, y)
Definition: mark3c.h:115
void * Timer_t
Timer opaque handle data type.
Definition: mark3c.h:47

Definition at line 125 of file mark3c.h.

◆ MAILBOX_SIZE

#define MAILBOX_SIZE   (sizeof(Fake_Mailbox))

Definition at line 75 of file mark3c.h.

◆ MESSAGE_SIZE

#define MESSAGE_SIZE   (sizeof(Fake_Message))

Definition at line 73 of file mark3c.h.

◆ MESSAGEPOOL_SIZE

#define MESSAGEPOOL_SIZE   (sizeof(Fake_MessagePool))

Definition at line 80 of file mark3c.h.

◆ MESSAGEQUEUE_SIZE

#define MESSAGEQUEUE_SIZE   (sizeof(Fake_MessageQueue))

Definition at line 74 of file mark3c.h.

◆ MUTEX_SIZE

#define MUTEX_SIZE   (sizeof(Fake_Mutex))

Definition at line 72 of file mark3c.h.

◆ NOTIFY_SIZE

#define NOTIFY_SIZE   (sizeof(Fake_Notify))

Definition at line 76 of file mark3c.h.

◆ READERWRITERLOCK_SIZE

#define READERWRITERLOCK_SIZE   (sizeof(Fake_ReaderWriterLock))

Definition at line 82 of file mark3c.h.

◆ SEMAPHORE_SIZE

#define SEMAPHORE_SIZE   (sizeof(Fake_Semaphore))

Definition at line 71 of file mark3c.h.

◆ THREAD_SIZE

#define THREAD_SIZE   (sizeof(Fake_Thread))

Definition at line 69 of file mark3c.h.

◆ TIMER_SIZE

#define TIMER_SIZE   (sizeof(Fake_Timer))

Definition at line 70 of file mark3c.h.

◆ TOKEN_1

#define TOKEN_1 (   x,
 
)    x##y

Definition at line 114 of file mark3c.h.

◆ TOKEN_2

#define TOKEN_2 (   x,
 
)    TOKEN_1(x, y)

Definition at line 115 of file mark3c.h.

◆ WORD_ROUND

#define WORD_ROUND (   x)    (((x) + (sizeof(K_WORD) - 1)) / sizeof(K_WORD))

Definition at line 119 of file mark3c.h.

Typedef Documentation

◆ ConditionVariable_t

typedef void* ConditionVariable_t

Condition Variable opaque handle data type.

Definition at line 48 of file mark3c.h.

◆ coroutine_callback_t

typedef void(* coroutine_callback_t) (Coroutine_t caller, void *pvContext)

Definition at line 64 of file mark3c.h.

◆ Coroutine_t

typedef void* Coroutine_t

Coroutine opaaque handle data type.

Definition at line 50 of file mark3c.h.

◆ kernel_debug_print_t

typedef void(* kernel_debug_print_t) (const char *szString_)

Definition at line 63 of file mark3c.h.

◆ Mailbox_t

typedef void* Mailbox_t

Mailbox opaque handle data type.

Definition at line 39 of file mark3c.h.

◆ Message_t

typedef void* Message_t

Message opaque handle data type.

Definition at line 40 of file mark3c.h.

◆ MessagePool_t

typedef void* MessagePool_t

MessagePool opaque handle data type.

Definition at line 41 of file mark3c.h.

◆ MessageQueue_t

typedef void* MessageQueue_t

MessageQueue opaque handle data type.

Definition at line 42 of file mark3c.h.

◆ Mutex_t

typedef void* Mutex_t

Mutex opaque handle data type.

Definition at line 43 of file mark3c.h.

◆ Notify_t

typedef void* Notify_t

Notification object opaque handle data type.

Definition at line 44 of file mark3c.h.

◆ panic_func_t

typedef void(* panic_func_t) (uint16_t u16PanicCode_)

Definition at line 288 of file mark3c.h.

◆ ReaderWriterLock_t

typedef void* ReaderWriterLock_t

Reader-writer-lock opaque handle data type.

Definition at line 49 of file mark3c.h.

◆ Semaphore_t

typedef void* Semaphore_t

Semaphore opaque handle data type.

Definition at line 45 of file mark3c.h.

◆ thread_entry_func_t

typedef void(* thread_entry_func_t) (void *pvArg_)

Definition at line 407 of file mark3c.h.

◆ Thread_t

typedef void* Thread_t

Thread opaque handle data type.

Definition at line 46 of file mark3c.h.

◆ timer_callback_t

typedef void(* timer_callback_t) (Thread_t hOwner_, void *pvData_)

Definition at line 576 of file mark3c.h.

◆ Timer_t

typedef void* Timer_t

Timer opaque handle data type.

Definition at line 47 of file mark3c.h.

Enumeration Type Documentation

◆ thread_state_t

Define the various states that a thread can be in

Enumerator
THREAD_STATE_EXIT 
THREAD_STATE_READY 

!< Thread has terminated via exit path

THREAD_STATE_BLOCKED 

!< Thread is ready to run

THREAD_STATE_STOP 

!< Thread is blocked on a blocking call

THREAD_STATE_INVALID 

!< Thread has been manually stopped

!< Invalid thread state

Definition at line 103 of file mark3c.h.

Function Documentation

◆ Alloc_Mailbox()

Mailbox_t Alloc_Mailbox ( void  )

Alloc_Mailbox.

See also
Mailbox* AutoAlloc::NewMailbox()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 123 of file mark3c.cpp.

◆ Alloc_Memory()

void* Alloc_Memory ( size_t  eSize_)

Alloc_Memory.

See also
void* AutoAlloc::NewRawData(size_t sSize_)
Parameters
eSize_Size in bytes to allocate from the one-time-allocate heap
Returns
Pointer to an allocated blob of memory, or nullptr if heap exhausted

◆ Alloc_Message()

Message_t Alloc_Message ( void  )

Alloc_Message.

See also
AutoAlloc::NewMessage()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 76 of file mark3c.cpp.

◆ Alloc_MessagePool()

MessagePool_t Alloc_MessagePool ( void  )

Definition at line 100 of file mark3c.cpp.

◆ Alloc_MessageQueue()

MessageQueue_t Alloc_MessageQueue ( void  )

Alloc_MessageQueue.

See also
MesageQueue* AutoAlloc::NewMessageQueue()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 88 of file mark3c.cpp.

◆ Alloc_Mutex()

Mutex_t Alloc_Mutex ( void  )

Alloc_Mutex.

See also
Mutex* AutoAlloc::NewMutex()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 52 of file mark3c.cpp.

◆ Alloc_Notify()

Notify_t Alloc_Notify ( void  )

Alloc_Notify.

See also
Notify* AutoAlloc::NewNotify()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 112 of file mark3c.cpp.

◆ Alloc_Semaphore()

Semaphore_t Alloc_Semaphore ( void  )

Alloc_Semaphore.

See also
Semaphore* AutoAlloc::NewSemaphore()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 40 of file mark3c.cpp.

◆ Alloc_Thread()

Thread_t Alloc_Thread ( void  )

Alloc_Thread.

See also
Thread* AutoAlloc::NewThread()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 156 of file mark3c.cpp.

◆ Alloc_Timer()

Timer_t Alloc_Timer ( void  )

Alloc_Timer.

See also
Timer* AutoAlloc::NewTimer()
Returns
Handle to an allocated object, or nullptr if heap exhausted

Definition at line 167 of file mark3c.cpp.

◆ Atomic_Add16()

uint16_t Atomic_Add16 ( uint16_t *  pu16Source_,
uint16_t  u16Val_ 
)

Atomic_Add16.

See also
uint16_t Atomic::Add(uint16_t *pu16Source_, uint16_t u16Val_)
Parameters
pu16Source_Pointer to a variable
u16Val_Value to add to the variable
Returns
Previously-held value in pu16Source_

Definition at line 649 of file mark3c.cpp.

◆ Atomic_Add32()

uint32_t Atomic_Add32 ( uint32_t *  pu32Source_,
uint32_t  u32Val_ 
)

Atomic_Add32.

See also
uint32_t Atomic::Add(uint32_t *pu32Source_, uint32_t u32Val_)
Parameters
pu32Source_Pointer to a variable
u32Val_Value to add to the variable
Returns
Previously-held value in pu32Source_

Definition at line 655 of file mark3c.cpp.

◆ Atomic_Add8()

uint8_t Atomic_Add8 ( uint8_t *  pu8Source_,
uint8_t  u8Val_ 
)

Atomic_Add8.

See also
uint8_t Atomic::Add(uint8_t *pu8Source_, uint8_t u8Val_)
Parameters
pu8Source_Pointer to a variable
u8Val_Value to add to the variable
Returns
Previously-held value in pu8Source_

Definition at line 643 of file mark3c.cpp.

◆ Atomic_Set16()

uint16_t Atomic_Set16 ( uint16_t *  pu16Source_,
uint16_t  u16Val_ 
)

Atomic_Set16.

See also
uint16_t Atomic::Set(uint16_t *pu16Source_, uint16_t u16Val_)
Parameters
pu16Source_Pointer to a variable to set the value of
u16Val_New value to set in the variable
Returns
Previously-set value

Definition at line 631 of file mark3c.cpp.

◆ Atomic_Set32()

uint32_t Atomic_Set32 ( uint32_t *  pu32Source_,
uint32_t  u32Val_ 
)

Atomic_Set32.

See also
uint32_t Atomic::Set(uint32_t *pu32Source_, uint32_t u32Val_)
Parameters
pu32Source_Pointer to a variable to set the value of
u32Val_New value to set in the variable
Returns
Previously-set value

Definition at line 637 of file mark3c.cpp.

◆ Atomic_Set8()

uint8_t Atomic_Set8 ( uint8_t *  pu8Source_,
uint8_t  u8Val_ 
)

Atomic_Set8.

See also
uint8_t Atomic::Set(uint8_t *pu8Source_, uint8_t u8Val_)
Parameters
pu8Source_Pointer to a variable to set the value of
u8Val_New value to set in the variable
Returns
Previously-set value

Definition at line 625 of file mark3c.cpp.

◆ Atomic_Sub16()

uint16_t Atomic_Sub16 ( uint16_t *  pu16Source_,
uint16_t  u16Val_ 
)

Atomic_Sub16.

See also
uint16_t Atomic::Sub(uint16_t *pu16Source_, uint16_t u16Val_)
Parameters
pu16Source_Pointer to a variable
u16Val_Value to subtract from the variable
Returns
Previously-held value in pu16Source_

Definition at line 667 of file mark3c.cpp.

◆ Atomic_Sub32()

uint32_t Atomic_Sub32 ( uint32_t *  pu32Source_,
uint32_t  u32Val_ 
)

Atomic_Sub32.

See also
uint32_t Atomic::Sub(uint32_t *pu32Source_, uint32_t u32Val_)
Parameters
pu32Source_Pointer to a variable
u32Val_Value to subtract from the variable
Returns
Previously-held value in pu32Source_

Definition at line 673 of file mark3c.cpp.

◆ Atomic_Sub8()

uint8_t Atomic_Sub8 ( uint8_t *  pu8Source_,
uint8_t  u8Val_ 
)

Atomic_Sub8.

See also
uint8_t Atomic::Sub(uint8_t *pu8Source_, uint8_t u8Val_)
Parameters
pu8Source_Pointer to a variable
u8Val_Value to subtract from the variable
Returns
Previously-held value in pu8Source_

Definition at line 661 of file mark3c.cpp.

◆ Atomic_TestAndSet()

bool Atomic_TestAndSet ( bool *  pbLock)

Atomic_TestAndSet.

See also
bool Atomic::TestAndSet(bool *pbLock)
Parameters
pbLockPointer to a value to test against. This will always be set to "true" at the end of a call to TestAndSet.
Returns
true - Lock value was "true" on entry, false - Lock was set

Definition at line 679 of file mark3c.cpp.

◆ ConditionVariable_Broadcast()

void ConditionVariable_Broadcast ( ConditionVariable_t  handle)

ConditionVariable_Broadcast.

See also
void ConditionVariable::Broadcast()
Parameters
handleHandle of the condition variable object

Definition at line 885 of file mark3c.cpp.

◆ ConditionVariable_Init()

void ConditionVariable_Init ( ConditionVariable_t  handle)

ConditionVariable_Init.

See also
void ConditionVariable::Init()
Parameters
handleHandle of the condition variable object

Definition at line 866 of file mark3c.cpp.

◆ ConditionVariable_Signal()

void ConditionVariable_Signal ( ConditionVariable_t  handle)

ConditionVariable_Signal.

See also
void ConditionVariable::Signal()
Parameters
handleHandle of the condition variable object

Definition at line 879 of file mark3c.cpp.

◆ ConditionVariable_TimedWait()

bool ConditionVariable_TimedWait ( ConditionVariable_t  handle,
Mutex_t  hMutex_,
uint32_t  u32WaitTimeMS_ 
)

ConditionVariable_TimedWait.

See also
bool ConditionVariable::Wait(Mutex* pclMutex_, uint32_t u32WaitTimeMS_)
Parameters
handleHandle of the condition variable object
hMutex_Handle of the mutex to lock on acquisition of the condition variable
u32WaitTimeMS_Maximum time to wait for object
Returns
true on success, false on timeout

Definition at line 891 of file mark3c.cpp.

◆ ConditionVariable_Wait()

void ConditionVariable_Wait ( ConditionVariable_t  handle,
Mutex_t  hMutex_ 
)

ConditionVariable_Wait.

See also
void ConditionVariable::Wait(Mutex* pclMutex_)
Parameters
handleHandle of the condition variable object
hMutex_Handle of the mutex to lock on acquisition of the condition variable

Definition at line 872 of file mark3c.cpp.

◆ Free_Mailbox()

void Free_Mailbox ( Mailbox_t  handle)

Definition at line 128 of file mark3c.cpp.

◆ Free_Memory()

void Free_Memory ( void *  pvObject_)

Free_Memory.

Parameters
pvObject_Pointer to previously allocated block of memory

Definition at line 34 of file mark3c.cpp.

◆ Free_Message()

void Free_Message ( Message_t  handle)

Definition at line 82 of file mark3c.cpp.

◆ Free_MessagePool()

void Free_MessagePool ( MessagePool_t  handle)

Definition at line 106 of file mark3c.cpp.

◆ Free_MessageQueue()

void Free_MessageQueue ( MessageQueue_t  handle)

Definition at line 94 of file mark3c.cpp.

◆ Free_Mutex()

void Free_Mutex ( Mutex_t  handle)

Definition at line 58 of file mark3c.cpp.

◆ Free_Notify()

void Free_Notify ( Notify_t  handle)

Definition at line 118 of file mark3c.cpp.

◆ Free_Semaphore()

void Free_Semaphore ( Semaphore_t  handle)

Definition at line 46 of file mark3c.cpp.

◆ Free_Thread()

void Free_Thread ( Thread_t  handle)

Definition at line 161 of file mark3c.cpp.

◆ Free_Timer()

void Free_Timer ( Timer_t  handle)

Definition at line 172 of file mark3c.cpp.

◆ Kernel_DebugPrint()

void Kernel_DebugPrint ( const char *  szString_)

KernelDebug_DebugPrint.

See also
void DebugPrint(const char* szString_)
Parameters
szString_String to print to debug interface

Definition at line 293 of file mark3c.cpp.

◆ Kernel_GetTicks()

uint32_t Kernel_GetTicks ( void  )

Kernel_GetTicks.

See also
Kernel::GetTicks()
Returns
Number of kernel ticks that have elapsed since boot

Definition at line 227 of file mark3c.cpp.

◆ Kernel_Init()

void Kernel_Init ( void  )

Kernel_Init.

See also
void Kernel::Init()

Definition at line 191 of file mark3c.cpp.

◆ Kernel_IsPanic()

bool Kernel_IsPanic ( void  )

Kernel_IsPanic.

See also
bool Kernel::IsPanic()
Returns
Whether or not the kernel is in a panic state

Definition at line 215 of file mark3c.cpp.

◆ Kernel_IsStarted()

bool Kernel_IsStarted ( void  )

Kernel_IsStarted.

See also
bool Kernel::IsStarted()
Returns
Whether or not the kernel has started - true = running, false = not started

Definition at line 203 of file mark3c.cpp.

◆ Kernel_Panic()

void Kernel_Panic ( uint16_t  u16Cause_)

Kernel_Panic.

See also
void Kernel::Panic(uint16_t u16Cause_)
Parameters
u16Cause_Reason for the kernel panic

Definition at line 221 of file mark3c.cpp.

◆ Kernel_SetDebugPrintFunction()

void Kernel_SetDebugPrintFunction ( kernel_debug_print_t  pfPrintFunction_)

Kernel_SetDebugPrintFunction.

See also
void Kernel::SetDebugPrintFunction()
Parameters
pfPrintFunction_Function to use to print debug information from the kernel

Definition at line 287 of file mark3c.cpp.

◆ Kernel_SetPanic()

void Kernel_SetPanic ( panic_func_t  pfPanic_)

Kernel_SetPanic.

See also
void Kernel::SetPanic(PanicFunc_t pfPanic_)
Parameters
pfPanic_Panic function pointer

Definition at line 209 of file mark3c.cpp.

◆ Kernel_Start()

void Kernel_Start ( void  )

Kernel_Start.

See also
void Kernel::Start()

Definition at line 197 of file mark3c.cpp.

◆ Mailbox_GetFreeSlots()

uint16_t Mailbox_GetFreeSlots ( Mailbox_t  handle)

Mailbox_GetFreeSlots.

See also
uint16_t Mailbox::GetFreeSlots()
Parameters
handleHandle of the mailbox object
Returns
Number of free slots in the mailbox

Definition at line 843 of file mark3c.cpp.

◆ Mailbox_Init()

void Mailbox_Init ( Mailbox_t  handle,
void *  pvBuffer_,
uint16_t  u16BufferSize_,
uint16_t  u16ElementSize_ 
)

Mailbox_Init.

See also
void Mailbox::Init(void *pvBuffer_, uint16_t u16BufferSize_, uint16_t u16ElementSize_ )
Parameters
handleHandle of the mailbox object
pvBuffer_Pointer to the static buffer to use for the mailbox
u16BufferSize_Size of the mailbox buffer, in bytes
u16ElementSize_Size of each envelope, in bytes

Definition at line 780 of file mark3c.cpp.

◆ Mailbox_IsEmpty()

bool Mailbox_IsEmpty ( Mailbox_t  handle)

Mailbox_IsEmpty.

See also
bool Mailbox::IsEmpty()
Parameters
handleHandle of the mailbox object
Returns
true if the mailbox is empty, false otherwise

Definition at line 857 of file mark3c.cpp.

◆ Mailbox_IsFull()

bool Mailbox_IsFull ( Mailbox_t  handle)

Mailbox_IsFull.

See also
bool Mailbox::IsFull()
Parameters
handleHandle of the mailbox object
Returns
true if the mailbox is full, false otherwise

Definition at line 850 of file mark3c.cpp.

◆ Mailbox_Receive()

void Mailbox_Receive ( Mailbox_t  handle,
void *  pvData_ 
)

Mailbox_Receive.

See also
void Mailbox::Receive(void *pvData_)
Parameters
handleHandle of the mailbox object
pvData_Pointer to a buffer that will have the envelope's contents copied into upon delivery.

Definition at line 815 of file mark3c.cpp.

◆ Mailbox_ReceiveTail()

void Mailbox_ReceiveTail ( Mailbox_t  handle,
void *  pvData_ 
)

Mailbox_ReceiveTail.

See also
void Mailbox::ReceiveTail(void *pvData_)
Parameters
handleHandle of the mailbox object
pvData_Pointer to a buffer that will have the envelope's contents copied into upon delivery.

Definition at line 822 of file mark3c.cpp.

◆ Mailbox_Send()

bool Mailbox_Send ( Mailbox_t  handle,
void *  pvData_ 
)

Mailbox_Send.

See also
bool Mailbox::Send(void *pvData_)
Parameters
handleHandle of the mailbox object
pvData_Pointer to the data object to send to the mailbox.
Returns
true - envelope was delivered, false - mailbox is full.

Definition at line 787 of file mark3c.cpp.

◆ Mailbox_SendTail()

bool Mailbox_SendTail ( Mailbox_t  handle,
void *  pvData_ 
)

Mailbox_SendTail.

See also
bool Mailbox::SendTail(void *pvData_)
Parameters
handleHandle of the mailbox object
pvData_Pointer to the data object to send to the mailbox.
Returns
true - envelope was delivered, false - mailbox is full.

Definition at line 794 of file mark3c.cpp.

◆ Mailbox_TimedReceive()

bool Mailbox_TimedReceive ( Mailbox_t  handle,
void *  pvData_,
uint32_t  u32TimeoutMS_ 
)

Mailbox_TimedReceive.

See also
bool Mailbox::Receive(void *pvData_, uint32_t u32TimeoutMS_ )
Parameters
handleHandle of the mailbox object
pvData_Pointer to a buffer that will have the envelope's contents copied into upon delivery.
u32TimeoutMS_Maximum time to wait for delivery.
Returns
true - envelope was delivered, false - delivery timed out.

Definition at line 829 of file mark3c.cpp.

◆ Mailbox_TimedReceiveTail()

bool Mailbox_TimedReceiveTail ( Mailbox_t  handle,
void *  pvData_,
uint32_t  u32TimeoutMS_ 
)

Mailbox_TimedReceiveTail.

See also
bool Mailbox::ReceiveTail(void *pvData_, uint32_t u32TimeoutMS_ )
Parameters
handleHandle of the mailbox object
pvData_Pointer to a buffer that will have the envelope's contents copied into upon delivery.
u32TimeoutMS_Maximum time to wait for delivery.
Returns
true - envelope was delivered, false - delivery timed out.

Definition at line 836 of file mark3c.cpp.

◆ Mailbox_TimedSend()

bool Mailbox_TimedSend ( Mailbox_t  handle,
void *  pvData_,
uint32_t  u32TimeoutMS_ 
)

Mailbox_TimedSend.

See also
bool Mailbox::Send(void *pvData_, uint32_t u32TimeoutMS_)
Parameters
handleHandle of the mailbox object
pvData_Pointer to the data object to send to the mailbox.
u32TimeoutMS_Maximum time to wait for a free transmit slot
Returns
true - envelope was delivered, false - mailbox is full.

Definition at line 801 of file mark3c.cpp.

◆ Mailbox_TimedSendTail()

bool Mailbox_TimedSendTail ( Mailbox_t  handle,
void *  pvData_,
uint32_t  u32TimeoutMS_ 
)

Mailbox_TimedSendTail.

See also
bool Mailbox::Send(void *pvData_, uint32_t u32TimeoutMS_)
Parameters
handleHandle of the mailbox object
pvData_Pointer to the data object to send to the mailbox.
u32TimeoutMS_Maximum time to wait for a free transmit slot
Returns
true - envelope was delivered, false - mailbox is full.

Definition at line 808 of file mark3c.cpp.

◆ Message_GetCode()

uint16_t Message_GetCode ( Message_t  handle)

Message_GetCode.

See also
uint16_t Message::GetCode()
Parameters
handleHandle of the message object
Returns
user code set in the object

Definition at line 715 of file mark3c.cpp.

◆ Message_GetData()

void* Message_GetData ( Message_t  handle)

Message_GetData.

See also
void* Message::GetData()
Parameters
handleHandle of the message object
Returns
Pointer to the data set in the message object

Definition at line 701 of file mark3c.cpp.

◆ Message_Init()

void Message_Init ( Message_t  handle)

Message_Init.

See also
void Message::Init()
Parameters
handleHandle of the message object

Definition at line 687 of file mark3c.cpp.

◆ Message_SetCode()

void Message_SetCode ( Message_t  handle,
uint16_t  u16Code_ 
)

Message_SetCode.

See also
void Message::SetCode(uint16_t u16Code_)
Parameters
handleHandle of the message object
u16Code_Data code to set in the object

Definition at line 708 of file mark3c.cpp.

◆ Message_SetData()

void Message_SetData ( Message_t  handle,
void *  pvData_ 
)

Message_SetData.

See also
void Message::SetData(void *pvData_)
Parameters
handleHandle of the message object
pvData_Pointer to the data object to send in the message

Definition at line 694 of file mark3c.cpp.

◆ MessagePool_Init()

void MessagePool_Init ( MessagePool_t  handle)

MessagePool_Init.

See also
void MessagePool::Init()
Parameters
handleHandle of the message pool object

Definition at line 736 of file mark3c.cpp.

◆ MessagePool_Pop()

Message_t MessagePool_Pop ( MessagePool_t  handle)

MessagePool_Pop.

See also
Message* MessagePool::Pop()
Parameters
handleHandle of the message pool object
Returns
Handle to a Message object, or nullptr on allocation error

Definition at line 750 of file mark3c.cpp.

◆ MessagePool_Push()

void MessagePool_Push ( MessagePool_t  handle,
Message_t  msg 
)

MessagePool_Push.

See also
void MessagePool::Push(Message* pclMessage_)
Parameters
handleHandle of the message pool object
msgMessage object to return back to the pool

Definition at line 743 of file mark3c.cpp.

◆ MessageQueue_GetCount()

uint16_t MessageQueue_GetCount ( MessageQueue_t  handle)

MessageQueue_GetCount.

See also
uint16_t MessageQueue::GetCount()
Returns
Count of pending messages in the queue.

Definition at line 771 of file mark3c.cpp.

◆ MessageQueue_Init()

void MessageQueue_Init ( MessageQueue_t  handle)

MessageQueue_Init.

See also
void MessageQueue::Init()
Parameters
handleHandle to the message queue to initialize

Definition at line 722 of file mark3c.cpp.

◆ MessageQueue_Receive()

Message_t MessageQueue_Receive ( MessageQueue_t  handle)

MessageQueue_Receive.

See also
Message_t MessageQueue::Receive()
Parameters
handleHandle of the message queue object
Returns
Pointer to a message object at the head of the queue

Definition at line 729 of file mark3c.cpp.

◆ MessageQueue_Send()

void MessageQueue_Send ( MessageQueue_t  handle,
Message_t  hMessage_ 
)

MessageQueue_Send.

See also
void MessageQueue::Send(Message *pclMessage_)
Parameters
handleHandle of the message queue object
hMessage_Handle to the message to send to the given queue

Definition at line 764 of file mark3c.cpp.

◆ MessageQueue_TimedReceive()

Message_t MessageQueue_TimedReceive ( MessageQueue_t  handle,
uint32_t  u32TimeWaitMS_ 
)

MessageQueue_TimedReceive.

See also
Message_t MessageQueue::TimedReceive(uint32_t u32TimeWaitMS_)
Parameters
handleHandle of the message queue object
u32TimeWaitMS_The amount of time in ms to wait for a message before timing out and unblocking the waiting thread.
Returns
Pointer to a message object at the head of the queue or nullptr on timeout.

Definition at line 757 of file mark3c.cpp.

◆ Mutex_Claim()

void Mutex_Claim ( Mutex_t  handle)

Mutex_Claim.

See also
void Mutex::Claim()
Parameters
handleHandle of the mutex

Definition at line 526 of file mark3c.cpp.

◆ Mutex_Init()

void Mutex_Init ( Mutex_t  handle)

Mutex_Init.

See also
void Mutex::Init()
Parameters
handleHandle of the mutex

Definition at line 519 of file mark3c.cpp.

◆ Mutex_Release()

void Mutex_Release ( Mutex_t  handle)

Mutex_Release.

See also
void Mutex::Release()
Parameters
handleHandle of the mutex

Definition at line 533 of file mark3c.cpp.

◆ Mutex_TimedClaim()

bool Mutex_TimedClaim ( Mutex_t  handle,
uint32_t  u32WaitTimeMS_ 
)

Mutex_TimedClaim.

See also
bool Mutex::Claim(uint32_t u32WaitTimeMS_)
Parameters
handleHandle of the mutex
u32WaitTimeMS_Time to wait before aborting
Returns
true if mutex was claimed, false on timeout

Definition at line 540 of file mark3c.cpp.

◆ Notify_Init()

void Notify_Init ( Notify_t  handle)

Notify_Init.

See also
void Notify::Init()
Parameters
handleHandle of the notification object

Definition at line 595 of file mark3c.cpp.

◆ Notify_Signal()

void Notify_Signal ( Notify_t  handle)

Notify_Signal.

See also
void Notify::Signal()
Parameters
handleHandle of the notification object

Definition at line 602 of file mark3c.cpp.

◆ Notify_TimedWait()

bool Notify_TimedWait ( Notify_t  handle,
uint32_t  u32WaitTimeMS_,
bool *  pbFlag_ 
)

Notify_TimedWait.

See also
bool Notify::Wait(uint32_t u32WaitTimeMS_, bool *pbFlag_)
Parameters
handleHandle of the notification object
u32WaitTimeMS_Maximum time to wait for notification in ms
pbFlag_Flag to set to true on notification
Returns
true on unblock, false on timeout

Definition at line 616 of file mark3c.cpp.

◆ Notify_Wait()

void Notify_Wait ( Notify_t  handle,
bool *  pbFlag_ 
)

Notify_Wait.

See also
void Notify::Wait(bool *pbFlag_)
Parameters
handleHandle of the notification object
pbFlag_Flag to set to true on notification

Definition at line 609 of file mark3c.cpp.

◆ ReaderWriterLock_AcquireReader()

void ReaderWriterLock_AcquireReader ( ReaderWriterLock_t  handle)

ReaderWriterLock_AcquireReader.

See also
void ReaderWriterLock::AcquireReader()
Parameters
handleHandle of the reader-writer object

Definition at line 908 of file mark3c.cpp.

◆ ReaderWriterLock_AcquireWriter()

void ReaderWriterLock_AcquireWriter ( ReaderWriterLock_t  handle)

ReaderWriterLock_AcquireWriter.

See also
void ReaderWriterLock::AcquireWriter()
Parameters
handleHandle of the reader-writer object

Definition at line 922 of file mark3c.cpp.

◆ ReaderWriterLock_Init()

void ReaderWriterLock_Init ( ReaderWriterLock_t  handle)

ReaderWriterLock_Init.

See also
void ReaderWriterLock::Init()
Parameters
handleHandle of the reader-writer object

Definition at line 901 of file mark3c.cpp.

◆ ReaderWriterLock_ReleaseReader()

void ReaderWriterLock_ReleaseReader ( ReaderWriterLock_t  handle)

ReaderWriterLock_ReleaseReader.

See also
void ReaderWriterLock::ReleaseReader()
Parameters
handleHandle of the reader-writer object

Definition at line 915 of file mark3c.cpp.

◆ ReaderWriterLock_ReleaseWriter()

void ReaderWriterLock_ReleaseWriter ( ReaderWriterLock_t  handle)

ReaderWriterLock_ReleaseWriter.

See also
void ReaderWriterLock::ReleaseWriter()
Parameters
handleHandle of the reader-writer object

Definition at line 929 of file mark3c.cpp.

◆ ReaderWriterLock_TimedAcquireReader()

bool ReaderWriterLock_TimedAcquireReader ( ReaderWriterLock_t  handle,
uint32_t  u32TimeoutMs_ 
)

ReaderWriterLock_TimedAcquireReader.

See also
bool ReaderWriterLock::AcquireReader(uint32_t u32TimeoutMs_)
Parameters
handleHandle of the reader-writer object
u32TimeoutMs_Maximum time to wait for the reader lock before bailing
Returns
true on success, false on timeout

Definition at line 943 of file mark3c.cpp.

◆ ReaderWriterLock_TimedAcquireWriter()

bool ReaderWriterLock_TimedAcquireWriter ( ReaderWriterLock_t  handle,
uint32_t  u32TimeoutMs_ 
)

ReaderWriterLock_TimedAcquireWriter.

See also
bool ReaderWriterLock::AcquireWriter(uint32_t u32TimeoutMs_)
Parameters
handleHandle of the reader-writer object
u32TimeoutMs_Maximum time to wait for the writer lock before bailing
Returns
true on success, false on timeout

Definition at line 936 of file mark3c.cpp.

◆ Scheduler_Enable()

void Scheduler_Enable ( bool  bEnable_)

Scheduler_Enable.

See also
void Scheduler::SetScheduler(bool bEnable_)
Parameters
bEnable_true to enable, false to disable the scheduler

Definition at line 300 of file mark3c.cpp.

◆ Scheduler_GetCurrentThread()

Thread_t Scheduler_GetCurrentThread ( void  )

Scheduler_GetCurrentThread.

See also
Thread* Scheduler::GetCurrentThread()
Returns
Handle of the currently-running thread

Definition at line 312 of file mark3c.cpp.

◆ Scheduler_IsEnabled()

bool Scheduler_IsEnabled ( void  )

Scheduler_IsEnabled.

See also
bool Scheduler::IsEnabled()
Returns
true - scheduler enabled, false - disabled

Definition at line 306 of file mark3c.cpp.

◆ Semaphore_Init()

void Semaphore_Init ( Semaphore_t  handle,
uint16_t  u16InitVal_,
uint16_t  u16MaxVal_ 
)

Semaphore_Init.

See also
void Semaphore::Init(uint16_t u16InitVal_, uint16_t u16MaxVal_)
Parameters
handleHandle of the semaphore
u16InitVal_Initial value of the semaphore
u16MaxVal_Maximum value that can be held for a semaphore

Definition at line 489 of file mark3c.cpp.

◆ Semaphore_Pend()

void Semaphore_Pend ( Semaphore_t  handle)

Semaphore_Pend.

See also
void Semaphore::Pend()
Parameters
handleHandle of the semaphore

Definition at line 503 of file mark3c.cpp.

◆ Semaphore_Post()

void Semaphore_Post ( Semaphore_t  handle)

Semaphore_Post.

See also
void Semaphore::Post()
Parameters
handleHandle of the semaphore

Definition at line 496 of file mark3c.cpp.

◆ Semaphore_TimedPend()

bool Semaphore_TimedPend ( Semaphore_t  handle,
uint32_t  u32WaitTimeMS_ 
)

Semaphore_TimedPend.

See also
bool Semaphore::Pend(uint32_t u32WaitTimeMS_)
Parameters
handleHandle of the semaphore
u32WaitTimeMS_Time in ms to wait
Returns
true if semaphore was acquired, false on timeout

Definition at line 510 of file mark3c.cpp.

◆ Thread_CoopYield()

void Thread_CoopYield ( void  )

Thread_CoopYield.

See also
void Thread::CoopYield()

Definition at line 426 of file mark3c.cpp.

◆ Thread_Exit()

void Thread_Exit ( Thread_t  handle)

Thread_Exit.

See also
void Thread::Exit()
Parameters
handleHandle of the thread

Definition at line 392 of file mark3c.cpp.

◆ Thread_GetCurPriority()

PORT_PRIO_TYPE Thread_GetCurPriority ( Thread_t  handle)

Thread_GetCurPriority.

See also
PORT_PRIO_TYPE Thread::GetCurPriority()
Parameters
handleHandle of the thread
Returns
Current priority of the thread considering priority inheritence

Definition at line 365 of file mark3c.cpp.

◆ Thread_GetID()

uint8_t Thread_GetID ( Thread_t  handle)

Thread_GetID.

See also
uint8_t Thread::GetID()
Parameters
handleHandle of the thread
Returns
Return ID assigned to the thread

Definition at line 437 of file mark3c.cpp.

◆ Thread_GetPriority()

PORT_PRIO_TYPE Thread_GetPriority ( Thread_t  handle)

Thread_GetPriority.

See also
PORT_PRIO_TYPE Thread::GetPriority()
Parameters
handleHandle of the thread
Returns
Current priority of the thread not considering priority inheritence

Definition at line 359 of file mark3c.cpp.

◆ Thread_GetState()

thread_state_t Thread_GetState ( Thread_t  handle)

Thread_GetState.

See also
ThreadState Thread::GetState()
Parameters
handleHandle of the thread
Returns
The thread's current execution state

Definition at line 449 of file mark3c.cpp.

◆ Thread_Init()

void Thread_Init ( Thread_t  handle,
K_WORD pwStack_,
uint16_t  u16StackSize_,
PORT_PRIO_TYPE  uXPriority_,
thread_entry_func_t  pfEntryPoint_,
void *  pvArg_ 
)

Thread_Init.

See also
void Thread::Init(K_WORD *pwStack_, uint16_t u16StackSize_, PORT_PRIO_TYPE uXPriority_, ThreadEntry_t pfEntryPoint_, void *pvArg_)
Parameters
handleHandle of the thread to initialize
pwStack_Pointer to the stack to use for the thread
u16StackSize_Size of the stack (in bytes)
uXPriority_Priority of the thread (0 = idle, 7 = max)
pfEntryPoint_This is the function that gets called when the thread is started
pvArg_Pointer to the argument passed into the thread's entrypoint function.

Definition at line 321 of file mark3c.cpp.

◆ Thread_SetID()

void Thread_SetID ( Thread_t  handle,
uint8_t  u8ID_ 
)

Thread_SetID.

See also
void Thread::SetID(uint8_t u8ID_)
Parameters
handleHandle of the thread
u8ID_ID To assign to the thread

Definition at line 431 of file mark3c.cpp.

◆ Thread_SetPriority()

void Thread_SetPriority ( Thread_t  handle,
PORT_PRIO_TYPE  uXPriority_ 
)

Thread_SetPriority.

See also
void Thread::SetPriority(PORT_PRIO_TYPE uXPriority_)
Parameters
handleHandle of the thread
uXPriority_New priority level

Definition at line 385 of file mark3c.cpp.

◆ Thread_Sleep()

void Thread_Sleep ( uint32_t  u32TimeMs_)

Thread_Sleep.

See also
void Thread::Sleep(uint32_t u32TimeMs_)
Parameters
u32TimeMs_Time in ms to block the thread for

Definition at line 399 of file mark3c.cpp.

◆ Thread_Start()

void Thread_Start ( Thread_t  handle)

Thread_Start.

See also
void Thread::Start()
Parameters
handleHandle of the thread to start

Definition at line 333 of file mark3c.cpp.

◆ Thread_Stop()

void Thread_Stop ( Thread_t  handle)

Thread_Stop.

See also
void Thread::Stop()
Parameters
handleHandle of the thread to stop

Definition at line 340 of file mark3c.cpp.

◆ Thread_Yield()

void Thread_Yield ( void  )

Thread_Yield.

See also
void Thread::Yield()

Definition at line 421 of file mark3c.cpp.

◆ Timer_Init()

void Timer_Init ( Timer_t  handle)

Timer_Init.

See also
void Timer::Init()
Parameters
handleHandle of the timer

Definition at line 459 of file mark3c.cpp.

◆ Timer_Restart()

void Timer_Restart ( Timer_t  handle)

Timer_Restart.

See also
void Timer::Start()
Parameters
handleHandle of the timer to restart.

Definition at line 480 of file mark3c.cpp.

◆ Timer_Start()

void Timer_Start ( Timer_t  handle,
bool  bRepeat_,
uint32_t  u32IntervalMs_,
timer_callback_t  pfCallback_,
void *  pvData_ 
)

Timer_Start.

See also
void Timer::Start(bool bRepeat_, uint32_t u32IntervalMs_, uint32_t u32ToleranceMs_, TimerCallbackC_t pfCallback_, void *pvData_ )
Parameters
handleHandle of the timer
bRepeat_Restart the timer continuously on expiry
u32IntervalMs_Time in ms to expiry
pfCallback_Callback to run on timer expiry
pvData_Data to pass to the callback on expiry

Definition at line 466 of file mark3c.cpp.

◆ Timer_Stop()

void Timer_Stop ( Timer_t  handle)

Timer_Stop.

See also
void Timer::Stop()
Parameters
handleHandle of the timer

Definition at line 473 of file mark3c.cpp.