map_t是结构体类型
typedef struct
{
uint32_t ip:3;
uint32_t io:3;
uint32_t mux:3;
uint32_t pin_start:5;
uint32_t pin_cnt:5;
uint32_t chl:5;
uint32_t reserved:8;
}map_t;
map_t * pq = (map_t*)&(MAP); 这句话是什么意思?
typedef struct
{
uint32_t ip:3;
uint32_t io:3;
uint32_t mux:3;
uint32_t pin_start:5;
uint32_t pin_cnt:5;
uint32_t chl:5;
uint32_t reserved:8;
}map_t;
map_t * pq = (map_t*)&(MAP); 这句话是什么意思?
解决方案
20
让变量pq的值等于变量MAP的地址
40
将MAP的地址作强制转换转换,转换成指向map_t结构体的指针类型,然后赋值给pq