?? led_config.h
字號:
#define LED_Config_Debug 1#ifdef LED_Config_Debug# ifdef __KERNEL__ /* This one if debugging is on, and kernel space */# define PDEBUG(fmt, args...) printk( KERN_NOTICE "J2M_Config: " fmt, ## args)# else /* This one for user space */# define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args)# endif#else# define PDEBUG(fmt, args...) /* not debugging: nothing */#endif//#include <linux/ioctl.h>//#include <linux/cdev.h>#define LED_CONFIG_MAJOR 0/* Use 'k' as magic number */#define LED_MAGIC 'K'/* Please use a different 8-bit number in your code *///#define LED_Config_IOC_Status _IOWR(LED_Config_IOC_MAGIC, 9,int)#define LED_Config_IOC_Setting _IOWR(LED_Config_IOC_MAGIC, 8,int)#define LED_PRE_ON _IOWR(LED_MAGIC,0,int)#define LED_PRE_OFF _IOWR(LED_MAGIC,1,int)#define LED_PRE_BLINK _IOWR(LED_MAGIC,2,int)#define LED_COM_ON _IOWR(LED_MAGIC,3,int)#define LED_COM_OFF _IOWR(LED_MAGIC,4,int)#define LED_COM_BLINK _IOWR(LED_MAGIC,5,int)#define LED_Config_Data_fail 0x4#define LED_low_Data_fail 0x0#define GPIO_config_register_address 0x1187#define GPIO_status_register_address 0x118f#define GPIO_base_address 0x1180#define LED_ADDRESS GPIO_base_address + 0x0c
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -