开发文档

YANRUS系列设备开发文档

赋能YANRUS系列设备二次开发与系统集成。本页为您提供全面的通信协议、寄存器地址映射及开发指南,助您极速对接,高效落地。

📄 版本:V1.6 📅 更新:2026.05.13 👤 修订:XiaoFei

版权声明

本资料为沈阳晏如电子技术有限公司专有财产,非经本公司之书面授权,不得透露或使用本资料,亦不得复印、复制或转换成其它任何形式。

公司名称:沈阳晏如电子有限公司  公司网址:www.yanrus.com
公司地址:辽宁省沈阳市沈北新区东北总部基地西六区20号楼1楼

01

通信协议与寄存器地址

寄存器地址和参数与具体的设备型号和功能有关,此处仅列出版本更新时的通用寄存器地址,获取详细的功能与寄存器映射,请在设备购买或定制完成后联系我们。

Part1. 读寄存器过程

发送请求 (Request)

从机地址 功能码 开始地址高位 开始地址低位 寄存器个数高位 寄存器个数低位 CRC校验低位 CRC校验高位
0x02 0x03 XX XX XX XX CRCL CRCH

接收数据 (Response)

从机地址 功能码 返回的总字节数 寄存器数据内容 ... 寄存器数据内容 CRC校验低位 CRC校验高位
0x02 0x03 XX XX XX XX CRCL CRCH

寄存器介绍 (Register)

地址 数据 描述 标准 大小
0x0000FIL_SC_H灯丝短路错误0(Normal) 1(Fault)1
0x0001FIL_OI_H灯丝过流错误0(Normal) 1(Fault)1
0x0002PREP_EN_STAT曝光使能状态10(Disable) 1(Enable)1
0x0003DRV_EN_STAT曝光使能状态20(Disable) 1(Enable)1
0x0004KV_OV千伏过压错误0(Normal) 1(Fault)1
0x0005mA_OI毫安过流错误0(Normal) 1(Fault)1
0x0006RI_OI谐振过流错误0(Normal) 1(Fault)1
0x0007ARC打火错误0(Normal) 1(Fault)1
0x0008STARTER_ERR阳极错误0(Normal) 1(Fault)1
0x0009STARTER_HEAT阳极热量ret×1J16
0x000ACONTATOR_STAT交流接触器状态0(Off) 1(On)1
0x000BBEAMFAULT系统总体错误0(Normal) 1(Fault)1
0x000CEXP_DUTY_STAT曝光占空比标志0(Normal) 1(Busy)16
0x000DDC_BUS母线电压ret×1V16
0x000EKV_FB千伏反馈ret×10kV16
0x000FmA_FB毫安反馈ret×100mA16
0x0010FIL_FB灯丝反馈ret×100A16
0x0011TIME_FB_low曝光时间反馈低位(65536×reth+retl)×1ms16
0x0012TIME_FB_high曝光时间反馈高位(65536×reth+retl)×1ms16
0x0013TEMP_INV逆变温度反馈ret×1℃8
0x0014TEMP_TANK油温度反馈ret×1℃8
0x0015WORK_MODE_FB工作状态反馈0(Burst) 1(Pulse)1
0x0016DEV_ID0_High射线系统序列号高位string16
0x0017DEV_ID0_Low射线系统序列号低位string16
0x0018LASER_CM激光测距反馈ret×1cm16
0x0019ExpTimesSumH曝光时间汇总(65536×reth+retl)×1ms16
0x001AExpTimesSumL曝光时间汇总(65536×reth+retl)×1ms16
0x001BExpTimeSum曝光次数汇总ret×116
0x001CPower_FB主机电源反馈ret×10
0x001DKeep_For_System系统保留None0
0x001EKeep_For_System系统保留None0
0x001FKeep_For_System系统保留None0

Part2. 写寄存器过程

发送请求 (Request)

从机地址 功能码 写寄存器地址高位 写寄存器地址低位 写数据高位 写数据低位 CRC校验低位 CRC校验高位
0x02 0x06 XX XX XX XX CRCL CRCH

接收数据 (Response)

从机地址 功能码 写寄存器地址高位 写寄存器地址低位 写数据高位 写数据低位 CRC校验低位 CRC校验高位
0x02 0x06 XX XX XX XX CRCL CRCH

寄存器 (Register)

