版权声明:本文为博主原创文章,未经博主允许不得转载 https://blog.csdn.net/liangtianmeng/article/details/83211638
首先定义一个指向hello_device_t的结构体指针变量dev,分配大小为sizeof(struct hello_device_t)的内存并返回指向首地址的指针
struct hello_device_t* dev;
dev = (struct hello_device_t*)malloc(sizeof(struct hello_device_t));