1,结构体定义一
定义:
typedef struct
{
GPIO_TypeDef* port_x; //引脚组
uint32_t gpio_x; //引脚号
}gpio_struct;
typedef struct
{
gpio_struct sda; //成员变量会有内存分配
gpio_struct scl;
uint16_t data;
}nixie_tube_struct;
申明结构体变量:
nixie_tube_struct nixie_tube_handler = {0};