22 lines
491 B
C
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
|