|
| | MODULE_LICENSE ("GPL") |
| |
| | MODULE_AUTHOR ("Ed Kapitein") |
| |
| | module_param (gpionr, short, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) |
| |
| | MODULE_PARM_DESC (gpionr,"gpio number used for modulating the carrier") |
| |
| | module_param (invert, short, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) |
| |
| | MODULE_PARM_DESC (invert,"invert value (gpio=low means CarrierOn ), default=1") |
| |
| | module_param (debug, short, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) |
| |
| | MODULE_PARM_DESC (debug,"debug level") |
| |
| int | IoctlRange (int Range) |
| | routine called when IOCTL_RANGE is called More...
|
| |
| int | IoctlDivisor (int Divisor) |
| | routine called when IOCTL_DIVISOR is called More...
|
| |
| int | IoctlDuty (int DutyCycle) |
| | routine called when IOCTL_DUTY is called More...
|
| |
| static int | device_open (struct inode *inode, struct file *file) |
| | This is called whenever a process attempts to open the device file. More...
|
| |
| static int | device_release (struct inode *inode, struct file *file) |
| | This is called whenever a process releases the device file. More...
|
| |
| static ssize_t | device_read (struct file *file, char __user *buffer, size_t length, loff_t *offset) |
| | This is called whenever a process read from the device file. More...
|
| |
| static ssize_t | device_write (struct file *file, const char __user *buffer, size_t length, loff_t *offset) |
| | This function is called when somebody write to our device file. More...
|
| |
| static long | device_ioctl (struct file *f, unsigned int cmd, unsigned long arg) |
| | This function is called when somebody sends a ioctl to our device file. More...
|
| |
| int | init_module () |
| | Initialize the module. More...
|
| |
| void | cleanup_module () |
| | Cleanup. More...
|
| |
| static ssize_t device_write |
( |
struct file * |
file, |
|
|
const char __user * |
buffer, |
|
|
size_t |
length, |
|
|
loff_t * |
offset |
|
) |
| |
|
static |
This function is called when somebody write to our device file.
a frame consists of a number of states and durations eq CarrierOn(2000) means "set the carrier on for 2000 usecs
eq CarrierOff(1234) means "set the carrier off for 1234 usecs this driver expects 1,2000,0,1234,-1,-1 the -1 signals end of frame
TODO calculate the total length of the frame and check if the timer won't wrap during the frame
Definition at line 276 of file MyIrMod.c.