地址 数据 描述 标准 大小
0x0020Keep_For_System系统保留None1
0x0021INV_DRV_EN逆变驱动使能0(Disable) 1(Enable)1
0x0022FIL_DRV_EN灯丝驱动使能0(Disable) 1(Enable)1
0x0023HV_RST错误复位0(Disable) 1(Enable)1
0x0024KV_REF千伏设定ret×10kV16
0x0025mA_REF毫安设定ret×100mA16
0x0026FIL_REF灯丝设定ret×100A16
0x0027TIME_REF_low曝光时间设定低位(65536×reth+retl)×1ms16
0x0028TIME_REF_high曝光时间设定高位(65536×reth+retl)×1ms4
0x0029UART_PARA_SEL串口使能0(LCD) 1(Usart) 2(WIFI)1
0x002ACONTACTOR_ON开机命令0(Off) 1(On)1
0x002BFPGA_FIL_SEL灯丝选择控制0(Big FIL) 1(Small FIL)1
0x002CFIL_CTRL_EN灯丝闭环控制0(Disable) 1(Enable)1
0x002DP_FIL灯丝Pret16
0x002EI_FIL灯丝Iret16
0x002FD_FIL灯丝Dret16
0x0030KV_CTRL_EN千伏闭环控制0(Disable) 1(Enable)1
0x0031P_KV千伏Pret16
0x0032I_KV千伏Iret16
0x0033D_KV千伏Dret16
0x0034mA_CTRL_EN毫安闭环控制0(Disable) 1(Enable)1
0x0035P_mA毫安Pret16
0x0036I_mA毫安Iret16
0x0037D_mA毫安Dret16
0x0038Keep_For_System系统保留None16
0x0039Keep_For_System系统保留None16
0x003ALIGHT_ON视野灯信号0(Disable) 1(Enable)1
0x003BLaser_ON测距使能信号0(Disable) 1(Enable)1
0x003CMax_Power最大功率使能信号0(Disable) 1(Enable)1
0x003DDelay_ExpTimes延迟时间设定ret×1s16
0x003EKeep_For_System系统保留None0
0x003FKeep_For_System系统保留None0
02

开发注意事项

Part1. 主要数据范围

主要数据 单位 最大值 最小值 分度值 设置标准
千伏反馈kV90101ret×10kV
毫安反馈mA100.10.1ret×100mA
灯丝反馈A2.500.01ret×100A
曝光时间反馈ms500001(65536×reth+retl)×1ms
逆变温度反馈℃6001ret×1℃
千伏设定kV90101ret×10kV
毫安设定mA100.10.1ret×100mA
灯丝设定A1.200.01ret×100A
曝光时间设定ms500001(65536×reth+retl)×1ms
激光测距反馈cm20001ret×1cm
曝光时间汇总s//1(65536×reth+retl)×1s
曝光次数汇总///1ret×1

Part2. 开发注意事项

通信连接 (Connect)

通信方式 注意事项
Usart 串口的通信方式已经由配套的屏幕统一完成,其通信协议与前通信协议部分不同,参数:8位数据位,1位停止位,波特率为115200
WIFI 网络的通信方式需要配置网络端口为10.10.100.254:8899,通信协议遵循前通信协议部分

两种通信方式不可同时使能,默认为网络的通信方式,如需更改请根据需求进行参数配置。

参数与流程配置 (Configuration)

配置步骤 配置寄存器 注意
开启设备0x002A无
ID与PID参数确定0x002C至0x0037对于不支持此功能的设备可以跳过
错误复位0x0023无
配置通信方式0x0029如果需要进行更改且设备支持此功能可进行更改
配置千伏0x0024无
配置毫安0x0025无
配置曝光时间0x0027至0x0028无
配置灯丝0x002B和0x0026无
打开灯丝0x0020和0x0022如果参数设置过大此处会出现报错
开始曝光0x0020至0x0021如果参数设置过大此处会出现报错
关闭灯丝0x0020和0x0022无
关闭曝光0x0020至0x0021无

配置过程中若发生报错提醒,则需要进行错误复位后才可继续进行后续配置。若在打开灯丝后发生报错提醒,则需要额外关闭灯丝再进行操作。

使用过程中需要注意,设备需要以1:30的占空比进行休息。

心跳信号 (Heartbeat)

虽然通信过程中无严格要求的心跳信号,此处还是建议以一定频率获取全部寄存器的数据,以保证准时发现错误信号。

具体的寄存器获取频率无具体要求,需要根据实际情况进行设置,确保通信正常即可。

