「FreeRTOS リアルタイム カーネルの使用に関する実践ガイド - PIC32 版」に従っています。ページのリスト 52 には、mainSW1_INT_BIT の定義がありません。本のソース zip がないため、混乱しています。コード スニペットは次のとおりです。
void vSW1_ISR_Handler( void )
{
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* 'Give' the semaphore to unblock the task. */
xSemaphoreGiveFromISR( xBinarySemaphore, &xHigherPriorityTaskWoken );
/* Clear the software interrupt flag. */
mainCLEAR_INTERRUPT();
/* Then clear the interrupt in the interrupt controller. */
IFS0CLR = mainSW1_INT_BIT;
/* Giving the semaphore may have unblocked a task - if it did and the
unblocked task has a priority equal to or above the currently executing
task then xHigherPriorityTaskWoken will have been set to pdTRUE and
portEND_SWITCHING_ISR() will force a context switch to the newly unblocked
higher priority task.
NOTE: The syntax for forcing a context switch within an ISR varies between
FreeRTOS ports. The portEND_SWITCHING_ISR() macro is provided as part of
the PIC32 port layer for this purpose. taskYIELD() must never be called
from an ISR! */
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
}
助けてください。