process rcmd via queue
This commit is contained in:
1 parent
2d2a8abd79
commit
61c7e4c12f
7 files changed
+90
-22
No files matched your search
+15
-3
@@ -15,6 +15,11 @@
|
||||
#include "timesync.h"
|
||||
#include "blescan.h"
|
||||
|
||||
// maximum number of elements in rcommand interpreter queue
|
||||
#define RCMD_QUEUE_SIZE 5
|
||||
|
||||
extern TaskHandle_t rcmdTask;
|
||||
|
||||
// table of remote commands and assigned functions
|
||||
typedef struct {
|
||||
const uint8_t opcode;
|
||||
@@ -23,9 +28,16 @@ typedef struct {
|
||||
const bool store;
|
||||
} cmd_t;
|
||||
|
||||
extern bool rcmd_busy;
|
||||
// Struct for remote command processing queue
|
||||
typedef struct {
|
||||
uint8_t cmd[10];
|
||||
uint8_t cmdLen;
|
||||
} RcmdBuffer_t;
|
||||
|
||||
void rcommand(const uint8_t cmd[], const uint8_t cmdlength);
|
||||
void do_reset(bool warmstart);
|
||||
void IRAM_ATTR rcommand(const uint8_t *cmd, const size_t cmdlength);
|
||||
void rcmd_queuereset(void);
|
||||
uint32_t rcmd_queuewaiting(void);
|
||||
void rcmd_deinit(void);
|
||||
esp_err_t rcmd_init(void);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user