www.pudn.com > 422.rar > s16c554.h


/* s16c554.h
 * Header file for the Linux serial-bus driver.
 * Written by wang songyue--bupt   email: wsy5228@sina.com
 * This software is released under the GPL-License.
 * Version 0.1  28 oct 2005
 */

int s16c554_enable_configuration(struct chip_t *chip);
int s16c554_disable_configuration(struct chip_t *chip);
int s16c554_chip_config(struct chip_t *chip);
int s16c554_standard_mask(struct chip_t *chip, unsigned short code, unsigned short mask);
int s16c554_baud_rate(struct chip_t *chip, int rate, int clock, int sjw, 
						int sampl_pt, int flags);
int s16c554_pre_read_config(struct chip_t *chip, struct msgobj_t *obj);
int s16c554_pre_write_config(struct chip_t *chip, struct msgobj_t *obj, 
							struct serialmsg_t *msg);
int s16c554_send_msg(struct chip_t *chip, struct msgobj_t *obj, 
							struct serialmsg_t *msg);
int s16c554_check_tx_stat(struct chip_t *chip);
int s16c554_set_btregs(struct chip_t *chip, unsigned short btr0, 
							unsigned short btr1);
int s16c554_start_chip(struct chip_t *chip);
int s16c554_stop_chip(struct chip_t *chip);
void s16c554_irq_handler(int irq, void *dev_id, struct pt_regs *regs);



#define    THR          0x00               //define the 16c554 register
#define    RHR          0x00
#define    IER          0x01
#define    ISR          0x02
#define    FCR          0x02
#define    LCR          0x03
#define    MCR          0x04
#define    LSR          0x05
#define    MSR          0x06
#define    SPR          0x07
#define    LSB          0x00
#define    MSB          0x01
#define   DLAB          1<<7
/* Command register */