修复因内存对齐访问导致的硬件错误

This commit is contained in:
NeoZeng
2022-11-29 16:33:34 +08:00
parent f1301ab7de
commit a539072052
7 changed files with 36 additions and 61 deletions

View File

@@ -2,7 +2,7 @@
#define __SEASKY_PROTOCOL_H
#include <stdio.h>
#include <stdint.h>
#include <stdint-gcc.h>
#define PROTOCOL_CMD_ID 0XA5
@@ -41,8 +41,8 @@ typedef struct
Target_State_e target_state;
Target_Type_e target_type;
float yaw;
float pitch;
float yaw;
} Vision_Recv_s;
typedef enum
@@ -92,6 +92,7 @@ typedef struct
uint16_t frame_tail; // 帧尾CRC校验
} protocol_rm_struct;
/*更新发送数据帧,并计算发送数据帧长度*/
void get_protocol_send_data(uint16_t send_id, // 信号id
uint16_t flags_register, // 16位寄存器
@@ -103,6 +104,6 @@ void get_protocol_send_data(uint16_t send_id, // 信号id
/*接收数据处理*/
uint16_t get_protocol_info(uint8_t *rx_buf, // 接收到的原始数据
uint16_t *flags_register, // 接收数据的16位寄存器地址
float *rx_data); // 接收的float数据存储地址
uint8_t *rx_data); // 接收的float数据存储地址
#endif