Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ch341.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/serial.h>
#include <asm/unaligned.h>

Go to the source code of this file.

Data Structures

struct  ch341_private
 

Macros

#define DEFAULT_BAUD_RATE   9600
 
#define DEFAULT_TIMEOUT   1000
 
#define CH341_BIT_RTS   (1 << 6)
 
#define CH341_BIT_DTR   (1 << 5)
 
#define CH341_MULT_STAT   0x04 /* multiple status since last interrupt event */
 
#define CH341_BIT_CTS   0x01
 
#define CH341_BIT_DSR   0x02
 
#define CH341_BIT_RI   0x04
 
#define CH341_BIT_DCD   0x08
 
#define CH341_BITS_MODEM_STAT   0x0f /* all bits */
 
#define CH341_BAUDBASE_FACTOR   1532620800
 
#define CH341_BAUDBASE_DIVMAX   3
 
#define CH341_REQ_WRITE_REG   0x9A
 
#define CH341_REQ_READ_REG   0x95
 
#define CH341_REG_BREAK1   0x05
 
#define CH341_REG_BREAK2   0x18
 
#define CH341_NBREAK_BITS_REG1   0x01
 
#define CH341_NBREAK_BITS_REG2   0x40
 

Functions

 MODULE_DEVICE_TABLE (usb, id_table)
 
 module_usb_serial_driver (serial_drivers, id_table)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CH341_BAUDBASE_DIVMAX   3

Definition at line 59 of file ch341.c.

#define CH341_BAUDBASE_FACTOR   1532620800

Definition at line 58 of file ch341.c.

#define CH341_BIT_CTS   0x01

Definition at line 49 of file ch341.c.

#define CH341_BIT_DCD   0x08

Definition at line 52 of file ch341.c.

#define CH341_BIT_DSR   0x02

Definition at line 50 of file ch341.c.

#define CH341_BIT_DTR   (1 << 5)

Definition at line 33 of file ch341.c.

#define CH341_BIT_RI   0x04

Definition at line 51 of file ch341.c.

#define CH341_BIT_RTS   (1 << 6)

Definition at line 32 of file ch341.c.

#define CH341_BITS_MODEM_STAT   0x0f /* all bits */

Definition at line 53 of file ch341.c.

#define CH341_MULT_STAT   0x04 /* multiple status since last interrupt event */

Definition at line 45 of file ch341.c.

#define CH341_NBREAK_BITS_REG1   0x01

Definition at line 69 of file ch341.c.

#define CH341_NBREAK_BITS_REG2   0x40

Definition at line 70 of file ch341.c.

#define CH341_REG_BREAK1   0x05

Definition at line 67 of file ch341.c.

#define CH341_REG_BREAK2   0x18

Definition at line 68 of file ch341.c.

#define CH341_REQ_READ_REG   0x95

Definition at line 66 of file ch341.c.

#define CH341_REQ_WRITE_REG   0x9A

Definition at line 65 of file ch341.c.

#define DEFAULT_BAUD_RATE   9600

Definition at line 28 of file ch341.c.

#define DEFAULT_TIMEOUT   1000

Definition at line 29 of file ch341.c.

Function Documentation

MODULE_DEVICE_TABLE ( usb  ,
id_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_serial_driver ( serial_drivers  ,
id_table   
)