#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
