Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
stk-webcam.h File Reference
#include <linux/usb.h>
#include <media/v4l2-common.h>

Go to the source code of this file.

Data Structures

struct  stk_iso_buf
 
struct  stk_sio_buffer
 
struct  stk_video
 
struct  regval
 
struct  stk_camera
 

Macros

#define DRIVER_VERSION   "v0.0.1"
 
#define DRIVER_VERSION_NUM   0x000001
 
#define MAX_ISO_BUFS   3
 
#define ISO_FRAMES_PER_DESC   16
 
#define ISO_MAX_FRAME_SIZE   3 * 1024
 
#define ISO_BUFFER_SIZE   (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE)
 
#define PREFIX   "stkwebcam: "
 
#define STK_INFO(str, args...)   printk(KERN_INFO PREFIX str, ##args)
 
#define STK_ERROR(str, args...)   printk(KERN_ERR PREFIX str, ##args)
 
#define STK_WARNING(str, args...)   printk(KERN_WARNING PREFIX str, ##args)
 
#define is_present(dev)   ((dev)->status & S_PRESENT)
 
#define is_initialised(dev)   ((dev)->status & S_INITIALISED)
 
#define is_streaming(dev)   ((dev)->status & S_STREAMING)
 
#define is_memallocd(dev)   ((dev)->status & S_MEMALLOCD)
 
#define set_present(dev)   ((dev)->status = S_PRESENT)
 
#define unset_present(dev)
 
#define set_initialised(dev)   ((dev)->status |= S_INITIALISED)
 
#define unset_initialised(dev)   ((dev)->status &= ~S_INITIALISED)
 
#define set_memallocd(dev)   ((dev)->status |= S_MEMALLOCD)
 
#define unset_memallocd(dev)   ((dev)->status &= ~S_MEMALLOCD)
 
#define set_streaming(dev)   ((dev)->status |= S_STREAMING)
 
#define unset_streaming(dev)   ((dev)->status &= ~S_STREAMING)
 
#define vdev_to_camera(d)   container_of(d, struct stk_camera, vdev)
 

Enumerations

enum  stk_mode {
  MODE_VGA, MODE_SXGA, MODE_CIF, MODE_QVGA,
  MODE_QCIF
}
 
enum  stk_status { S_PRESENT = 1, S_INITIALISED = 2, S_MEMALLOCD = 4, S_STREAMING = 8 }
 

Functions

int stk_camera_write_reg (struct stk_camera *, u16, u8)
 
int stk_camera_read_reg (struct stk_camera *, u16, int *)
 
int stk_sensor_init (struct stk_camera *)
 
int stk_sensor_configure (struct stk_camera *)
 
int stk_sensor_sleep (struct stk_camera *dev)
 
int stk_sensor_wakeup (struct stk_camera *dev)
 
int stk_sensor_set_brightness (struct stk_camera *dev, int br)
 

Macro Definition Documentation

#define DRIVER_VERSION   "v0.0.1"

Definition at line 28 of file stk-webcam.h.

#define DRIVER_VERSION_NUM   0x000001

Definition at line 29 of file stk-webcam.h.

#define is_initialised (   dev)    ((dev)->status & S_INITIALISED)

Definition at line 75 of file stk-webcam.h.

#define is_memallocd (   dev)    ((dev)->status & S_MEMALLOCD)

Definition at line 77 of file stk-webcam.h.

#define is_present (   dev)    ((dev)->status & S_PRESENT)

Definition at line 74 of file stk-webcam.h.

#define is_streaming (   dev)    ((dev)->status & S_STREAMING)

Definition at line 76 of file stk-webcam.h.

#define ISO_BUFFER_SIZE   (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE)

Definition at line 34 of file stk-webcam.h.

#define ISO_FRAMES_PER_DESC   16

Definition at line 32 of file stk-webcam.h.

#define ISO_MAX_FRAME_SIZE   3 * 1024

Definition at line 33 of file stk-webcam.h.

#define MAX_ISO_BUFS   3

Definition at line 31 of file stk-webcam.h.

#define PREFIX   "stkwebcam: "

Definition at line 37 of file stk-webcam.h.

#define set_initialised (   dev)    ((dev)->status |= S_INITIALISED)

Definition at line 81 of file stk-webcam.h.

#define set_memallocd (   dev)    ((dev)->status |= S_MEMALLOCD)

Definition at line 83 of file stk-webcam.h.

#define set_present (   dev)    ((dev)->status = S_PRESENT)

Definition at line 78 of file stk-webcam.h.

#define set_streaming (   dev)    ((dev)->status |= S_STREAMING)

Definition at line 85 of file stk-webcam.h.

#define STK_ERROR (   str,
  args... 
)    printk(KERN_ERR PREFIX str, ##args)

Definition at line 39 of file stk-webcam.h.

#define STK_INFO (   str,
  args... 
)    printk(KERN_INFO PREFIX str, ##args)

Definition at line 38 of file stk-webcam.h.

#define STK_WARNING (   str,
  args... 
)    printk(KERN_WARNING PREFIX str, ##args)

Definition at line 40 of file stk-webcam.h.

#define unset_initialised (   dev)    ((dev)->status &= ~S_INITIALISED)

Definition at line 82 of file stk-webcam.h.

#define unset_memallocd (   dev)    ((dev)->status &= ~S_MEMALLOCD)

Definition at line 84 of file stk-webcam.h.

#define unset_present (   dev)
Value:

Definition at line 79 of file stk-webcam.h.

#define unset_streaming (   dev)    ((dev)->status &= ~S_STREAMING)

Definition at line 86 of file stk-webcam.h.

#define vdev_to_camera (   d)    container_of(d, struct stk_camera, vdev)

Definition at line 123 of file stk-webcam.h.

Enumeration Type Documentation

enum stk_mode
Enumerator:
MODE_VGA 
MODE_SXGA 
MODE_CIF 
MODE_QVGA 
MODE_QCIF 

Definition at line 58 of file stk-webcam.h.

enum stk_status
Enumerator:
S_PRESENT 
S_INITIALISED 
S_MEMALLOCD 
S_STREAMING 

Definition at line 68 of file stk-webcam.h.

Function Documentation

int stk_camera_read_reg ( struct stk_camera ,
u16  ,
int  
)

Definition at line 91 of file stk-webcam.c.

int stk_camera_write_reg ( struct stk_camera ,
u16  ,
u8   
)

Definition at line 72 of file stk-webcam.c.

int stk_sensor_configure ( struct stk_camera )

Definition at line 500 of file stk-sensor.c.

int stk_sensor_init ( struct stk_camera )

Definition at line 365 of file stk-sensor.c.

int stk_sensor_set_brightness ( struct stk_camera dev,
int  br 
)

Definition at line 587 of file stk-sensor.c.

int stk_sensor_sleep ( struct stk_camera dev)

Definition at line 296 of file stk-sensor.c.

int stk_sensor_wakeup ( struct stk_camera dev)

Definition at line 303 of file stk-sensor.c.