You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.9 KiB
70 lines
1.9 KiB
7 months ago
|
/*
|
||
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2020. All rights reserved.
|
||
|
* Description: AQ IAPI function define
|
||
|
* Author: Hisilicon
|
||
|
* Create: 2019-04-16
|
||
|
*/
|
||
|
|
||
|
#ifndef __UAPI_AQ_H__
|
||
|
#define __UAPI_AQ_H__
|
||
|
|
||
|
#include "td_type.h"
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
#if __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
#endif /* __cplusplus */
|
||
|
|
||
|
/*
|
||
|
\brief Callback function type. CNcomment:回调函数定义 CNend
|
||
|
\attention \n
|
||
|
\param[in] buffer data buffer.CNcomment: 数据 CNend
|
||
|
\param[in] buffer_len data length.CNcomment: 数据长度 CNend
|
||
|
\retval ::TD_SUCCESS CNcomment: success.成功 CNend
|
||
|
\see \n
|
||
|
none.CNcomment:无 CNend
|
||
|
*/
|
||
|
typedef td_s32 (*uapi_aq_cmd_callback)(td_u8 *buffer, td_s32 buffer_len);
|
||
|
|
||
|
/*
|
||
|
\brief Send data to Uart. CNcomment:向串口发送数据 CNend
|
||
|
\attention \n
|
||
|
\param[in] data data from uart.CNcomment: 发送的数据 CNend
|
||
|
\param[in] count data item count.CNcomment: 数据项个数 CNend
|
||
|
\retval ::TD_SUCCESS CNcomment: success.成功 CNend
|
||
|
\see \n
|
||
|
none.c_ncomment:无 c_nend
|
||
|
*/
|
||
|
td_void uapi_aq_dbg_send_uart_data(td_u8 *data, td_u32 count);
|
||
|
|
||
|
/*
|
||
|
\brief Receive data from Uart. CNcomment:从串口接收数据 CNend
|
||
|
\attention \n
|
||
|
\param[out] data data from uart.CNcomment: 获取到的数据 CNend
|
||
|
\param[in] count data item count.CNcomment: 数据项个数 CNend
|
||
|
\param[in] read_size data size.CNcomment: 数据长度 CNend
|
||
|
\retval ::TD_SUCCESS CNcomment: success.成功 CNend
|
||
|
\see \n
|
||
|
none.CNcomment:无 CNend
|
||
|
*/
|
||
|
td_void uapi_aq_dbg_receive_uart_data(td_u8 *data, td_u32 count, td_u8 *received_size);
|
||
|
|
||
|
/*
|
||
|
\brief Register callback function to parse command. CNcomment:注册解析命令的回调函数CNend
|
||
|
\attention \n
|
||
|
\param[in] pfn_aq_cmd_func callback funtion.CNcomment:回调函数 CNend
|
||
|
\retval ::TD_SUCCESS CNcomment: success.成功 CNend
|
||
|
\see \n
|
||
|
none.CNcomment:无 CNend
|
||
|
*/
|
||
|
td_s32 uapi_aq_dbg_register_callback(uapi_aq_cmd_callback aq_cmd_func);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
#if __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
#endif /* __cplusplus */
|
||
|
|
||
|
#endif /* __UAPI_AQ_H__ */
|