本设备在通信上为从机设备,需要接收到正确的主机命令才会有反馈,无主机信号发送或信号命令错误时均无信号返回。

校验算法 (CRC Validation)

unsigned short int CRC_Test(unsigned char* HEX, int len)
{
    unsigned short int ret = 0xFFFF;
    unsigned char i;
    while(len--){
        ret ^= *HEX++;
        for(i = 0; i < 8; i++){
            if(ret & 0x0001)
                ret = (ret >> 1) ^ 0xA001;
            else
                ret >>= 1;
        }
    }
    return ret;
}
03

开发指南

Part1. 数据结构

typedef enum {
    State_Wait = 0x00,                  // The data is suspended in this state 
    State_Ready = 0x01,                 // The data is ready in this state 
    State_Run = 0x02                    // The data is processed in this state 
} Data_StateTypedef;

typedef struct Dev_Data {
    Data_StateTypedef state;            // Current status of Dev_Data 
    unsigned short int data;            // Data of Dev_Data 
    unsigned short int Address;         // Address of Dev_Data 
    unsigned char Arr[200];             // The data buffer of Dev_Data 
    void (*Data_Deal)(void);            // Dev_Data's data processing function 
} Dev_Data;

Part2. 辅助函数

// CRC check function 
// HEX : Pointer to input data 
// len : Length of the input data 
// return : CRC Results 
unsigned short int CRC_Test(unsigned char *HEX, int len)
{
    unsigned short int ret = 0xFFFF;
    unsigned char i;
    while(len--)
    {
        ret ^= *HEX++;
        for(i = 0; i < 8; i++)
        {
            if(ret & 0x0001)
                ret = (ret >> 1) ^ 0xA001;
            else
                ret >>= 1;
        }
    }
    return ret;
}

// Check whether the two HEX data are consistent 
// str1 : Pointer to input data1 
// len1 : Length of the input data1 
// str2 : Pointer to input data2 
// len2 : Length of the input data2 
// return : Check Results 
unsigned char My_StrStr(unsigned char *str1, int len1, unsigned char *str2, int len2)
{
    int i, j;
    if(len1 <= 0 || len2 <= 0) return 0;
    if(len2 > len1) return 0;
    for(i = 0; i <= len1 - len2; i++)
    {
        for(j = 0; j < len2; j++)
            if(str1[i + j] != str2[j]) break;
        if(j == len2) return 1;
    }
    return 0;
}

// Send data to the device 
// Address : Address of the target data 
// Wdata : Target data 
// pData : Sent and returned data 
// return : None 
void SendDataToDev(unsigned short int Address, unsigned short int Wdata, unsigned char *pData)
{
    unsigned short int CRC_Da;
    unsigned int i;
    pData[0] = 0x02;
    pData[1] = 0x06;
    pData[2] = (unsigned char)((Address & 0xFF00) >> 8);
    pData[3] = (unsigned char)(Address & 0x00FF);
    pData[4] = (unsigned char)((Wdata & 0xFF00) >> 8);
    pData[5] = (unsigned char)(Wdata & 0x00FF);
    CRC_Da = CRC_Test(pData, 6);
    pData[6] = (unsigned char)(CRC_Da & 0x00FF);
    pData[7] = (unsigned char)((CRC_Da & 0xFF00) >> 8);
    // Send characters one by one on Serial Port 2 
    for(i = 0; i < 8; i++)
        Usart2_SendByte(pData[i]);
}

// Get data from the device 
// return : None 
void GetDataFromDev(void)
{
    unsigned char data[8];
    unsigned short int CRC_Da;
    unsigned int i;
    data[0] = 0x02;
    data[1] = 0x03;
    data[2] = 0x00;
    data[3] = 0x00;
    data[4] = 0x00;
    data[5] = 0x40;
    CRC_Da = CRC_Test(data, 6);
    data[6] = (unsigned char)(CRC_Da & 0x00FF);
    data[7] = (unsigned char)((CRC_Da & 0xFF00) >> 8);
    // Send characters one by one on Serial Port 2 
    for(i = 0; i < 8; i++)			
        Usart2_SendByte(data[i]);
}

Part3. 数据发送

// Define a global variable, here taking Contator_On as an example
Dev_Data Contator_On;

