Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
driver.h File Reference
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <sound/core.h>
#include "midi.h"

Go to the source code of this file.

Data Structures

struct  line6_properties
 
struct  usb_line6
 

Macros

#define DRIVER_NAME   "line6usb"
 
#define LINE6_TIMEOUT   1
 
#define LINE6_MAX_DEVICES   8
 
#define LINE6_BUFSIZE_LISTEN   32
 
#define LINE6_MESSAGE_MAXLEN   256
 
#define LINE6_PARAM_CHANGE   0xb0
 
#define LINE6_PROGRAM_CHANGE   0xc0
 
#define LINE6_SYSEX_BEGIN   0xf0
 
#define LINE6_SYSEX_END   0xf7
 
#define LINE6_RESET   0xff
 
#define LINE6_CHANNEL_HOST   0x00
 
#define LINE6_CHANNEL_DEVICE   0x02
 
#define LINE6_CHANNEL_UNKNOWN   5 /* don't know yet what this is good for */
 
#define LINE6_CHANNEL_MASK   0x0f
 
#define DEBUG_MESSAGES(x)
 
#define MISSING_CASE
 
#define CHECK_RETURN(x)
 
#define CHECK_STARTUP_PROGRESS(x, n)
 

Functions

charline6_alloc_sysex_buffer (struct usb_line6 *line6, int code1, int code2, int size)
 
ssize_t line6_nop_read (struct device *dev, struct device_attribute *attr, char *buf)
 
ssize_t line6_nop_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
 
int line6_read_data (struct usb_line6 *line6, int address, void *data, size_t datalen)
 
int line6_read_serial_number (struct usb_line6 *line6, int *serial_number)
 
int line6_send_program (struct usb_line6 *line6, u8 value)
 
int line6_send_raw_message (struct usb_line6 *line6, const char *buffer, int size)
 
int line6_send_raw_message_async (struct usb_line6 *line6, const char *buffer, int size)
 
int line6_send_sysex_message (struct usb_line6 *line6, const char *buffer, int size)
 
int line6_send_sysex_message_async (struct usb_line6 *line6, const char *buffer, int size)
 
ssize_t line6_set_raw (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
 
void line6_start_timer (struct timer_list *timer, unsigned int msecs, void(*function)(unsigned long), unsigned long data)
 
int line6_transmit_parameter (struct usb_line6 *line6, int param, u8 value)
 
int line6_version_request_async (struct usb_line6 *line6)
 
int line6_write_data (struct usb_line6 *line6, int address, void *data, size_t datalen)
 

Variables

const unsigned char line6_midi_id [3]
 
struct usb_line6line6_devices [LINE6_MAX_DEVICES]
 

Macro Definition Documentation

#define CHECK_RETURN (   x)
Value:
do { \
err = x; \
if (err < 0) \
return err; \
} while (0)

Definition at line 66 of file driver.h.

#define CHECK_STARTUP_PROGRESS (   x,
  n 
)
Value:
do { \
if ((x) >= (n)) \
return; \
x = (n); \
} while (0)

Definition at line 73 of file driver.h.

#define DEBUG_MESSAGES (   x)

Definition at line 59 of file driver.h.

#define DRIVER_NAME   "line6usb"

Definition at line 21 of file driver.h.

#define LINE6_BUFSIZE_LISTEN   32

Definition at line 29 of file driver.h.

#define LINE6_CHANNEL_DEVICE   0x02

Definition at line 50 of file driver.h.

#define LINE6_CHANNEL_HOST   0x00

Definition at line 45 of file driver.h.

#define LINE6_CHANNEL_MASK   0x0f

Definition at line 54 of file driver.h.

#define LINE6_CHANNEL_UNKNOWN   5 /* don't know yet what this is good for */

Definition at line 52 of file driver.h.

#define LINE6_MAX_DEVICES   8

Definition at line 28 of file driver.h.

#define LINE6_MESSAGE_MAXLEN   256

Definition at line 30 of file driver.h.

#define LINE6_PARAM_CHANGE   0xb0

Definition at line 35 of file driver.h.

#define LINE6_PROGRAM_CHANGE   0xc0

Definition at line 36 of file driver.h.

#define LINE6_RESET   0xff

Definition at line 39 of file driver.h.

#define LINE6_SYSEX_BEGIN   0xf0

Definition at line 37 of file driver.h.

#define LINE6_SYSEX_END   0xf7

Definition at line 38 of file driver.h.

#define LINE6_TIMEOUT   1

Definition at line 27 of file driver.h.

#define MISSING_CASE
Value:
printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \
__FILE__, __LINE__)

Definition at line 62 of file driver.h.

Function Documentation

char* line6_alloc_sysex_buffer ( struct usb_line6 line6,
int  code1,
int  code2,
int  size 
)

Definition at line 378 of file driver.c.

ssize_t line6_nop_read ( struct device dev,
struct device_attribute attr,
char buf 
)

Definition at line 677 of file driver.c.

ssize_t line6_nop_write ( struct device dev,
struct device_attribute attr,
const char buf,
size_t  count 
)

Definition at line 686 of file driver.c.

int line6_read_data ( struct usb_line6 line6,
int  address,
void data,
size_t  datalen 
)

Definition at line 566 of file driver.c.

int line6_read_serial_number ( struct usb_line6 line6,
int serial_number 
)

Definition at line 668 of file driver.c.

int line6_send_program ( struct usb_line6 line6,
u8  value 
)

Definition at line 493 of file driver.c.

int line6_send_raw_message ( struct usb_line6 line6,
const char buffer,
int  size 
)

Definition at line 201 of file driver.c.

int line6_send_raw_message_async ( struct usb_line6 line6,
const char buffer,
int  size 
)

Definition at line 296 of file driver.c.

int line6_send_sysex_message ( struct usb_line6 line6,
const char buffer,
int  size 
)

Definition at line 354 of file driver.c.

int line6_send_sysex_message_async ( struct usb_line6 line6,
const char buffer,
int  size 
)

Definition at line 365 of file driver.c.

ssize_t line6_set_raw ( struct device dev,
struct device_attribute attr,
const char buf,
size_t  count 
)
void line6_start_timer ( struct timer_list timer,
unsigned int  msecs,
void(*)(unsigned long function,
unsigned long  data 
)

Definition at line 285 of file driver.c.

int line6_transmit_parameter ( struct usb_line6 line6,
int  param,
u8  value 
)

Definition at line 529 of file driver.c.

int line6_version_request_async ( struct usb_line6 line6)

Definition at line 332 of file driver.c.

int line6_write_data ( struct usb_line6 line6,
int  address,
void data,
size_t  datalen 
)

Definition at line 623 of file driver.c.

Variable Documentation

Definition at line 99 of file driver.c.

const unsigned char line6_midi_id[3]

Definition at line 87 of file driver.c.