機能
RTOS側の情報を出力する関数。
引数
- UInt16 procId,
- UInt16 lineId,
- UInt32 eventNo,
- Void * arg,
- UInt32 payload
戻り値
- void
実装
Void NotifyApp_rtosInfocallback (UInt16 procId,
UInt16 lineId,
UInt32 eventNo,
Void * arg,
UInt32 payload){
Osal_printf ("Number of RTOS-side received/sent events:\n"
" procId: [%d]\n"
" Number of events: [%d]\n",
procId,
payload);
if (payload != (NOTIFYAPP_NUMEVENTS * NOTIFYAPP_NUM_TRANSFERS)) {
Osal_printf ("*****Failure on RTOS-side*****\n"
" Expected num events: [%d]\n"
" Received num events: [%d]\n",
(NOTIFYAPP_NUMEVENTS * NOTIFYAPP_NUM_TRANSFERS),
payload);
OsalSemaphore_post ((OsalSemaphore_Handle) arg);
}
}
詳細
void Osal_printf(char*)
#include <ti/syslink/utils/OsalPrint.h>で利用可能。prinfと同じ
typedef struct OsalSemaphore_Object* OsalSemaphore_Handle
struct OsalSemaphore_Object*はプログラマには見えない。
Int OsalSemaphore_post (OsalSemaphore_Handle semHandle)
この関数により、セマフォを開放できる。よって他のプロセスがセマフォを利用できるようになる。
209 /* Creates the semaphore object. */
210 OsalSemaphore_Handle OsalSemaphore_create (UInt32 semType);
211
212 /* Deletes the semaphore object */
213 Int OsalSemaphore_delete (OsalSemaphore_Handle * semHandle);
214
215 /* Wait on the said Semaphore in the kernel thread context */
216 Int OsalSemaphore_pend (OsalSemaphore_Handle semHandle, UInt32 timeout);
217
218 /* Signal the semaphore and make it available for other threads. */
219 Int OsalSemaphore_post (OsalSemaphore_Handle semHandle);