/* superbird header file * * This header file is shared be userspace programs and the kernel driver. * * Author: Karl Koscher * Version: 0.1 */ #include /* Status byte format: * * 4 MSBs are reserved. * Lower 4 MSBs: [PSEL2 PSEL1 LJOG RJOG] * * All switches are active low. * * PSEL1 is the top switch, while PSEL2 is the bottom switch. * * LJOG and RJOG are outputs from the jog dial. When both are low, * the dial is pressed down. When only LJOG is low, the dial is * being pushed up. When only RJOG is low, the dial is being pushed * down. * * A stream of status byte updates are available by reading the * device file. You can also use ioctls to poll the current status. */ /* ioctl definitions */ #define SUPERBIRD_IOCTL_MAGIC 'd' #define SUPERBIRD_GET_STATUS _IOR(SUPERBIRD_IOCTL_MAGIC, 0xE0, char) #define SUPERBIRD_GET_USB_PWR _IOR(SUPERBIRD_IOCTL_MAGIC, 0xE1, char) #define SUPERBIRD_SET_USB_PWR _IOR(SUPERBIRD_IOCTL_MAGIC, 0xE2, char) #define SUPERBIRD_POWER_DOWN _IO(SUPERBIRD_IOCTL_MAGIC, 0xEF) /* Use with caution! */