DJI Payload SDK  1.5.3
Functions
Exported Functions

Functions

E_PsdkStat PsdkSys_MutexNew (uint32_t *mutex)
 Declare the mutex container, initialize the mutex, and create mutex ID. More...
 
E_PsdkStat PsdkSys_MutexDestroy (uint32_t *mutex)
 Delete the created mutex. More...
 
E_PsdkStat PsdkSys_MutexLock (uint32_t *mutex)
 Acquire and lock the mutex when peripheral access is required. More...
 
E_PsdkStat PsdkSys_MutexUnlock (uint32_t *mutex)
 Unlock and release the mutex, when done with the peripheral access. More...
 
E_PsdkStat PsdkSys_SemaphoreNew (uint32_t *semaphore, uint32_t count)
 Declare the semaphore container, initialize the semaphore, and create semaphore ID. More...
 
E_PsdkStat PsdkSys_SemaphoreDestroy (uint32_t *semaphore)
 Delete the created semaphore. More...
 
E_PsdkStat PsdkSys_SemaphoreTimedWait (uint32_t *semaphore, uint32_t waitTime)
 Wait the semaphore until token becomes available. More...
 
E_PsdkStat PsdkSys_SemaphorePost (uint32_t *semaphore)
 Release the semaphore token. More...
 

Detailed Description

Function Documentation

◆ PsdkSys_MutexNew()

E_PsdkStat PsdkSys_MutexNew ( uint32_t *  mutex)

Declare the mutex container, initialize the mutex, and create mutex ID.

Parameters
mutexpointer to the created mutex ID.
Returns
an enum that represents a status of PSDK
Parameters
mutexSpecifies mutex ID data type.

◆ PsdkSys_MutexDestroy()

E_PsdkStat PsdkSys_MutexDestroy ( uint32_t *  mutex)

Delete the created mutex.

Parameters
mutexpointer to the created mutex ID.
Returns
an enum that represents a status of PSDK
Parameters
mutexSpecifies mutex ID data type.

◆ PsdkSys_MutexLock()

E_PsdkStat PsdkSys_MutexLock ( uint32_t *  mutex)

Acquire and lock the mutex when peripheral access is required.

Parameters
mutexpointer to the created mutex ID.
Returns
an enum that represents a status of PSDK
Parameters
mutexSpecifies mutex ID data type.

◆ PsdkSys_MutexUnlock()

E_PsdkStat PsdkSys_MutexUnlock ( uint32_t *  mutex)

Unlock and release the mutex, when done with the peripheral access.

Parameters
mutexpointer to the created mutex ID.
Returns
an enum that represents a status of PSDK
Parameters
mutexSpecifies mutex ID data type.

◆ PsdkSys_SemaphoreNew()

E_PsdkStat PsdkSys_SemaphoreNew ( uint32_t *  semaphore,
uint32_t  count 
)

Declare the semaphore container, initialize the semaphore, and create semaphore ID.

Parameters
semaphorepointer to the created semaphore ID.
countinitial value of semaphore.
Returns
an enum that represents a status of PSDK
Parameters
semaphoreSpecifies semaphore ID data type.

◆ PsdkSys_SemaphoreDestroy()

E_PsdkStat PsdkSys_SemaphoreDestroy ( uint32_t *  semaphore)

Delete the created semaphore.

Parameters
semaphorepointer to the created semaphore ID.
Returns
an enum that represents a status of PSDK
Parameters
semaphoreSpecifies semaphore ID data type.

◆ PsdkSys_SemaphoreTimedWait()

E_PsdkStat PsdkSys_SemaphoreTimedWait ( uint32_t *  semaphore,
uint32_t  waitTime 
)

Wait the semaphore until token becomes available.

Parameters
semaphorepointer to the created semaphore ID.
waitTimetimeout value of waiting semaphore, unit: millisecond.
Returns
an enum that represents a status of PSDK
Parameters
semaphoreSpecifies semaphore ID data type.

◆ PsdkSys_SemaphorePost()

E_PsdkStat PsdkSys_SemaphorePost ( uint32_t *  semaphore)

Release the semaphore token.

Parameters
semaphorepointer to the created semaphore ID.
Returns
an enum that represents a status of PSDK
Parameters
semaphoreSpecifies semaphore ID data type.