Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
stv06xx.h File Reference
#include <linux/slab.h>
#include "gspca.h"

Go to the source code of this file.

Data Structures

struct  sd
 

Macros

#define MODULE_NAME   "STV06xx"
 
#define STV_ISOC_ENDPOINT_ADDR   0x81
 
#define STV_R   0x0509
 
#define STV_REG23   0x0423
 
#define STV_I2C_PARTNER   0x1420
 
#define STV_I2C_VAL_REG_VAL_PAIRS_MIN1   0x1421
 
#define STV_I2C_READ_WRITE_TOGGLE   0x1422
 
#define STV_I2C_FLUSH   0x1423
 
#define STV_I2C_SUCC_READ_REG_VALS   0x1424
 
#define STV_ISO_ENABLE   0x1440
 
#define STV_SCAN_RATE   0x1443
 
#define STV_LED_CTRL   0x1445
 
#define STV_STV0600_EMULATION   0x1446
 
#define STV_REG00   0x1500
 
#define STV_REG01   0x1501
 
#define STV_REG02   0x1502
 
#define STV_REG03   0x1503
 
#define STV_REG04   0x1504
 
#define STV_ISO_SIZE_L   0x15c1
 
#define STV_ISO_SIZE_H   0x15c2
 
#define STV_Y_CTRL   0x15c3
 
#define STV_RESET   0x1620
 
#define STV_X_CTRL   0x1680
 
#define STV06XX_URB_MSG_TIMEOUT   5000
 
#define I2C_MAX_BYTES   16
 
#define I2C_MAX_WORDS   8
 
#define I2C_BUFFER_LENGTH   0x23
 
#define I2C_READ_CMD   3
 
#define I2C_WRITE_CMD   1
 
#define LED_ON   1
 
#define LED_OFF   0
 
#define BRIDGE_STV600   0
 
#define BRIDGE_STV602   1
 
#define BRIDGE_STV610   2
 
#define BRIDGE_ST6422   3 /* With integrated sensor */
 

Functions

int stv06xx_write_bridge (struct sd *sd, u16 address, u16 i2c_data)
 
int stv06xx_read_bridge (struct sd *sd, u16 address, u8 *i2c_data)
 
int stv06xx_write_sensor_bytes (struct sd *sd, const u8 *data, u8 len)
 
int stv06xx_write_sensor_words (struct sd *sd, const u16 *data, u8 len)
 
int stv06xx_read_sensor (struct sd *sd, const u8 address, u16 *value)
 
int stv06xx_write_sensor (struct sd *sd, u8 address, u16 value)
 

Macro Definition Documentation

#define BRIDGE_ST6422   3 /* With integrated sensor */

Definition at line 104 of file stv06xx.h.

#define BRIDGE_STV600   0

Definition at line 101 of file stv06xx.h.

#define BRIDGE_STV602   1

Definition at line 102 of file stv06xx.h.

#define BRIDGE_STV610   2

Definition at line 103 of file stv06xx.h.

#define I2C_BUFFER_LENGTH   0x23

Definition at line 78 of file stv06xx.h.

#define I2C_MAX_BYTES   16

Definition at line 75 of file stv06xx.h.

#define I2C_MAX_WORDS   8

Definition at line 76 of file stv06xx.h.

#define I2C_READ_CMD   3

Definition at line 79 of file stv06xx.h.

#define I2C_WRITE_CMD   1

Definition at line 80 of file stv06xx.h.

#define LED_OFF   0

Definition at line 83 of file stv06xx.h.

#define LED_ON   1

Definition at line 82 of file stv06xx.h.

#define MODULE_NAME   "STV06xx"

Definition at line 36 of file stv06xx.h.

#define STV06XX_URB_MSG_TIMEOUT   5000

Definition at line 73 of file stv06xx.h.

#define STV_I2C_FLUSH   0x1423

Definition at line 48 of file stv06xx.h.

#define STV_I2C_PARTNER   0x1420

Definition at line 45 of file stv06xx.h.

#define STV_I2C_READ_WRITE_TOGGLE   0x1422

Definition at line 47 of file stv06xx.h.

#define STV_I2C_SUCC_READ_REG_VALS   0x1424

Definition at line 49 of file stv06xx.h.

#define STV_I2C_VAL_REG_VAL_PAIRS_MIN1   0x1421

Definition at line 46 of file stv06xx.h.

#define STV_ISO_ENABLE   0x1440

Definition at line 51 of file stv06xx.h.

#define STV_ISO_SIZE_H   0x15c2

Definition at line 62 of file stv06xx.h.

#define STV_ISO_SIZE_L   0x15c1

Definition at line 61 of file stv06xx.h.

#define STV_ISOC_ENDPOINT_ADDR   0x81

Definition at line 38 of file stv06xx.h.

#define STV_LED_CTRL   0x1445

Definition at line 53 of file stv06xx.h.

#define STV_R   0x0509

Definition at line 40 of file stv06xx.h.

#define STV_REG00   0x1500

Definition at line 55 of file stv06xx.h.

#define STV_REG01   0x1501

Definition at line 56 of file stv06xx.h.

#define STV_REG02   0x1502

Definition at line 57 of file stv06xx.h.

#define STV_REG03   0x1503

Definition at line 58 of file stv06xx.h.

#define STV_REG04   0x1504

Definition at line 59 of file stv06xx.h.

#define STV_REG23   0x0423

Definition at line 42 of file stv06xx.h.

#define STV_RESET   0x1620

Definition at line 68 of file stv06xx.h.

#define STV_SCAN_RATE   0x1443

Definition at line 52 of file stv06xx.h.

#define STV_STV0600_EMULATION   0x1446

Definition at line 54 of file stv06xx.h.

#define STV_X_CTRL   0x1680

Definition at line 71 of file stv06xx.h.

#define STV_Y_CTRL   0x15c3

Definition at line 66 of file stv06xx.h.

Function Documentation

int stv06xx_read_bridge ( struct sd sd,
u16  address,
u8 i2c_data 
)

Definition at line 62 of file stv06xx.c.

int stv06xx_read_sensor ( struct sd sd,
const u8  address,
u16 value 
)

Definition at line 170 of file stv06xx.c.

int stv06xx_write_bridge ( struct sd sd,
u16  address,
u16  i2c_data 
)

Definition at line 42 of file stv06xx.c.

int stv06xx_write_sensor ( struct sd sd,
u8  address,
u16  value 
)

Definition at line 82 of file stv06xx.c.

int stv06xx_write_sensor_bytes ( struct sd sd,
const u8 data,
u8  len 
)

Definition at line 110 of file stv06xx.c.

int stv06xx_write_sensor_words ( struct sd sd,
const u16 data,
u8  len 
)

Definition at line 139 of file stv06xx.c.