开发环境
主芯片:F1C100s
交叉编译器:arm-none-eabi
IDE: VSCode
操作系统:Windows
问题描述
全局变量初始化后,打印调试时发现数据错误。
代码如下:
/// @brief 通道设置
struct tagChannelSettings
{
/* Settings */
uint8 enable; // 通道是否关闭。0:关闭;1:打开。
uint8 coupling;
uint8 magnification;
uint8 displayvoltperdiv;
uint8 samplevoltperdiv;
uint8 fftenable;
/* Trace on Screen position */
uint16 trace_position;
/* FPGA commands*/
uint8 enable_cmd; // CH1 需要设置为 0x02, CH2 需要设置为 0x03
uint8 coupling_cmd; // CH1 需要设置为 0x34, CH2 需要设置为 0x37
uint8 volt_div_cmd; // CH1 需要设置为 0x33, CH2 需要设置为 0x36
uint8 offset_cmd; // CH1 需要设置为 0x32, CH2 需要设置为 0x35