C语言中的“位域”,(结构体中的冒号用法)

struct {
uint32_t opcode1_0 : 2;
uint32_t opcode6_2 : 5;
uint32_t rd : 5;
uint32_t funct3 : 3;
uint32_t rs1 : 5;
int32_t simm11_0 :12;
} i;

以上是PA中暂时不明白的一个位域应用

来源:https://blog.csdn.net/yihongxiaoxiang/article/details/50327587

posted @ 2022-08-04 09:30  yinhuachen  阅读(93)  评论(0编辑  收藏  举报