»
(008) CubeIDE Implementation of USB Peripherals*
(018) C99 pointer*
(019) C99 With only value assignment*
(022) POSIX pthread multi-threads mutex*
(023) POSIX pthread multi-threads programming*
(027) C99 time and wait*
(028) High-precision calculation with GMP*
(029) Web Service Lib*
(030) International Components for Unicode (ICU)*
(031) Performance of C is higher than C++, because...*
🕹️(032) Call FreeRTOS SysCall in ISR
在中断处理函数中调用FreeRTOS的系统调用,需要使用...FromISR版本的函数,比如,操作信号量:
void HAL_UART_RxCpltCallback(UART_HandleTypeDef* huart){
BaseType_t xHasTaskWoken = pdFALSE;//函数返回填充,是否有task被唤醒
if(huart->Instance == USART1){
xSemaphoreGiveFromISR(sem,&xHasTaskWoken);
portYIELD_FROM_ISR(xHasTaskWoken);// 如果有task任务被唤醒,立即触发FreeRTOS的任务调度
}
}