void ops_Contator_On(void)			// Contator_On's data processing function
{
    // If the data is suspended, return immediately
    if(Contator_On.state == State_Wait)
    {
        return;
    }
    // If the data is in the ready state, send the data
    if(Contator_On.state == State_Ready)
    {
        // Send the data Contator_On.data to the address Contator_On.Address
        // Retrieve the data into Contator_On.Arr
        SendDataToDev(Contator_On.Address,Contator_On.data,Contator_On.Arr);
        // Data transmission completed, preparation for data processing
        Contator_On.state = State_Run;
        return;
    }
    // If the data is in a running state, process it
    if(Contator_On.state == State_Run)
    {
        // The feedback received is incorrect, resend the data
        // Dev_UsartData_buf is the content of the current serial port buffer
        // Dev_len_buf is the length of the existing data
        if(My_StrStr(Dev_UsartData_buf,Dev_len_buf,Contator_On.Arr,8) == 0x00)
            SendDataToDev(Contator_On.Address,Contator_On.data,Contator_On.Arr);
        else 
        {
            // You can perform related operations here
            // TODO : Some operations you need
            // This example shows printing 'Contator_On Finish' on Serial Usart1
            Usart1_Printf("Contator_On Finish\n");
            // Suspend the status
            Contator_On.state = State_Wait;
        }
        return;
    }
}

void DevData_Init(void)
{
    // The Address of Contator_On is 0x002A (Chapter 1 Part 2)
    Contator_On.Address = 0x002A;					
    // The data of Contator_On will be initialized to 0x00
    Contator_On.data = 0x0000;						
    // The data is suspended
    Contator_On.state = State_Wait;					
    // Initialize data processing pointer
    Contator_On.Data_Deal = ops_Contator_On;
}

// You also need a signal to notify the ops function to enter State_Ready
// Here, taking key detection as an example
// This is the timer interrupt function
unsigned char last_State1 = 0x00;					// Local variable for key detection
unsigned char State1 = 0x00;						// Local variable for key detection
void TIM2_IRQHandler(void)
{
    if (TIM_GetITStatus(TIM2, TIM_IT_Update) == SET)
    {
        TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
        last_State1 = State1;
        State1 = (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_12) == Bit_RESET) ? 0x01 : 0x00;
        // Rising edge detected
        if((State1 == 0x01)&&(last_State1 == 0x00))
        {
            // The data is assigned the value 0x0001 and enters the ready state
            Contator_On.state = State_Ready;
            Contator_On.data = 0x0001;
        }
    }
}

// You need to loop the corresponding ops function in the main function
int main(void)
{
    DevData_Init();
    Usart1_Init();
    Usart2_Init();
    Tim2_Init();
    while(1)
    {
        Contator_On.Data_Deal();
        // You also need to take relevant measures to prevent data overflow.
        // Here is a caching mechanism provided as an example
        memset(Dev_UsartData_buf,0x00,500);
        Dev_len_buf = Dev_len;
        memcpy(Dev_UsartData_buf,Dev_UsartData,500);
        memset(Dev_UsartData,0x00,500);
        Dev_len = 0;
    }
}

Part4. 数据处理

// For convenience, the original data structure is used here. 
Dev_Data Get_Data_Deal;

void ops_Get_Data_Deal(void)		// Get_Data_Deal's data processing function
{
    // If the data is suspended, return immediately
    if(Get_Data_Deal.state == State_Wait)
    {
        return;
    }
    // If the data is in the ready state, send the data
    if(Get_Data_Deal.state == State_Ready)
    {
        // Send a request to get data
        GetDataFromDev();
        // Data transmission completed, preparation for data processing
        Get_Data_Deal.state = State_Run;
        return;
    }
    // If the data is in a running state, process it
    if(Get_Data_Deal.state == State_Run)
    {
        // Calculate the actual checksum based on the previous data
        unsigned short int CRC_Text = CRC_Test(Get_Data_Deal.Arr,131);
        // Obtain the CRC checksum from the data packet
        unsigned short int CRC_EE = (unsigned short int)Get_Data_Deal.Arr[131] 
            						+ (unsigned short int)Get_Data_Deal.Arr[132]*256;
        // Verification failed, resend the request to obtain data
        if(CRC_Text != CRC_EE)
        {
            GetDataFromDev();
            return;
        }
        // Verification passed, you can handle your data here
        // TODO : Some operations you need
        // This example shows printing 'Get_Data Finish' on Usart1
        Usart1_Printf("Get_Data Finish\n");
        // Destroy the check bits to prevent the data from being reused
        Get_Data_Deal.Arr[132] = 0x00;
        Get_Data_Deal.Arr[133] = 0x00;
        // Suspend the status
        Get_Data_Deal.state = State_Wait;
        return;
    }
}

