no definition of "mainSW1_INT_BIT" in using freeRTOS real time kernel PIC32

158 views Asked by At

I am following "Using the FreeRTOS real time kernel a practical guide - PIC32 edition". On listing 52 of the page, there is no definition of mainSW1_INT_BIT. I am confused as I don't have any source zip of the book. The code snippet is:

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 );
}

Please help.

1

There are 1 answers

0
Richard On BEST ANSWER

If you have a legitimate soft copy of the book then source code is provided with the text.