* @Author: penglei 1624952103@qq.com\r
* @Date: 2024-06-17 14:31:08\r
* @LastEditors: penglei 1624952103@qq.com\r
- * @LastEditTime: 2024-07-24 09:39:01\r
+ * @LastEditTime: 2024-07-26 16:46:54\r
* @FilePath: /FD230/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c\r
* @Description: \r
* \r
static uint8_t pwr_button_result = 0;\r
static uint8_t func_button_result = 1;\r
\r
-\r
-static int CRC16_XMODEM(uint8_t *bytes,uint16_t length) {\r
- int crc = 0x0000; // initial value\r
- int polynomial = 0x1021;\r
- for (int index = 0; index < length; index++) {\r
- uint8_t b = bytes[index];\r
- for (int i = 0; i < 8; i++) {\r
- uint8_t bit = ((b >> (7 - i) & 1) == 1);\r
- uint8_t c15 = ((crc >> 15 & 1) == 1);\r
- crc <<= 1;\r
- if (c15 ^ bit) crc ^= polynomial;\r
- }\r
- }\r
- crc &= 0xffff;\r
- return crc;\r
-}\r
errcode_t factorytest_protocol_replymsg(uint8_t mode, uint8_t submode,uint8_t testitem,\r
uint8_t *input_data,uint16_t input_len)\r
{\r
********************************************************************/\r
#ifndef _A5133CONFIG_h_\r
#define _A5133CONFIG_h_\r
-#define code \r
/************************************\r
* Define DR\r
************************************/\r
//#define DR_500Kbps //IF=1MHz\r
\r
#ifdef DR_4Mbps\r
-const Uint8 code A5133_RFConfigTab_Main[]=\r
+const Uint8 A5133_RFConfigTab_Main[]=\r
{\r
0x00, //RESET register, \r
0x62, //MODE register, \r
0x00 //USID register,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x20[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x20[]=\r
{\r
0x0C, //page0, //去掉preamble\r
0x00, //page1, \r
0x00 //page12, \r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x21[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x21[]=\r
{\r
0x09, //page0, \r
0x00, //page1, \r
0x56 //page12 crystal type 3225, CL=9pF, CSXTL=108\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x22[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x22[]=\r
{\r
0x00, //page0, \r
0x10, //page1,\r
0x04 //page5, \r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x2A[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x2A[]=\r
{\r
0x00, //page0, \r
0x01, //page1, \r
0x00 //page12,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x38[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x38[]=\r
{\r
0x80, //page0,\r
0x50, //page1,\r
0x00 //page11,\r
}; \r
\r
-const Uint8 code ACQ_Tab[]=\r
+const Uint8 ACQ_Tab[]=\r
{\r
0x03,0x50, 0x03,0x50, 0x03,0x50, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x00, //0c00~0x0F,\r
0x03,0x40, 0x03,0x40, 0x03,0x40, 0x02,0xB0, 0x03,0x20, 0x02,0xc0, 0x02,0x80, 0x03,0xF0,\r
#endif /* end of DR_4Mbps */\r
\r
#ifdef DR_2Mbps\r
-const Uint8 code A5133_RFConfigTab_Main[]=\r
+const Uint8 A5133_RFConfigTab_Main[]=\r
{\r
0x00, //RESET register, \r
0x62, //MODE register, \r
0x00 //USID register,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x20[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x20[]=\r
{\r
0x0E, //page0, \r
0x00, //page1, \r
0x00 //page12,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x21[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x21[]=\r
{\r
0x09, //page0, \r
0x00, //page1, \r
0x56 //page12\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x22[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x22[]=\r
{\r
0x00, //page0, \r
0x10, //page1,\r
0x04 //page5,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x2A[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x2A[]=\r
{\r
0x00, //page0, \r
0x01, //page1, \r
0x00 //page12,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x38[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x38[]=\r
{\r
0x80, //page0,\r
0x50, //page1,\r
0x00 //page11,\r
};\r
\r
-const Uint8 code ACQ_Tab[]=\r
+const Uint8 ACQ_Tab[]=\r
{\r
0x03,0x50, 0x03,0x50, 0x03,0x50, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x00, //0c00~0x0F,\r
0x03,0x40, 0x03,0x40, 0x03,0x40, 0x02,0xB0, 0x03,0x20, 0x02,0xc0, 0x02,0x80, 0x03,0xF0,\r
\r
\r
#ifdef DR_1Mbps\r
-const Uint8 code A5133_RFConfigTab_Main[]=\r
+const Uint8 A5133_RFConfigTab_Main[]=\r
{\r
0x00, //RESET register, \r
0x62, //MODE register, \r
0x00 //USID register,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x20[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x20[]=\r
{\r
0x0E, //page0, \r
0x00, //page1, \r
0x00 //page12,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x21[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x21[]=\r
{\r
0x09, //page0, \r
0x00, //page1, \r
0x56 //page12\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x22[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x22[]=\r
{\r
0x00, //page0, \r
0x10, //page1,\r
0x04 //page5,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x2A[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x2A[]=\r
{\r
0x00, //page0, \r
0x01, //page1, \r
0x00 //page12,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x38[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x38[]=\r
{\r
0x80, //page0,\r
0x50, //page1,\r
0x00 //page11,\r
};\r
\r
-const Uint8 code ACQ_Tab[]=\r
+const Uint8 ACQ_Tab[]=\r
{\r
0x03,0x50, 0x03,0x50, 0x03,0x50, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x00, //0c00~0x0F,\r
0x03,0x40, 0x03,0x40, 0x03,0x40, 0x02,0xB0, 0x03,0x20, 0x02,0xc0, 0x02,0x80, 0x03,0xF0,\r
#endif /* end of DR_1Mbps */\r
\r
#ifdef DR_500Kbps \r
-const Uint8 code A5133_RFConfigTab_Main[]=\r
+const Uint8 A5133_RFConfigTab_Main[]=\r
{\r
0x00, //RESET register, \r
0x62, //MODE register, \r
0x00 //USID register,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x20[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x20[]=\r
{\r
0x0E, //page0,\r
0x00, //page1, \r
0x00 //page12,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x21[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x21[]=\r
{\r
0x09, //page0,\r
0x00, //page1, \r
0x56 //page12\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x22[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x22[]=\r
{\r
0x00, //page0, \r
0x10, //page1,\r
0x04 //page5,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x2A[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x2A[]=\r
{\r
0x00, //page0,\r
0x01, //page1, \r
0x00 //page12,\r
};\r
\r
-const Uint8 code A5133_RFConfigTab_Addr0x38[]=\r
+const Uint8 A5133_RFConfigTab_Addr0x38[]=\r
{\r
0x80, //page0,\r
0x50, //page1,\r
0x00 //page11,\r
};\r
\r
-const Uint8 code ACQ_Tab[]=\r
+const Uint8 ACQ_Tab[]=\r
{\r
0x03,0x50, 0x03,0x50, 0x03,0x50, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x40, 0x03,0x00, //0c00~0x0F,\r
0x03,0x40, 0x03,0x40, 0x03,0x40, 0x02,0xB0, 0x03,0x20, 0x02,0xc0, 0x02,0x80, 0x03,0xF0,\r
/************************************************************************\r
** Extern Global Variable Declaration\r
************************************************************************/\r
-extern Uint8 data timer;\r
-extern Uint16 data TimerCnt;\r
-extern Uint8 data Slot_TX;\r
-extern Uint8 data Flag_Timeout;\r
-extern Uint16 idata RxCnt;\r
-extern Uint8 data *Uartptr;\r
-extern Uint8 data UartSendCnt;\r
-extern Uint8 data CmdBuf[25];\r
-extern Uint8 idata tmpbuf[80];\r
-extern Uint16 idata Err_Loss;\r
-extern Uint16 idata Err_Frame;\r
-extern Uint32 idata Err_BitCnt;\r
-extern Uint8 data Flag_Report;\r
-extern Uint8 idata Flag_FirstLink;\r
-extern Uint8 data Flag_MASTER;\r
+extern Uint8 timer;\r
+extern Uint16 TimerCnt;\r
+extern Uint8 Slot_TX;\r
+extern Uint8 Flag_Timeout;\r
+extern Uint16 RxCnt;\r
+extern Uint8 *Uartptr;\r
+extern Uint8 UartSendCnt;\r
+extern Uint8 CmdBuf[25];\r
+extern Uint8 tmpbuf[80];\r
+extern Uint16 Err_Loss;\r
+extern Uint16 Err_Frame;\r
+extern Uint32 Err_BitCnt;\r
+extern Uint8 Flag_Report;\r
+extern Uint8 Flag_FirstLink;\r
+extern Uint8 Flag_MASTER;\r
\r
-extern const Uint8 code BitCount_Tab[16];\r
-extern const Uint8 code ID_Tab[8];\r
-extern const Uint8 code KeyData_Tab[];\r
-extern const Uint8 code FCB_Tab[];\r
-extern const Uint8 code PN9_Tab[];\r
+extern const Uint8 BitCount_Tab[16];\r
+extern const Uint8 ID_Tab[8];\r
+extern const Uint8 KeyData_Tab[];\r
+extern const Uint8 FCB_Tab[];\r
+extern const Uint8 PN9_Tab[];\r
\r
#endif\r
\r
\r
static void nop(void){}\r
\r
-#define idata\r
-\r
/*********************************************************************\r
** Constant Declaration\r
*********************************************************************/\r
/************************************************************************\r
** Global Variable Declaration\r
************************************************************************/\r
-Uint8 data timer;\r
-Uint16 data TimerCnt;\r
-Uint8 data Slot_TX;\r
-Uint8 data Flag_Timeout;\r
-Uint16 idata RxCnt;\r
-Uint8 data *Uartptr;\r
-// Uint8 data UartSendCnt;\r
-Uint8 data CmdBuf[25];\r
-Uint8 idata tmpbuf[80];\r
-Uint16 idata Err_Loss;\r
-Uint16 idata Err_Frame;\r
-Uint32 idata Err_BitCnt;\r
-// Uint8 data Flag_Report;\r
-// Uint8 idata Flag_FirstLink;\r
-// Uint8 idata Flag_MASTER;\r
-Uint8 idata Mem_RH;\r
-Uint8 idata Mem_RL;\r
-\r
-const Uint8 code BitCount_Tab[16] = {0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4};\r
+Uint8 timer;\r
+Uint16 TimerCnt;\r
+Uint8 Slot_TX;\r
+Uint8 Flag_Timeout;\r
+Uint16 RxCnt;\r
+Uint8 *Uartptr;\r
+\r
+Uint8 CmdBuf[25];\r
+Uint8 tmpbuf[80];\r
+Uint16 Err_Loss;\r
+Uint16 Err_Frame;\r
+Uint32 Err_BitCnt;\r
+\r
+Uint8 Mem_RH;\r
+Uint8 Mem_RL;\r
+\r
+const Uint8 BitCount_Tab[16] = {0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4};\r
// const Uint8 code ID_Tab[8]={0xC3,0x3C,0x95,0x6A,0x36,0x75,0xC5,0x2A};//ID code\r
// const Uint8 code ID_Tab[8]={0xAA,0xAA,0xAA,0xAA,0xCC,0xCC,0xAA,0xAA};\r
-const Uint8 code ID_Tab[8]={0xAA,0xAA,0xAA,0xAA,0x55,0x55,0x55,0x55};\r
+const Uint8 ID_Tab[8]={0xAA,0xAA,0xAA,0xAA,0x55,0x55,0x55,0x55};\r
//const Uint8 //code ID_Tab[8]={0x34,0x75,0xC5,0x2A,0xC7,0x33,0x45,0xEA};//ID code\r
//const Uint8 code ID_Tab[8]={0x55,0x55,0x55,0x55,0x34,0x75,0xC5,0x6A}; //ID2 code\r
//const Uint8 code ID_Tab[8]={0xFF,0xFF,0xFF,0xFF,0x36,0x75,0xC5,0xBA}; //ID2 code\r
//const Uint8 code ID_Tab[8]={0x34,0x75,0xC5,0x2A,0x34,0x75,0xC5,0x2A}; //ID2 code\r
-const Uint8 code KeyData_Tab[16]={0x00,0x00,0x00,0x00,0x00,0x0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //keyData code\r
-const Uint8 code FCB_Tab[20]={0x00,0x00,0x00,0x00,0x00,0x15,0x20,0x25,0x30,0x35,0x40,0x45,0x50,0x55,0x60,0x65,0x70,0x75,0x80,0x85}; //keyData code\r
-const Uint8 code PN9_Tab[]=\r
+const Uint8 KeyData_Tab[16]={0x00,0x00,0x00,0x00,0x00,0x0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //keyData code\r
+const Uint8 FCB_Tab[20]={0x00,0x00,0x00,0x00,0x00,0x15,0x20,0x25,0x30,0x35,0x40,0x45,0x50,0x55,0x60,0x65,0x70,0x75,0x80,0x85}; //keyData code\r
+const Uint8 PN9_Tab[]=\r
{ 0xFF,0x83,0xDF,0x17,0x32,0x09,0x4E,0xD1,\r
0xE7,0xCD,0x8A,0x91,0xC6,0xD5,0xC4,0xC4,\r
0x40,0x21,0x18,0x4E,0x55,0x86,0xF4,0xDC,\r
/*********************************************************************\r
* main loop\r
*********************************************************************/\r
+\r
+static uint8_t send_data[2][64] = {0};\r
+static uint8_t send_data_index = 0;\r
+\r
+errcode_t a5133_set_send_data(uint8_t *senddata,uint8_t datalen)\r
+{\r
+ if ( datalen > 62 || datalen == 0 || senddata == NULL)\r
+ return ERRCODE_FAIL;\r
+\r
+ if (send_data_index == 0)\r
+ {\r
+ memset(send_data[1],0,64);\r
+ memcpy(send_data,senddata,datalen);\r
+ uint16_t crc = CRC16_XMODEM(send_data[1],62); \r
+ send_data[1][62] = ((uint8_t*)&crc)[0];\r
+ send_data[1][63] = ((uint8_t*)&crc)[1];\r
+ send_data_index = 1;\r
+ }else{\r
+ memset(send_data[0],0,64);\r
+ memcpy(send_data,senddata,datalen);\r
+ uint16_t crc = CRC16_XMODEM(send_data[0],62); \r
+ send_data[0][62] = ((uint8_t*)&crc)[0];\r
+ send_data[0][63] = ((uint8_t*)&crc)[1];\r
+ send_data_index = 0;\r
+ }\r
+\r
+ return ERRCODE_SUCC;\r
+\r
+}\r
void a5133_main(Uint8 Flag_MASTER,uint8_t channel)\r
{\r
+\r
a5133_power_on();\r
if(RF_Init())/* init RF */\r
{\r
\r
while(1)\r
{ \r
- RF_FIFOWrite(64);/* write data to tx fifo */\r
+ RF_FIFOWrite(send_data[send_data_index],64);/* write data to tx fifo */\r
if(RF_LVR_Check())/* check if BOD reset has occurred */\r
break;/* exit loop & re-RF init */\r
else\r
};\r
RxPacket();\r
\r
- RF_FIFOWrite(64);\r
+ RF_FIFOWrite(PN9_Tab,64);\r
if(RF_LVR_Check())/* check if BOD reset has occurred */\r
break;/* exit loop & re-RF init */\r
else\r
/*********************************************************************\r
** RF_FIFOWrite\r
*********************************************************************/\r
-void RF_FIFOWrite(Uint8 len)\r
+void RF_FIFOWrite(unsigned char *send_data,Uint8 len)\r
{\r
Uint8 i;\r
\r
a5133_gpio_scs_set_value(0);\r
ByteSend(FIFO_REG);//send address 0x05, bit7 cmd=0, bit6 r/w=0\r
for(i=0; i <len; i++)\r
- ByteSend(PN9_Tab[i]);\r
+ {\r
+ ByteSend(send_data[i]);\r
+ }\r
a5133_gpio_scs_set_value(1);\r
}\r
\r
\r
\r
}\r
+\r
+void a5133_get_rxdata(uint8_t *databuf,uint8_t len)\r
+{\r
+ memcpy_s(databuf,len,tmpbuf,strlen((const char*)tmpbuf));\r
+}\r
+\r
/*********************************************************************\r
** RxPacket\r
*********************************************************************/\r
{\r
recv = ByteRead();\r
tmpbuf[i]=recv;\r
- if((recv ^ PN9_Tab[i])!=0)\r
- {\r
- tmp = recv ^ PN9_Tab[i];\r
- Err_BitCnt += (BitCount_Tab[tmp>>4] + BitCount_Tab[tmp & 0x0F]);\r
- err=1;\r
- }\r
+ // if((recv ^ PN9_Tab[i])!=0)\r
+ // {\r
+ // tmp = recv ^ PN9_Tab[i];\r
+ // Err_BitCnt += (BitCount_Tab[tmp>>4] + BitCount_Tab[tmp & 0x0F]);\r
+ // err=1;\r
+ // }\r
}\r
+ //crccheck\r
+\r
a5133_gpio_scs_set_value(1);\r
+ uint16_t crc = CRC16_XMODEM(tmpbuf,62);\r
+ uint16_t recv_crc = *(uint16_t*)&tmpbuf[62];\r
+ PRINT("crc[%X] , recv_crc %X\n",crc,recv_crc);\r
+ if ( crc != recv_crc)\r
+ {\r
+ err = 1;\r
+ }\r
printf("=====RxPacket \n");\r
dump_tmpbuf();\r
if (err)//packet error\r
\r
while(1)\r
{ \r
- RF_FIFOWrite(64); /* write data to tx fifo */\r
+ RF_FIFOWrite(PN9_Tab,64); /* write data to tx fifo */\r
if(RF_LVR_Check())/* check if BOD reset has occurred */\r
break;/* exit loop & re-RF init */\r
else\r
+/*\r
+ * @Author: penglei 1624952103@qq.com\r
+ * @Date: 2024-07-20 10:36:21\r
+ * @LastEditors: penglei 1624952103@qq.com\r
+ * @LastEditTime: 2024-07-26 15:48:42\r
+ * @FilePath: /FD230/code/sdk/drivers/peripheral/a5133/A5133define.h\r
+ * @Description: \r
+ * \r
+ * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. \r
+ */\r
/*****************************************************************************\r
** **\r
** AMIC Proprietary Document **\r
#include <string.h>\r
// #include <intrins.h>\r
#include <stdint.h>\r
-#define data\r
\r
#define Sint8 signed char\r
#define Sint16 signed int\r
/*\r
* @Author: penglei 1624952103@qq.com\r
* @Date: 2024-07-20 10:36:21\r
- * @LastEditors: SnickerSun snickersun@163.com\r
- * @LastEditTime: 2024-07-23 18:49:25\r
+ * @LastEditors: penglei 1624952103@qq.com\r
+ * @LastEditTime: 2024-07-26 14:41:31\r
* @FilePath: /FD230/code/sdk/drivers/peripheral/a5133/A5133main.h\r
* @Description: \r
* \r
Uint8 ByteRead(void);\r
void RF_SetCH(Uint8);\r
Uint8 RF_Init(void);\r
-void RF_FIFOWrite(Uint8);\r
+void RF_FIFOWrite(unsigned char *send_data,Uint8 len);\r
void RF_StrobeCmd(Uint8);\r
void RxPacket(void);\r
Uint8 RF_Cal_CHGroup(Uint8 ch);\r
void main_prog_ACK(Uint8 Flag_MASTER);\r
void RF_TXPower(Uint8 tbf, Uint8 tpa);\r
void a5133_main(Uint8 Flag_MASTER,uint8_t channel);\r
-\r
+void a5133_get_rxdata(uint8_t *databuf,uint8_t len);\r
+errcode_t a5133_set_send_data(uint8_t *senddata,uint8_t datalen);\r
#endif
\ No newline at end of file
#include "mag_service.h"
#include "ppg_service.h"
+#ifdef SUPPORT_A5133_SERVICE
+#include "A5133main.h"
+#endif
+
errcode_t uapi_create_osThread_custom(app_task_definition_t *task_cfg)
{
if (task_cfg==NULL)
uint8_t uapi_get_cywee_static_state(void)
{
return cywee_get_static_state();
+}
+
+void uapi_get_a5133_rxdata(uint8_t *databuf,uint8_t len)
+{
+#ifdef SUPPORT_A5133_SERVICE
+ a5133_get_rxdata(databuf,len);
+#endif
+}
+
+
+uint16_t CRC16_XMODEM(uint8_t *bytes,uint16_t length)
+{
+ uint16_t crc = 0x0000; // initial value
+ int polynomial = 0x1021;
+ for (int index = 0; index < length; index++) {
+ uint8_t b = bytes[index];
+ for (int i = 0; i < 8; i++) {
+ uint8_t bit = ((b >> (7 - i) & 1) == 1);
+ uint8_t c15 = ((crc >> 15 & 1) == 1);
+ crc <<= 1;
+ if (c15 ^ bit) crc ^= polynomial;
+ }
+ }
+ crc &= 0xffff;
+ return crc;
+}
+
+errcode_t uapi_a5133_set_send_data(uint8_t *senddata,uint8_t datalen)
+{
+#ifdef SUPPORT_A5133_SERVICE
+ return a5133_set_send_data(senddata,datalen);
+#else
+ return ERRCODE_SUCC;
+#endif
}
\ No newline at end of file
void uapi_get_file_data(char *path,uint8_t *data,uint8_t len);
void uapi_save_file_data(char *path,uint8_t *data,uint8_t len);
uint8_t uapi_get_cywee_static_state(void);
+void uapi_get_a5133_rxdata(uint8_t *databuf,uint8_t len);
+uint16_t CRC16_XMODEM(uint8_t *bytes,uint16_t length);
+errcode_t uapi_a5133_set_send_data(uint8_t *senddata,uint8_t datalen);
+
#include "custom_utilscpp.h"