typedef struct uint16_t OutsideRelay 1; uint16_t InvWork 2; uint16_t InvWorkFinal 2; 0 等待 1离网 2 并网 uint16_t RelayGpioEnable 1; uint16_t rev 10;MonitorWord_BITS;理解以下代码并用中文将注释写在
typedef struct { uint16_t OutsideRelay :1; //外部继电器状态,占用1位,取值为0或1 uint16_t InvWork :2; //逆变器工作状态,占用2位,取值为0~3 uint16_t InvWorkFinal :2; //逆变器最终工作状态,占用2位,取值为0~3,0表示等待,1表示离网,2表示并网
uint16_t RelayGpioEnable :1; //继电器GPIO使能状态,占用1位,取值为0或1
uint16_t rev :10; //保留位,占用10位,取值为0
}MonitorWord_BITS; //定义一个结构体类型,命名为MonitorWord_BITS
原文地址: https://www.cveoy.top/t/topic/fgks 著作权归作者所有。请勿转载和采集!