Functions | |
void | SMPHAcquire (uint32_t ui32Semaphore) |
Acquire a semaphore. More... | |
static bool | SMPHTryAcquire (uint32_t ui32Semaphore) |
Try to Acquire a semaphore. More... | |
static void | SMPHRelease (uint32_t ui32Semaphore) |
Release a semaphore. More... | |
The MCU Semaphore offers 32 semaphores that each can be claimed and released in an atomic operation. One and only one semaphore can be handled during a transaction.
Claiming a semaphore causes subsequent claims/reads to return '0' (i.e. "not available"). How the semaphores are used and respected is decided by software.
The API functions can be grouped like this:
Semaphore acquire:
Semaphore release:
void SMPHAcquire | ( | uint32_t | ui32Semaphore | ) |
Acquire a semaphore.
This function acquires the given semaphore, blocking the call until the semaphore is available.
|
inlinestatic |
Release a semaphore.
This function releases the given semaphore.
|
inlinestatic |
Try to Acquire a semaphore.
This function tries to acquire the given semaphore, if the semaphore could not be claimed the function returns false.
true
: Semaphore acquired.false
: Semaphore not acquired. #define SMPH_0 0 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_1 1 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_10 10 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_11 11 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_12 12 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_13 13 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_14 14 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_15 15 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_16 16 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_17 17 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_18 18 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_19 19 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_2 2 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_20 20 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_21 21 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_22 22 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_23 23 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_24 24 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_25 25 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_26 26 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_27 27 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_28 28 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_29 29 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_3 3 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_30 30 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_31 31 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_4 4 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_5 5 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_6 6 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_7 7 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_8 8 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_9 9 |
Referenced by SMPHAcquire(), SMPHRelease(), and SMPHTryAcquire().
#define SMPH_CLAIMED 0x00000000 |
Referenced by SMPHAcquire().
#define SMPH_FREE 0x00000001 |
Referenced by SMPHRelease(), and SMPHTryAcquire().