-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmodule.h
29 lines (23 loc) · 1.03 KB
/
module.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <linux/kernel.h> // Needed for KERN_INFO
#include <linux/module.h>
// ****************************************************************************
// **** START Module Defines ****
// ****************************************************************************
MODULE_LICENSE("GPL");
MODULE_AUTHOR("mdk");
MODULE_DESCRIPTION("Raspicomm kernel module with tty driver support for rs-485");
MODULE_SUPPORTED_DEVICE("ttyRPC");
#define SUCCESS 0
// ****************************************************************************
// **** END Module Defines ****
// ****************************************************************************
// outputs verbose debug information
//#define DEBUG
/* if DEBUG is defined, log using printk(), else do nothing */
#ifdef DEBUG
#define LOG(fmt, args...) do { printk( KERN_DEBUG "rpc: " fmt "\n", ## args); } while(0)
#else
#define LOG(fmt, args...) do {} while(0);
#endif
/* log maps always to printk */
#define LOG_INFO(fmt, args...) do { printk( KERN_INFO "rpc" ": " fmt "\n", ## args); } while(0)