void DevData_Init(void)
{
    // Since there is no address and no data to write, no assignment is made here directly.
    Get_Data_Deal.state = State_Wait;				// The data is suspended
    Get_Data_Deal.Data_Deal = ops_Get_Data_Deal;	    // Initialize data processing pointer
}

// For convenience, the function enabled by this button is set to a single query.
// This is the timer interrupt function
unsigned char last_State1 = 0x00;					// Local variable for key detection
unsigned char State1 = 0x00;						// Local variable for key detection
void TIM2_IRQHandler(void)
{
    if (TIM_GetITStatus(TIM2, TIM_IT_Update) == SET)
    {
        TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
        last_State1 = State1;
        State1 = (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_12) == Bit_RESET) ? 0x01 : 0x00;
        // Rising edge detected
        if((State1 == 0x01)&&(last_State1 == 0x00))
        {
            // Set the ops for obtaining data to ready state
            Get_Data_Deal.state = State_Ready;
        }
    }
}

// You need to loop the corresponding ops function in the main function
int main(void)
{
    DevData_Init();
    Usart1_Init();
    Usart2_Init();
    Tim2_Init();
    while(1)
    {
        Get_Data_Deal.Data_Deal();
        // You also need to take relevant measures to prevent data overflow.
        // Here is a caching mechanism provided as an example
        memset(Dev_UsartData_buf,0x00,500);
        Dev_len_buf = Dev_len;
        memcpy(Dev_UsartData_buf,Dev_UsartData,500);
        memset(Dev_UsartData,0x00,500);
        Dev_len = 0;
    }
}

Part5. 数据处理技巧

// Here is the data processing method of our other device
// You can refer to this kind of handling technique
// This union takes advantage of memory continuity and defines 133 pieces of data for the query protocol.
// You'd better update this union according to the agreement of the version you are using.
// The keyword '__pack' indicates that data is tightly packed
typedef union Type_Rx_Data{
    __packed struct{
        unsigned char hand0;
        unsigned char hand1;
        unsigned char hand2;
        unsigned short int p00_FIL_SC_H;
        unsigned short int p01_FIL_OI_H;
        unsigned short int p02_PREP_EN_STAT;
        unsigned short int p03_DRV_EN_STAT;
        unsigned short int p04_KV_OV;
        unsigned short int p05_mA_OI;
        unsigned short int p06_RI_OI;
        unsigned short int p07_ARC;
        unsigned short int p08_STARTER_ERR;
        unsigned short int p09_STARTER_HEAT;
        unsigned short int p0A_CONTATOR_STAT;
        unsigned short int p0B_BEAMFAULT;
        unsigned short int p0C_EXP_DUTY_STAT;
        unsigned short int p0D_DC_BUS;
        unsigned short int p0E_KV_FB;
        unsigned short int p0F_mA_FB;
        unsigned short int p10_FIL_FB;
        unsigned short int p11_TIME_FB_low;
        unsigned short int p12_TIME_FB_high;
        unsigned short int p13_TEMP_INV;
        unsigned short int p14_TEMP_TANK;
        unsigned short int p15_WORK_MODE_FB;
        unsigned short int p16_DEV_ID0_High;
        unsigned short int p17_DEV_ID0_Low;
        unsigned short int p18_LASER_CM;
        unsigned short int p19_ExpTimesSumH;
        unsigned short int p1A_ExpTimesSumL;
        unsigned short int p1B_ExpTimeSum;
        unsigned short int p1C_Power_FB;
        unsigned short int p1D_Keep_For_System;
        unsigned short int p1E_Keep_For_System;
        unsigned short int p1F_Keep_For_System;
        unsigned short int p20_Keep_For_System;
        unsigned short int p21_INV_DRV_EN;
        unsigned short int p22_FIL_DRV_EN;
        unsigned short int p23_HV_RST;
        unsigned short int p24_KV_REF;
        unsigned short int p25_mA_REF;
        unsigned short int p26_FIL_REF;
        unsigned short int p27_TIME_REF_low;
        unsigned short int p28_TIME_REF_high;
        unsigned short int p29_UART_PARA_SEL;
        unsigned short int p2A_CONTACTOR_ON;
        unsigned short int p2B_FPGA_FIL_SEL;
        unsigned short int p2C_FIL_CTRL_EN;
        unsigned short int p2D_P_FIL;
        unsigned short int p2E_I_FIL;
        unsigned short int p2F_D_FIL;
        unsigned short int p30_KV_CTRL_EN;
        unsigned short int p31_P_KV;
        unsigned short int p32_I_KV;
        unsigned short int p33_D_KV;
        unsigned short int p34_mA_CTRL_EN;
        unsigned short int p35_P_mA;
        unsigned short int p36_I_mA;
        unsigned short int p37_D_mA;
        unsigned short int p38_Keep_For_System;
        unsigned short int p39_Keep_For_System;
        unsigned short int p3A_LIGHT_ON;
        unsigned short int p3B_Laser_ON;
        unsigned short int p3C_Max_Power;
        unsigned short int p3D_Delay_ExpTimes;
        unsigned short int p3E_Keep_For_System;
        unsigned short int p3F_Keep_For_System;
        unsigned char CRCL;
        unsigned char CRCH;
    }val;
    unsigned char data[133];
}Rx_Data_t;

