Hi,
I’m currently implementing some Task Notifications. In the API you can find the function ulTaskNotifyValueClear() to manually clear bits on exit:
But there is no reference in the library code, no optional flag to make this function available. Is it only available in current version and not V10.0.1?
I was looking for a workaround to change the task.c variable “pxCurrentTCB->ulNotifiedValue” inside my task/user code. The Task Buffer could be cast to TCB_t but the struct is only known inside task.c.
So I added in my task.c the following code (mainly a copy of xTaskNotifyStateClear):
uint32_t ulTaskNotifyValueClear(TaskHandle_t xTask,
uint32_t ulBitsToClear)
{
TCB_t *pxTCB;
uint32_t xReturn = 0x0;
/* If null is passed in here then it is the calling task that is having
its notification state cleared. */
pxTCB = prvGetTCBFromHandle( xTask );
taskENTER_CRITICAL();
xReturn = pxTCB->ulNotifiedValue;
pxCurrentTCB->ulNotifiedValue &= ~ulBitsToClear;
taskEXIT_CRITICAL();
return xReturn;
}