esp32-lora/test/lora32/components/esp32-uart-cmdr/include/esp32-uart-cmdr.h

20 lines
373 B
C

#ifndef __UART_CMDR_H__
#define __UART_CMDR_H__
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
static volatile uint8_t cmd_count;
typedef struct Cmd {
char *cmd;
void (*callback)(void *p);
};
void ucmdr_init();
uint8_t ucmdr_install(char *cmd, void(*callback)(void *p));
uint8_t ucmdr_match(char *str, struct Cmd **handler);
#endif