首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在使用mainSW1_INT_BIT实时内核PIC32时没有定义“PIC32”

在使用mainSW1_INT_BIT实时内核PIC32时没有定义“PIC32”
EN

Stack Overflow用户
提问于 2014-11-17 11:18:49
回答 1查看 128关注 0票数 2

我遵循的是“使用FreeRTOS实时内核-实用指南- PIC32版本”。在页面的清单52中,没有mainSW1_INT_BIT的定义。我很困惑,因为我没有这本书的任何来源。代码片段是:

代码语言:javascript
复制
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 );
}

请帮帮忙。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-17 15:22:40

如果你有一个合法的软拷贝的书,然后源代码提供了文本。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26971533

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档