Prototype21
Junior Member level 1
Hello Guys,
I get this warning Type pointer targets in passing argument 3 of 'xTaskNotifyWait' differ in signedness [-Wpointer-sign] when I use the below snippet of code. This happens when you are using an integer value in place of a character. The prototype for xTaskNotifyWait() is BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ).
I did understand what's wrong with my code.
I get this warning Type pointer targets in passing argument 3 of 'xTaskNotifyWait' differ in signedness [-Wpointer-sign] when I use the below snippet of code. This happens when you are using an integer value in place of a character. The prototype for xTaskNotifyWait() is BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ).
I did understand what's wrong with my code.
C:
void led_task(void *params) {
int32_t count_led = 0;
while(1) {
if(xTaskNotifyWait(0, 0, &count_led, portMAX_DELAY) != pdFALSE) { <---------------- Warning
GPIO_ToggleBits(GPIOB, GPIO_Pin_0);
sprintf(msg1, "LED Count:%ld\r\n", count_led);
print_msg(msg1);
}
}
}