|
Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
|

Topics | |
| OSAL Interface Extensions | |
Typedefs | |
| typedef struct ptxMutex * | ptxMutex_t |
| Mutex Wrapper Structure - Forward Declaration. | |
| typedef struct ptxSemaphore * | ptxSemaphore_t |
| Semaphore Wrapper Structure - Forward Declaration. | |
| typedef uint64_t | ptxTimeDiff_t |
| Time difference type. | |
| typedef void(* | pptxOsal_ThreadProc_t) (void *threadParam) |
| Thread procedure function pointer declaration. | |
| typedef void(* | pptxOsal_TimerProc_t) (void *timerParam) |
| Timer procedure function pointer declaration. | |
Functions | |
| ptxStatus_t | ptxOsal_AllocInit (struct ptxOsal **osalCtx, void *sysCtx) |
| Initialize the OSAL. | |
| void | ptxOsal_DeInit (struct ptxOsal *osalCtx) |
| Un-Initialize the OSAL. | |
| void | ptxOsal_DeAlloc (struct ptxOsal **osalCtx) |
| De-Allocate the OSAL. | |
| void * | ptxOsal_Allocate (struct ptxOsal *osalCtx, size_t allocSize) |
| Allocate memory. Track memory usage. | |
| void * | ptxOsal_JustAllocate (size_t allocSize) |
| Allocate memory. Do not track memory usage. Does not need an instance of OSAL. | |
| void | ptxOsal_Free (struct ptxOsal *osalCtx, void *memToFree) |
| Free memory, allocated by ptxOsal_Allocate. | |
| void | ptxOsal_FreeNull (struct ptxOsal *osalCtx, void **memToFree) |
| Free memory, allocated by ptxOsal_Allocate and set the pointer to NULL. | |
| void * | ptxOsal_Allocate_NoTrack (struct ptxOsal *osalCtx, size_t allocSize) |
| Allocate memory. Do not track memory usage. | |
| void | ptxOsal_Free_NoTrack (struct ptxOsal *osalCtx, void *memToFree) |
| Free memory, allocated by ptxOsal_Allocate_NoTrack. | |
| void | ptxOsal_JustFree (void *memToFree, uint32_t *sentryViolationCount) |
| Free memory, allocated by ptxOsal_JustAllocate. | |
| ptxStatus_t | ptxOsal_SemInit (struct ptxOsal *osalCtx, ptxSemaphore_t *hSem, uint32_t initialCount, uint32_t maxCount) |
| Initialize an already allocated but non-initialized object. | |
| ptxStatus_t | ptxOsal_SemClose (struct ptxOsal *osalCtx, ptxSemaphore_t *hSem) |
| Close an initialized semaphore object. | |
| ptxStatus_t | ptxOsal_SemPost (struct ptxOsal *osalCtx, ptxSemaphore_t *hSem) |
| Signal a semaphore, unblock a waiting thread. | |
| ptxStatus_t | ptxOsal_SemWait (struct ptxOsal *osalCtx, ptxSemaphore_t *hSem) |
| Wait on the semaphore. | |
| ptxStatus_t | ptxOsal_SemTimedWait (struct ptxOsal *osalCtx, ptxSemaphore_t *hSem, uint32_t msTimeout) |
| Wait on the semaphore, with timeout. | |
| ptxStatus_t | ptxOsal_MutexInit (struct ptxOsal *osalCtx, ptxMutex_t *hMutex) |
| Initialize a Mutex. | |
| ptxStatus_t | ptxOsal_MutexDestroy (struct ptxOsal *osalCtx, ptxMutex_t *hMutex) |
| Remove a Mutex. | |
| ptxStatus_t | ptxOsal_MutexLock (struct ptxOsal *osalCtx, ptxMutex_t *hMutex) |
| Lock/acquire a Mutex. | |
| ptxStatus_t | ptxOsal_MutexUnlock (struct ptxOsal *osalCtx, ptxMutex_t *hMutex) |
| Unlock/release a Mutex. | |
| struct ptxThread * | ptxOsal_ThreadAllocate (struct ptxOsal *osalCtx) |
| Allocate a thread structure. | |
| ptxStatus_t | ptxOsal_ThreadCreate (struct ptxOsal *osalCtx, struct ptxThread *hThd, pptxOsal_ThreadProc_t thdFn, void *thdParam) |
| Create a thread. | |
| ptxStatus_t | ptxOsal_ThreadJoin (struct ptxOsal *osalCtx, struct ptxThread *hThd) |
| Join on a thread, wait until it has exited. | |
| ptxStatus_t | ptxOsal_ThreadClose (struct ptxOsal *osalCtx, struct ptxThread *hThd) |
| Close a thread, once it has exited. | |
| void | ptxOsal_ThreadSleep (struct ptxOsal *osalCtx, uint32_t msSleep) |
| Sleep for a number of ms. | |
| struct ptxTimer * | ptxOsal_TimerAllocate (struct ptxOsal *osalCtx) |
| Allocate a timer structure. | |
| ptxStatus_t | ptxOsal_TimerCreate (struct ptxOsal *osalCtx, struct ptxTimer *hTimer, pptxOsal_TimerProc_t timerProc, void *timerParam) |
| Create a timer. | |
| ptxStatus_t | ptxOsal_TimerStart (struct ptxOsal *osalCtx, struct ptxTimer *hTimer, uint32_t msInterval) |
| Start or restart the timer. | |
| ptxStatus_t | ptxOsal_TimerCancel (struct ptxOsal *osalCtx, struct ptxTimer *hTimer) |
| Cancel a timer, if active. | |
| ptxStatus_t | ptxOsal_TimerClose (struct ptxOsal *osalCtx, struct ptxTimer *hTimer) |
| Close a timer, once it has expired. | |
| ptxStatus_t | ptxOsal_StopwatchStart (struct ptxOsal *osalCtx, ptxTimeDiff_t *startVal) |
| Start a time measurement or get a time value. | |
| ptxStatus_t | ptxOsal_StopwatchStop (struct ptxOsal *osalCtx, ptxTimeDiff_t *startStopVal) |
| End a time measurement. | |
| void * | ptxOsal_GetSysCtx (struct ptxOsal *osalCtx) |
| Get the System Context. | |
| typedef void(* pptxOsal_ThreadProc_t) (void *threadParam) |
Thread procedure function pointer declaration.
| threadParam | Pointer to thread-specific ("context") storage. |
| typedef void(* pptxOsal_TimerProc_t) (void *timerParam) |
Timer procedure function pointer declaration.
| timerParam | Pointer to timer-specific ("context") storage. |
| void * ptxOsal_Allocate | ( | struct ptxOsal * | osalCtx, |
| size_t | allocSize ) |
Allocate memory. Track memory usage.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | allocSize | Number of bytes to allocate. |
| void * ptxOsal_Allocate_NoTrack | ( | struct ptxOsal * | osalCtx, |
| size_t | allocSize ) |
Allocate memory. Do not track memory usage.
This function shall be used for optional/supplemental components, not directly belonging to the stack. The memory consumption of is not tracked; Use this allocator variant for components whose memory consumption shall not be counted with the stack memory allocation (e.g. logger). De-allocate only with ptxOsal_Free_NoTrack.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | allocSize | Number of bytes to allocate. |
| ptxStatus_t ptxOsal_AllocInit | ( | struct ptxOsal ** | osalCtx, |
| void * | sysCtx ) |
Initialize the OSAL.
Function that sets up the Component.
| [in,out] | osalCtx | Pointer to a non_allocated and non-initialized OSAL component structure. |
| [in] | sysCtx | Arbitrary platform context, as required. May be NULL on some platforms. It could be NULL. |
| void ptxOsal_DeAlloc | ( | struct ptxOsal ** | osalCtx | ) |
De-Allocate the OSAL.
Function that frees up the memory and closes the Component and sets pointer to NULL.
| [in,out] | osalCtx | Pointer to an allocated OSAL component structure pointer. |
| void ptxOsal_DeInit | ( | struct ptxOsal * | osalCtx | ) |
Un-Initialize the OSAL.
Function that cleans up the Component: de-inits internal members.
| [in,out] | osalCtx | Pointer to an initialized OSAL component structure. |
| void ptxOsal_Free | ( | struct ptxOsal * | osalCtx, |
| void * | memToFree ) |
Free memory, allocated by ptxOsal_Allocate.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | memToFree | Pointer to the previously allocated (ptxOsal_Allocate) section of memory to be released. |
| void ptxOsal_Free_NoTrack | ( | struct ptxOsal * | osalCtx, |
| void * | memToFree ) |
Free memory, allocated by ptxOsal_Allocate_NoTrack.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | memToFree | Pointer to the previously allocated (ptxOsal_Allocate) section of memory to be released. |
| void ptxOsal_FreeNull | ( | struct ptxOsal * | osalCtx, |
| void ** | memToFree ) |
Free memory, allocated by ptxOsal_Allocate and set the pointer to NULL.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | memToFree | Pointer to a location that references the the previously allocated (ptxOsal_Allocate) section of memory to be released. |
| void * ptxOsal_GetSysCtx | ( | struct ptxOsal * | osalCtx | ) |
Get the System Context.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| void * ptxOsal_JustAllocate | ( | size_t | allocSize | ) |
Allocate memory. Do not track memory usage. Does not need an instance of OSAL.
This function shall be used for optional/supplemental components, not directly belonging to the stack. The memory consumption of the stack itself is tracked; Use this allocator variant for components whose memory consumption shall not be counted with the stack memory allocation (e.g. logger). De-allocate only with ptxOsal_JustFree.
| [in] | allocSize | Number of bytes to allocate. |
| void ptxOsal_JustFree | ( | void * | memToFree, |
| uint32_t * | sentryViolationCount ) |
Free memory, allocated by ptxOsal_JustAllocate.
Free memory, provided by non-tracking allocator ptxOsal_JustAllocate. Do not use on memory allocated by other functions than the dedicated variant.
| [in] | memToFree | Pointer to the previously allocated (ptxOsal_Allocate) section of memory to be released. |
| [out] | sentryViolationCount | Pointer to a variable that will be incremented each time a memory boundary violation has been found (destroyed sentry pattern). The caller has to set the variable to 0 initially. |
| ptxStatus_t ptxOsal_MutexDestroy | ( | struct ptxOsal * | osalCtx, |
| ptxMutex_t * | hMutex ) |
Remove a Mutex.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hMutex | Pointer to the Mutex object. |
| ptxStatus_t ptxOsal_MutexInit | ( | struct ptxOsal * | osalCtx, |
| ptxMutex_t * | hMutex ) |
Initialize a Mutex.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hMutex | Pointer to a location that will be initialized/receive the Mutex object. |
| ptxStatus_t ptxOsal_MutexLock | ( | struct ptxOsal * | osalCtx, |
| ptxMutex_t * | hMutex ) |
Lock/acquire a Mutex.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | hMutex | Pointer to the initialized Mutex object. |
| ptxStatus_t ptxOsal_MutexUnlock | ( | struct ptxOsal * | osalCtx, |
| ptxMutex_t * | hMutex ) |
Unlock/release a Mutex.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | hMutex | Pointer to the initialized Mutex object. |
| ptxStatus_t ptxOsal_SemClose | ( | struct ptxOsal * | osalCtx, |
| ptxSemaphore_t * | hSem ) |
Close an initialized semaphore object.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | hSem | Pointer to an initialized semaphore object. |
| ptxStatus_t ptxOsal_SemInit | ( | struct ptxOsal * | osalCtx, |
| ptxSemaphore_t * | hSem, | ||
| uint32_t | initialCount, | ||
| uint32_t | maxCount ) |
Initialize an already allocated but non-initialized object.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hSem | Pointer to an allocated but non-initialized semaphore object. |
| [in] | initialCount | Initial value. |
| [in] | maxCount | Maximum count. |
| ptxStatus_t ptxOsal_SemPost | ( | struct ptxOsal * | osalCtx, |
| ptxSemaphore_t * | hSem ) |
Signal a semaphore, unblock a waiting thread.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | hSem | Pointer to an initialized semaphore object. |
| ptxStatus_t ptxOsal_SemTimedWait | ( | struct ptxOsal * | osalCtx, |
| ptxSemaphore_t * | hSem, | ||
| uint32_t | msTimeout ) |
Wait on the semaphore, with timeout.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | hSem | Pointer to an initialized semaphore object. |
| [in] | msTimeout | Timeout period, in ms. |
| ptxStatus_t ptxOsal_SemWait | ( | struct ptxOsal * | osalCtx, |
| ptxSemaphore_t * | hSem ) |
Wait on the semaphore.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | hSem | Pointer to an initialized semaphore object. |
| ptxStatus_t ptxOsal_StopwatchStart | ( | struct ptxOsal * | osalCtx, |
| ptxTimeDiff_t * | startVal ) |
Start a time measurement or get a time value.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in,out] | startVal | Pointer to a variable that will receive the start value. |
| ptxStatus_t ptxOsal_StopwatchStop | ( | struct ptxOsal * | osalCtx, |
| ptxTimeDiff_t * | startStopVal ) |
End a time measurement.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in,out] | startStopVal | Pointer to a variable that provides the start time and that will receive the time span. The time unit is microseconds. |
| struct ptxThread * ptxOsal_ThreadAllocate | ( | struct ptxOsal * | osalCtx | ) |
Allocate a thread structure.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| ptxStatus_t ptxOsal_ThreadClose | ( | struct ptxOsal * | osalCtx, |
| struct ptxThread * | hThd ) |
Close a thread, once it has exited.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hThd | Pointer to the thread, created by ptxOsal_ThreadCreate. |
| ptxStatus_t ptxOsal_ThreadCreate | ( | struct ptxOsal * | osalCtx, |
| struct ptxThread * | hThd, | ||
| pptxOsal_ThreadProc_t | thdFn, | ||
| void * | thdParam ) |
Create a thread.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hThd | Pointer to a platform-specific thread descriptor/structure/handle. |
| [in] | thdFn | Pointer to the thread procedure. |
| [in] | thdParam | Parameter that the thread function will receive when it is started. May be NULL if there is no data to share with or to hand over to the thread respectively. |
| ptxStatus_t ptxOsal_ThreadJoin | ( | struct ptxOsal * | osalCtx, |
| struct ptxThread * | hThd ) |
Join on a thread, wait until it has exited.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hThd | Pointer to the thread, created by ptxOsal_ThreadCreate. |
| void ptxOsal_ThreadSleep | ( | struct ptxOsal * | osalCtx, |
| uint32_t | msSleep ) |
Sleep for a number of ms.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | msSleep | Number of ms to suspend the current thread. If 0, a Yield operation is performed. |
| struct ptxTimer * ptxOsal_TimerAllocate | ( | struct ptxOsal * | osalCtx | ) |
Allocate a timer structure.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| ptxStatus_t ptxOsal_TimerCancel | ( | struct ptxOsal * | osalCtx, |
| struct ptxTimer * | hTimer ) |
Cancel a timer, if active.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [in] | hTimer | Pointer to the timer, created by ptxOsal_TimerCreate. |
| ptxStatus_t ptxOsal_TimerClose | ( | struct ptxOsal * | osalCtx, |
| struct ptxTimer * | hTimer ) |
Close a timer, once it has expired.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hTimer | Pointer to the timer, created by ptxOsal_TimerCreate. |
| ptxStatus_t ptxOsal_TimerCreate | ( | struct ptxOsal * | osalCtx, |
| struct ptxTimer * | hTimer, | ||
| pptxOsal_TimerProc_t | timerProc, | ||
| void * | timerParam ) |
Create a timer.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hTimer | Pointer to a platform-specific variable that will receive the timer descriptor/structure/handle. |
| [in] | timerProc | Pointer to the timer procedure. |
| [in] | timerParam | Parameter that the timer procedure will receive when it is started. May be NULL if there is no data to share with or to hand over to the thread respectively. |
| ptxStatus_t ptxOsal_TimerStart | ( | struct ptxOsal * | osalCtx, |
| struct ptxTimer * | hTimer, | ||
| uint32_t | msInterval ) |
Start or restart the timer.
The timer is started or restarted in one-shot mode.
| [in] | osalCtx | Pointer to an initialized OSAL component structure. |
| [out] | hTimer | Pointer to the timer, created by ptxOsal_TimerCreate. |
| [out] | msInterval | Interval, in ms. |