Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我正在尝试将OpenPicus devKit 用于我正在从事的项目,并且据我所知,IDE 在创建新项目时会创建基本上利用FreeRTOS和 OpenPicus 库的代码。
我想弄清楚的是如何通过 FreeRTOS 内核或通过 OpenPicus 使用中断(我认为这是不可能的)。我已经读过 FreeRTOS 中的 ISR 可以使用 __attribute__ ( ( signal ) )指令指定,但是它们如何链接到特定的中断?(uart 甚至是一个引脚变高?)
__attribute__ ( ( signal ) )
中断处理是体系结构,通常是特定于编译器而不是特定于 FreeRTOS。FreeRTOS 本身只定义了哪些 RTOS 调用在 ISR 中有效。
OpenPicus 硬件使用 PIC24。PIC24 的 FreeRTOS 演示代码分别包括定时器中断和串行中断[...]\Demo\PIC24_MPLAB\timertest.c示例[...]\Demo\PIC24_MPLAB\serial\serial.c。这些示例使用 Microchip 的 PIC24 编译器语法。如果您使用的是替代编译器,则需要查阅其文档。
[...]\Demo\PIC24_MPLAB\timertest.c
[...]\Demo\PIC24_MPLAB\serial\serial.c