Implement serial command parser with floating point support

This commit is contained in:
2024-09-22 03:54:28 +02:00
parent 746f81667e
commit 0103834441
5 changed files with 148 additions and 26 deletions

18
src/common/parser.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef MAD_CORE_COMMON_PARSER
#define MAD_CORE_COMMON_PARSER
#include "common/types.h"
// Command types
#define T_SET 0
struct cmd_s {
int type;
float args[2];
};
typedef struct cmd_s cmd_t;
bool CMD_Parse(char ch, cmd_t *out);
#endif // MAD_CORE_COMMON_PARSER