|
PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
|
| void dbgPrintf | ( | const char * | function, |
| uint32_t | line, | ||
| const char * | format, | ||
| ... | |||
| ) |
Printf like function with prefix of function and line.
| [in] | function | name of the current function |
| [in] | line | line number to be printed |
| [in] | format | print format (just like printf) |
| int32_t pal_osAtomicIncrement | ( | int32_t * | valuePtr, |
| int32_t | increment | ||
| ) |
Perform an atomic increment for a signed32 bit value
| [in,out] | valuePtr | the address of the value to increment |
| palStatus_t pal_osDelay | ( | uint32_t | milliseconds | ) |
Wait for a specified time period in milliseconds.
| [in] | milliseconds | the amount of milliseconds to wait before proceeding. |
| uint64_t pal_osKernelSysMilliSecTick | ( | uint64_t | sysTicks | ) |
Converts value from kernel system ticks to milliseconds.
| [in] | sysTicks | the amount of kernel system ticks to convert into millieseconds |
| uint32_t pal_osKernelSysTick | ( | void | ) |
Get the RTOS kernel system timer counter.
| uint64_t pal_osKernelSysTick64 | ( | void | ) |
Get the RTOS kernel system timer counter.
| uint64_t pal_osKernelSysTickFrequency | ( | void | ) |
Get the system tick frequency
| uint64_t pal_osKernelSysTickMicroSec | ( | uint64_t | microseconds | ) |
Converts value from microseconds to kernel sys tick
| [in] | microseconds | the amount of microseconds to convert into system ticks |
| palStatus_t pal_osMessageGet | ( | palMessageQID_t | messageQID, |
| uint32_t | timeout, | ||
| uint32_t * | messageValue | ||
| ) |
Get a Message or Wait for a Message from a Queue.
| [in] | messageQID | the handle for the memory pool |
| [in] | timeout | timeout in milliseconds |
| [out] | event | the data to send |
| palStatus_t pal_osMessagePut | ( | palMessageQID_t | messageQID, |
| uint32_t | info, | ||
| uint32_t | timeout | ||
| ) |
Put a Message to a Queue.
| [in] | messageQID | the handle for the memory pool |
| [in] | info | the data to send |
| [in] | timeout | timeout in milliseconds |
| palStatus_t pal_osMessageQueueCreate | ( | uint32_t | messageQSize, |
| palMessageQID_t * | messageQID | ||
| ) |
Create and initialize a message queue.
| [in] | messageQSize | size of the message queue. |
| [out] | memoryPoolID | holds the created memory pool ID handle - zero value indecates an error. |
| palStatus_t pal_osMessageQueueDestroy | ( | palMessageQID_t * | messageQID | ) |
Delete a message queue object.
| [in,out] | messageQID | the handle for the message queue, in success:(*messageQID = NULL). |
| palStatus_t pal_osMutexCreate | ( | palMutexID_t * | mutexID | ) |
Create and initialize Mutex object
| [out] | mutexID | holds the created mutex ID handle - zero value indecates an error. |
| palStatus_t pal_osMutexDelete | ( | palMutexID_t * | mutexID | ) |
Delete a Mutex object.
| [in,out] | mutexID | Mutex handle to delete, in success:(*mutexID = NULL). |
| palStatus_t pal_osMutexRelease | ( | palMutexID_t | mutexID | ) |
Release a Mutex that was obtained by osMutexWait.
| [in] | mutexID | the handle for the mutex |
| palStatus_t pal_osMutexWait | ( | palMutexID_t | mutexID, |
| uint32_t | millisec | ||
| ) |
Wait until a Mutex becomes available.
| [in] | mutexID | the handle for the mutex |
| [in] | millisec | the timeout for the waiting operation if the timeout expires before the semaphore is released and error will be returned from the function, PAL_RTOS_WAIT_FOREVER can be used. |
| void* pal_osPoolAlloc | ( | palMemoryPoolID_t | memoryPoolID | ) |
Allocate a single memory block from a memory pool.
| [in] | memoryPoolID | the handle for the memory pool |
| void* pal_osPoolCAlloc | ( | palMemoryPoolID_t | memoryPoolID | ) |
Allocate a single memory block from a memory pool and set memory block to zero.
| [in] | memoryPoolID | the handle for the memory pool |
| palStatus_t pal_osPoolCreate | ( | uint32_t | blockSize, |
| uint32_t | blockCount, | ||
| palMemoryPoolID_t * | memoryPoolID | ||
| ) |
Create and initialize a memory pool.
| [in] | blockSize | size of single block in bytes. |
| [in] | blockCount | maximum number of blocks in memory pool. |
| [out] | memoryPoolID | holds the created memory pool ID handle - zero value indecates an error. |
| palStatus_t pal_osPoolDestroy | ( | palMemoryPoolID_t * | memoryPoolID | ) |
Delete a memory pool object.
| [in,out] | memoryPoolID | the handle for the memory pool, in success:(*memoryPoolID = NULL). |
| palStatus_t pal_osPoolFree | ( | palMemoryPoolID_t | memoryPoolID, |
| void * | block | ||
| ) |
Return an memoryPoolID memory block back to a specific memory pool.
| [in] | memoryPoolHandle | the handle for the memory pool |
| [in] | block | the block to free |
| void pal_osReboot | ( | void | ) |
Initiates a system reboot
| palStatus_t pal_osSemaphoreCreate | ( | uint32_t | count, |
| palSemaphoreID_t * | semaphoreID | ||
| ) |
Create and initialize a Semaphore object
| [in] | count | number of available resources |
| [out] | semaphoreID | holds the created semaphore ID handle - zero value indecates an error. |
| palStatus_t pal_osSemaphoreDelete | ( | palSemaphoreID_t * | semaphoreID | ) |
Delete a Semaphore object
| [in,out] | semaphoreID | Semaphore handle to delete, in success:(*semaphoreID = NULL). |
| palStatus_t pal_osSemaphoreRelease | ( | palSemaphoreID_t | semaphoreID | ) |
Release a Semaphore token.
| [in] | semaphoreID | the handle for the semaphore |
| palStatus_t pal_osSemaphoreWait | ( | palSemaphoreID_t | semaphoreID, |
| uint32_t | millisec, | ||
| int32_t * | countersAvailable | ||
| ) |
Wait until a Semaphore token becomes available.
| [in] | semaphoreID | the handle for the semaphore |
| [in] | millisec | the timeout for the waiting operation if the timeout expires before the semaphore is released and error will be returned from the function, PAL_RTOS_WAIT_FOREVER can be used. |
| [out] | counteresAvailable | the number of semaphore available at the call if semaphore is available, if semaphore was not available (timeout/error) zero is returned. |
| palStatus_t pal_osThreadCreate | ( | palThreadFuncPtr | function, |
| void * | funcArgument, | ||
| palThreadPriority_t | priority, | ||
| uint32_t | stackSize, | ||
| uint32_t * | stackPtr, | ||
| palThreadLocalStore_t * | store, | ||
| palThreadID_t * | threadID | ||
| ) |
Creates and starts thread function.
| [in] | function | function pointer to the thread callback function. |
| [in] | funcArgument | argument for the thread function. |
| [in] | priority | priotity of the thread. |
| [in] | stackSize | the stack size of the thread can NOT be 0. |
| [in] | stackPtr | pointer to the thread's stack can NOT be NULL. |
| [in] | store | pointer to thread's local sotre, can be NULL. |
| [out] | threadID | holds the created thread ID handle - zero value indecates an error. |
| palThreadID_t pal_osThreadGetId | ( | void | ) |
Get ID of the current thread
| void* pal_osThreadGetLocalStore | ( | void | ) |
Get the storage of current thread
| palStatus_t pal_osThreadTerminate | ( | palThreadID_t * | threadID | ) |
Terminates and free allocated data for the thread.
| [in] | threadID | thread ID to stop and terminate. |
| palStatus_t pal_osTimerCreate | ( | palTimerFuncPtr | function, |
| void * | funcArgument, | ||
| palTimerType_t | timerType, | ||
| palTimerID_t * | timerID | ||
| ) |
Creates a Timer.
| [in] | function | function pointer to the timer callback function. |
| [in] | funcArgument | funcArgument for the timer callback function. |
| [in] | timerType | timer type to be created - (periodic or oneShot). |
| [out] | timerID | holds the created timer ID handle - zero value indecates an error. |
| palStatus_t pal_osTimerDelete | ( | palTimerID_t * | timerID | ) |
Delete the timer object
| [in,out] | timerID | the handle for the timer to delete, in success:(*timerID = NULL). |
| palStatus_t pal_osTimerStart | ( | palTimerID_t | timerID, |
| uint32_t | millisec | ||
| ) |
Start or restart a timer.
| [in] | timerID | the handle for the timer to start |
| [in] | millisec | the amount of time in milliseconds to set the timer to. |
| palStatus_t pal_osTimerStop | ( | palTimerID_t | timerID | ) |
Stop a timer.
| [in] | timerID | the handle for the timer to stop |
1.8.11