pirblaster  0.01
Use the pi as a remote control for your TV, DVD player etc.
Macros
Kmod.h File Reference
#include <linux/ioctl.h>
Include dependency graph for Kmod.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BCM_PASSWORD   0x5A000000
 
#define IO_BASE   0x20000000
 
#define GPIO_CONTROL   0x00200000
 
#define GPIO_CLK   0x00101000
 
#define TIMER_CONTROL   0x00003000
 
#define GPIO_PWM   0x0000C000
 
#define PWM0_MOD_MS   0x00000080
 
#define PWM0_MODE_BAL   0x00000001
 
#define PWMCLK_CNTL   0x00000028
 
#define PWMCLK_DIV   0x00000029
 
#define PWM0_DATA   0x00000005
 
#define PWM0_RANGE   0x00000004
 
#define PWM0_ENABLE   0x00000001
 
#define PWM_CONTROL   0x00000000
 
#define GPFSEL1   0x00000001
 
#define ONE_MHZ_COUNTER   0x00000004
 
#define HwClockFreq   19200
 
#define MaxFrameTime   200000
 
#define BUF_LEN   2000
 
#define DEVICE_NAME   "MyIrMod"
 
#define CLASS_NAME   "MyIrClass"
 
#define PwmPin   18
 
#define IOC_MAGIC   'k'
 
#define IOCTL_RANGE   _IO(IOC_MAGIC,0)
 
#define IOCTL_DIVISOR   _IO(IOC_MAGIC,1)
 
#define IOCTL_DUTY   _IO(IOC_MAGIC,2)
 

Macro Definition Documentation

#define BCM_PASSWORD   0x5A000000

Broadcom magic

Definition at line 10 of file Kmod.h.

#define BUF_LEN   2000

Max number of pulses in a frame. Adjust if necessary

Definition at line 29 of file Kmod.h.

#define CLASS_NAME   "MyIrClass"

Class name to register the device in udev

Definition at line 32 of file Kmod.h.

#define DEVICE_NAME   "MyIrMod"

This name is used for the device (/dev/MyIrMod)

Definition at line 31 of file Kmod.h.

#define GPFSEL1   0x00000001

offset to the alt register in 32 bits long ints

Definition at line 24 of file Kmod.h.

#define GPIO_CLK   0x00101000

Control register of the pwm clock

Definition at line 13 of file Kmod.h.

#define GPIO_CONTROL   0x00200000

Control register for the gpio functions (in/out/alt)

Definition at line 12 of file Kmod.h.

#define GPIO_PWM   0x0000C000

Address of the GPIO_PWM

Definition at line 15 of file Kmod.h.

#define HwClockFreq   19200

Hardware Clock frequency in KHz

Definition at line 27 of file Kmod.h.

#define IO_BASE   0x20000000

Base address of the IO chip

Definition at line 11 of file Kmod.h.

#define IOC_MAGIC   'k'

defines a magic number

Definition at line 39 of file Kmod.h.

#define IOCTL_DIVISOR   _IO(IOC_MAGIC,1)

defines our ioctl call to set the freq divisor

Definition at line 41 of file Kmod.h.

#define IOCTL_DUTY   _IO(IOC_MAGIC,2)

defines our ioctl call to set the DutyCycle

Definition at line 42 of file Kmod.h.

#define IOCTL_RANGE   _IO(IOC_MAGIC,0)

defines our ioctl call to set the range of the timer

Definition at line 40 of file Kmod.h.

#define MaxFrameTime   200000

Max length of any element of a frame

Definition at line 28 of file Kmod.h.

#define ONE_MHZ_COUNTER   0x00000004

Clock with 1 us accuracy

Definition at line 25 of file Kmod.h.

#define PWM0_DATA   0x00000005

Pwm data register

Definition at line 20 of file Kmod.h.

#define PWM0_ENABLE   0x00000001

Channel Enable

Definition at line 22 of file Kmod.h.

#define PWM0_MOD_MS   0x00000080

To OR with the PWM_CONTROL to set Pwm mode

Definition at line 16 of file Kmod.h.

#define PWM0_MODE_BAL   0x00000001

Balanced mode or MarkSpace mode

Definition at line 17 of file Kmod.h.

#define PWM0_RANGE   0x00000004

Register to set DutyCycle granularity

Definition at line 21 of file Kmod.h.

#define PWM_CONTROL   0x00000000

Control register of Pwm

Definition at line 23 of file Kmod.h.

#define PWMCLK_CNTL   0x00000028

Control register of the pwm clock

Definition at line 18 of file Kmod.h.

#define PWMCLK_DIV   0x00000029

Pwm clock divider

Definition at line 19 of file Kmod.h.

#define PwmPin   18

This is the pin with hardware PWM on a pi

Definition at line 33 of file Kmod.h.

#define TIMER_CONTROL   0x00003000

Control register of the hardware clock

Definition at line 14 of file Kmod.h.