// You can use a FSM to obtain all 133 pieces of data
// This is the interrupt function for UART1
// Directly received data for Set data 
unsigned char Dev_UsartData[500] = {0x00};		
// Receive Data Buffer for Set data
unsigned char Dev_UsartData_buf[500] = {0x00};	
// Directly received data for Get data
Rx_Data_t Rx_Data;
// Receive Data Buffer for Get data
Rx_Data_t Rx_Data1;
// Data Receiving Status
unsigned char Rx_State = 0x00;					
// Number of valid data already received
unsigned char Rx_Wei = 3;						
void USART1_IRQHandler(void)
{
    if(USART_GetITStatus(USART1, USART_IT_RXNE) == SET)
        USART_ClearITPendingBit(USART1, USART_IT_RXNE);
    // Obtain the data received this time
    Dev_UsartData[Dev_len] = USART_ReceiveData(USART1);
    // Select according to the current reception status for Get data
    switch(Rx_State)
    {
        // No valid data received
        case 0x00:
        {
            // Received the first valid data, exit the loop
            if(Dev_UsartData[Dev_len] == 0x02)
            Rx_State = 0x01;
            break;
        }
        // A valid data has already been received
        case 0x01:
        {
            // Received the second valid data, exit the loop
            if(Dev_UsartData[Dev_len] == 0x03)
                Rx_State = 0x02;
            // Otherwise, the data is invalid
            else
                Rx_State = 0x00;
            break;
        }
        // Packet header data is valid, ready to receive
        case 0x02:
        {
            // Number of data received
            if(Dev_UsartData[Dev_len] == 0x80)
            {
                // Assign values to the data packet header of the data structure 
                // and prepare to receive the valid data section
                Rx_State = 0x03;
                Rx_Data.data[0] = 0x02;
                Rx_Data.data[1] = 0x03;
                Rx_Data.data[2] = 0x80;
                Rx_Wei = 3;
            }
            // Otherwise, the data is invalid
            else
                Rx_State = 0x00;
            break;
        }
        // Receive valid data
        case 0x03:
        {
            // Write valid data one after another
            Rx_Data.data[Rx_Wei] = Dev_UsartData[Dev_len];
            Rx_Wei++;
            // Data reception complete, updated to cache
            if(Rx_Wei >= 134)
            {
                Rx_Wei = 3;
                Rx_State = 0x00;
                memcpy(Get_Data_Deal.Arr,Rx_Data.data,133);
                memcpy(Rx_Data1.data,Rx_Data.data,133);
            }
            break;
        }
    }
    // Ensure that the setting data reception is not affected
    if(Dev_len < 450)
    Dev_len ++;
}

// Macro for fetching data
// Choose according to your device situation
// Little-endian
#define Get_RX(data_x) 			(((Rx_Data1.val.data_x&0xFF00)>>8)|((Rx_Data1.val.data_x&0x00FF)<<8))
// Big-endian
#define Get_RX(data_x)			Rx_Data1.val.data_x
// You can read the data of FIL_SC_H in the following way
unsigned short int FIL_SC_H = Get_RX(p00_FIL_SC_H);
04

文件修正记录

版本 生效日期 修订部门 修订人 修订说明
V1.0 2023.11.05 研发部 Homer 创建
V1.1 2025.11.03 研发部 XiaoFei 修改
V1.4 2025.11.29 研发部 XiaoFei 修改
V1.6 2026.05.13 研发部 XiaoFei 修改