Files
3d_contorl/Core/Bsp/bsp_cmd.h
2026-03-21 01:49:41 +08:00

22 lines
491 B
C

/**
* @file bsp_cmd.h
* @brief JSON command parser for UART1 (MQTT)
*/
#ifndef __BSP_CMD_H
#define __BSP_CMD_H
#include <stdint.h>
/**
* @brief Parse and execute a JSON command from UART1
* Request format: {"cmd":"xxx","value":"xxx"}
* Response format: {"status":"ok/error","msg":"xxx","data":{...}}
*
* @param buf: received JSON string (null-terminated)
* @param len: string length
*/
void BSP_Cmd_ProcessJSON(const uint8_t *buf, uint16_t len);
#endif