split commands

This commit is contained in:
2020-12-01 12:43:43 +01:00
parent 765c3b077c
commit fe1b2e5b40
4 changed files with 217 additions and 0 deletions

23
cube/User/Inc/cmdHelper.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef _CMDHELPER_H_
#define _CMDHELPER_H_
#include <stdint.h>
#include <stdbool.h>
typedef bool (*cmdFunc_t)(uint8_t argc, char **args);
typedef struct {
char name[16];
char help[512];
cmdFunc_t cmdFunc;
} cmd_t;
void sendString(const char *buf);
bool sendFormatString(const char *format, ...);
const cmd_t *getRegularCommands();
const cmd_t *getAdminCommands();
const cmd_t *getConfigCommands();
#endif /* _CMDHELPER_H_ */