Files
kunlun/export/inc/cli/iot_cli_common_api.h
2024-09-28 14:24:04 +08:00

45 lines
1.7 KiB
C

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
#ifndef __IOT_CLI_COMMON_API_H__
#define __IOT_CLI_COMMON_API_H__
#ifdef __cplusplus
extern "C" {
#endif
/* lenth of the uart frame's preamble code */
#define IOT_CLI_UART_FRAME_PREAMBLE_LEN 2
/* lenth of the uart frame's backcode */
#define IOT_CLI_UART_FRAME_BACKCODE_LEN 2
/* total lenth for preamble and back code */
#define IOT_CLI_UART_FRAME_HDR_TAIL_LEN (IOT_CLI_UART_FRAME_PREAMBLE_LEN \
+ IOT_CLI_UART_FRAME_BACKCODE_LEN)
typedef void(*APP_CLI_MSG_HANDLER)(iot_pkt_t* pkt);
/* app register callback func to cli, so that the app
* can receive data from cli
*/
void register_app_recv_cli_data_cb(APP_CLI_MSG_HANDLER cb);
/* app calls the func to send data to cli */
void iot_cli_recv_app_data(iot_pkt_t *pkt);
#ifdef __cplusplus
}
#endif
#endif /* __IOT_CLI_COMMON_API_H__ */