uwb-core DPL (Decawave Porting Layer) semapahore wrappers
More...
uwb-core DPL (Decawave Porting Layer) semapahore wrappers
- Author
- Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr
Definition in file dpl_sem.h.
#include <stdint.h>
#include "dpl_types.h"
#include "dpl_error.h"
#include "sema.h"
Go to the source code of this file.
◆ dpl_sem_init()
Initialize a semaphore.
- Parameters
-
[in] | sem | pointer to semaphore |
[in] | tokens | # of tokens the semaphore should contain initially. |
- Returns
- dpl_error_t DPL_INVALID_PARM Semaphore passed in was NULL. DPL_OK no error.
◆ dpl_sem_pend()
Pend (wait) for a semaphore.
- Parameters
-
[in] | sem | pointer to semaphore. |
[in] | timeout | timeout, in os ticks. A timeout of 0 means do not wait if not available. A timeout of DPL_TIMEOUT_NEVER means wait forever. |
- Returns
- dpl_error_t DPL_INVALID_PARM semaphore passed in was NULL. DPL_TIMEOUT semaphore was owned by another task and timeout=0 DPL_OK no error
◆ dpl_sem_release()
Release a semaphore.
- Parameters
-
[in] | sem | pointer to the semaphore to be released |
- Returns
- dpl_error_t DPL_INVALID_PARM semaphore passed in was NULL. DPL_OK no error