mirror of
https://git.aixiao.me/aixiao/Danger-alarm.git
synced 2025-07-29 19:13:39 +08:00
Add FreeRTOS
This commit is contained in:
23
SOFTWARE-FreeRTOS/Source/common.hpp
Normal file
23
SOFTWARE-FreeRTOS/Source/common.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef COMMOM_H
|
||||
#define COMMOM_H
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "semphr.h"
|
||||
#include "queue.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "hardware/pio.h"
|
||||
|
||||
|
||||
#define BUILD(fmt...) do { fprintf(stderr,"%s %s ",__DATE__,__TIME__); fprintf(stderr, ##fmt); } while(0)
|
||||
|
||||
static inline bool uart_rx_program_available(PIO pio, uint sm)
|
||||
{
|
||||
return !pio_sm_is_rx_fifo_empty(pio, sm);
|
||||
}
|
||||
|
||||
extern void _printTaskStackHighWaterMark(const char *task_name);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user