Zephyr程序初探(5):thread程序

此次的程序使用了中断、thread、semaphore,按键被按下后GPIO的中断callback被执行,发送semaphore使检测按键的thread得以执行,而后判断长按或者短按发送相应semaphore让相应的thread执行,除输出信息外LED会根据短按或者长按来闪烁1或者2次。web #include <zephyr.h> #include <board.h> #include <dev
相关文章
相关标签/搜索