📄 dac_driver.h
字号:
#ifndef _DAC_H_#define _DAC_H_/******************************************************** * Macros to help debugging ********************************************************/#undef PDEBUG /* undef it, just in case */#ifdef DAC_DEBUG#ifdef __KERNEL__# define PDEBUG(fmt, args...) printk( KERN_DEBUG "DAC: " fmt, ## args)#else# define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args)#endif#else# define PDEBUG(fmt, args...) /* not debugging: nothing */#endif#undef PDEBUGG#define PDEBUGG(fmt, args...) /* nothing: it's a placeholder */
#define DAC_MAJOR 226#define DAC_MINOR 0struct dac_dev { struct cdev cdev; /* Char device structure */};ssize_t dac_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos);ssize_t dac_write(struct file *filp, const char __user *buf, size_t count, loff_t *f_pos);#endif /* _DAC_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -