|
Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
OS abstraction functions - in baremetal (no rtos) these are just stubs! More...

Macros | |
| #define | CA_OS_LOCKED(x) |
| Shorthand to perform an action with the API Lock taken. More... | |
Typedefs | |
| typedef void * | ca_mutex |
| Generic mutex type. More... | |
Functions | |
| void | CA_OS_Init (void) |
| Initialise the CA_OS subsystem. More... | |
| void | CA_OS_Yield (void) |
| Yield the CPU to a different task. More... | |
| ca_mutex | CA_OS_MutexInit (void) |
| Initialise a mutex for inter-thread control in an OS-independent manner. More... | |
| 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. More... | |
| void | CA_OS_MutexUnlock (ca_mutex *aMutex) |
| Unlock a claimed mutex Counterpart is CA_OS_MutexLock. More... | |
| void | CA_OS_SchedulerSuspend (void) |
| Suspend the scheduler so that it will not pre-emptively context switch to another task. More... | |
| void | CA_OS_SchedulerResume (void) |
| Resume the scheduler so pre-emption begins again. More... | |
| void | CA_OS_LockAPI (void) |
| Lock the Cascoda API thread, for safely calling Cascoda API functions. More... | |
| void | CA_OS_UnlockAPI (void) |
| Release the Cascoda API lock. More... | |
OS abstraction functions - in baremetal (no rtos) these are just stubs!
| #define CA_OS_LOCKED | ( | x | ) |
Shorthand to perform an action with the API Lock taken.
| typedef void* ca_mutex |
Generic mutex type.
| void CA_OS_Init | ( | void | ) |
Initialise the CA_OS subsystem.
This should be called before the scheduler is started. In non-OS applications it is called by EVBME_Initialise.
| void CA_OS_LockAPI | ( | void | ) |
Lock the Cascoda API thread, for safely calling Cascoda API functions.
Implemented with a counter, so can be called multiple times as long as CA_OS_UnlockAPI is called the same number of times. Counterpart is CA_OS_UnlockAPI
| ca_mutex CA_OS_MutexInit | ( | void | ) |
Initialise a mutex for inter-thread control in an OS-independent manner.
Non-recursive mutex.
| 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.
| aMutex | The mutex to lock |
| void CA_OS_MutexUnlock | ( | ca_mutex * | aMutex | ) |
Unlock a claimed mutex Counterpart is CA_OS_MutexLock.
| aMutex | the mutex to unlock |
| void CA_OS_SchedulerResume | ( | void | ) |
Resume the scheduler so pre-emption begins again.
Counterpart is CA_OS_SchedulerSuspend.
| void CA_OS_SchedulerSuspend | ( | void | ) |
Suspend the scheduler so that it will not pre-emptively context switch to another task.
Useful for system initialisation such as initialising a mutex. Implemented with a counter, so can be called multiple times as long as CA_OS_SchedulerResume is called the same number of times. Counterpart is CA_OS_SchedulerResume.
| void CA_OS_UnlockAPI | ( | void | ) |
Release the Cascoda API lock.
Counterpart is CA_OS_LockAPI
| void CA_OS_Yield | ( | void | ) |
Yield the CPU to a different task.