101 lines
2.8 KiB
C
101 lines
2.8 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_HOST_NOISE_DUMP_H
|
|
#define IOT_CLI_HOST_NOISE_DUMP_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#pragma pack(push) /* save the pack status */
|
|
#pragma pack(1) /* 1 byte align */
|
|
|
|
#if (IOT_STA_CONTROL_MODE == IOT_STA_CONTROL_TYPE_STA)
|
|
|
|
#define CLI_IPC_MSG_SHORT_BUF_SIZE (128)
|
|
#define CLI_ADA_DUMP_RESERVED_DATA_SIZE (32)
|
|
#define CLI_ADA_DUMP_DATA_SIZE \
|
|
(900 - CLI_ADA_DUMP_RESERVED_DATA_SIZE)
|
|
#define CLI_ADA_DUMP_TIMER (100)
|
|
|
|
#define CLI_ADA_DUMP_PARAM_ACK_SUCCESS (0)
|
|
#define CLI_ADA_DUMP_PARAM_ACK_FAILED (1)
|
|
|
|
/** ada dump setting ack */
|
|
typedef struct _cli_ada_dump_param_ack
|
|
{
|
|
uint8_t result;
|
|
} cli_ada_dump_param_ack;
|
|
|
|
typedef struct _cli_ada_dump_query_result
|
|
{
|
|
uint16_t idx;
|
|
} cli_ada_dump_query_result;
|
|
|
|
/** ada dump data */
|
|
typedef struct _cli_ada_dump_data_t
|
|
{
|
|
int8_t gain;
|
|
uint16_t len;
|
|
uint16_t idx;
|
|
uint16_t cnt;
|
|
uint8_t data[CLI_ADA_DUMP_DATA_SIZE];
|
|
uint8_t reserved[CLI_ADA_DUMP_RESERVED_DATA_SIZE];
|
|
} cli_ada_dump_data;
|
|
|
|
/** cli ada dump info */
|
|
typedef struct _iot_cli_ada_dump_info
|
|
{
|
|
uint32_t len;
|
|
uint8_t *data;
|
|
uint16_t total_cnt;
|
|
uint16_t idx;
|
|
int8_t gain;
|
|
uint8_t reserved[CLI_ADA_DUMP_RESERVED_DATA_SIZE];
|
|
timer_id_t dump_timer;
|
|
} iot_cli_ada_dump_info;
|
|
|
|
/* cli set dump param handler */
|
|
void cli_set_ada_dump_param(
|
|
uint8_t *buffer, uint32_t bufferlen, uint8_t *src_mac);
|
|
|
|
/* cli query ada dump data */
|
|
void cli_query_ada_dump_data(
|
|
uint8_t *buffer, uint32_t bufferlen, uint8_t *src_mac);
|
|
|
|
/* handle dump timer */
|
|
void iot_cli_ada_dump_handle_timer_msg();
|
|
|
|
/** handle ada msg from mac */
|
|
void iot_cli_handle_ada_msg(iot_pkt_t *pkt);
|
|
|
|
/** handle ipc recv */
|
|
void iot_cli_ipc_recv(void *param, iot_ipc_addr_t *addr,
|
|
iot_pkt_t *pkt);
|
|
|
|
/** cli ada dump init */
|
|
void iot_cli_ada_dump_init();
|
|
|
|
#endif
|
|
|
|
#pragma pack(pop) /* restore the pack status */
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |