Skip to content

Commit 8b641cc

Browse files
committed
Correct incorrect typecasting of argument usStackDepth for xTaskCreate in function osThreadNew (#51).
1 parent 78bf542 commit 8b641cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CMSIS/RTOS2/FreeRTOS/Source/cmsis_os2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAtt
574574
else {
575575
if (mem == 0) {
576576
#if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
577-
if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) {
577+
if (xTaskCreate ((TaskFunction_t)func, name, (configSTACK_DEPTH_TYPE)stack, argument, prio, &hTask) != pdPASS) {
578578
hTask = NULL;
579579
}
580580
#endif

0 commit comments

Comments
 (0)