Implement serial command parser with floating point support
This commit is contained in:
18
src/common/parser.h
Normal file
18
src/common/parser.h
Normal 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
|
||||
Reference in New Issue
Block a user