Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
cascoda_os.c File Reference
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include "cascoda-bm/cascoda_os.h"
#include "ca821x_toolchain.h"
Include dependency graph for cascoda_os.c:

Enumerations

enum  { LOCK_INIT = 0xCA , LOCK_LOCKED = 0xC0 }
 

Functions

CA_TOOL_WEAK void CA_OS_Init ()
 Initialise the CA_OS subsystem.
 
CA_TOOL_WEAK void CA_OS_LockAPI ()
 Lock the Cascoda API thread, for safely calling Cascoda API functions.
 
CA_TOOL_WEAK void CA_OS_UnlockAPI ()
 Release the Cascoda API lock.
 
CA_TOOL_WEAK void CA_OS_Yield ()
 Yield the CPU to a different task.
 
CA_TOOL_WEAK ca_mutex CA_OS_MutexInit ()
 Initialise a mutex for inter-thread control in an OS-independent manner.
 
CA_TOOL_WEAK void CA_OS_MutexLock (ca_mutex *aMutex)
 Claim a mutex, blocking until it is taken Mutex must be initialised with CA_OS_MutexInit Counterpart is CA_OS_MutexUnlock.
 
CA_TOOL_WEAK void CA_OS_MutexUnlock (ca_mutex *aMutex)
 Unlock a claimed mutex Counterpart is CA_OS_MutexLock.
 
CA_TOOL_WEAK void CA_OS_SchedulerSuspend (void)
 Suspend the scheduler so that it will not pre-emptively context switch to another task.
 
CA_TOOL_WEAK void CA_OS_SchedulerResume (void)
 Resume the scheduler so pre-emption begins again.
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LOCK_INIT 
LOCK_LOCKED