2
0

platform_console.h 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /* Console example — declarations of command registration functions.
  2. This example code is in the Public Domain (or CC0 licensed, at your option.)
  3. Unless required by applicable law or agreed to in writing, this
  4. software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  5. CONDITIONS OF ANY KIND, either express or implied.
  6. */
  7. #pragma once
  8. #include "esp_console.h"
  9. #include "argtable3/argtable3.h"
  10. #include "cJSON.h"
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #define CFG_TYPE_HW(a) "cfg-hw-" a
  15. #define CFG_TYPE_AUDIO(a) "cfg-audio-" a
  16. #define CFG_TYPE_SYST(a) "cfg-syst-" a
  17. #define CFG_TYPE_FW(a) "cfg-fw-" a
  18. #define CFG_TYPE_GEN(a) "cfg-gen-" a
  19. typedef cJSON * parm_values_fn_t(void);
  20. esp_err_t cmd_to_json(const esp_console_cmd_t *cmd);
  21. esp_err_t cmd_to_json_with_cb(const esp_console_cmd_t *cmd, parm_values_fn_t parm_values_fn);
  22. int arg_parse_msg(int argc, char **argv, struct arg_hdr ** args);
  23. void console_set_bool_parameter(cJSON * root,char * nvs_name, struct arg_lit *arg);
  24. cJSON * get_cmd_list();
  25. #ifdef __cplusplus
  26. }
  27. #endif