• 2024-06-06写一个linux驱动
    简单一点,写一个字符设备驱动。首先我们希望在/dev下面出现一个新的字符设备文件。1.分配一个设备号;intalloc_chrdev_region(dev_t*dev,unsignedintfirstminor,unsignedintcount,char*name);示例:首先定义一个dev_t的变量,它其实就是一个32位的整数。再使用上述函