?? i82550sio.h
字號:
/* i82550Sio.h - header file for i82550 serial driver *//* Copyright 1984-2002 Wind River Systems, Inc. *//*modification history--------------------01f,26apr02,dat Adding cplusplus protection, SPR 7501701e,29sep01,dat Rework for adaptor type struct, new API is just create and destroy.01d,01jul97,db added registers and defines for modem control. 01c,24feb97,dat used SIO_CHAN as first structure element, instead of SIO_DRV_FUNCS *.01b,17dec96,dat added 'options' to chan structure.01a,02aug95,ms written.*/#ifndef __INCi82550Sioh#define __INCi82550Sioh#include "sioLib.h"#ifdef __cplusplusextern "C" {#endif/* * This driver for a generic SIO device only uses 8 bit reads/writes. * These are the register offsets for our fictitious device. * * Control Register 0x0 (write) * Status Register 0x0 (read) * Data register 0x1 (read/write) * Modem Status Register 0x2 (read) * Modem Control Register 0x2 (write) * Baud Rate Control Reg. 0x3 (read/write) * * The i82550 driver uses 3 interrupt vectors. * Receive Interrupt 0x0 * Transmit Interrupt 0x1 * Error/Modem Interrupt 0x2 * * Other adaptor functions used include: * intConnect, intDisconnect. */#define I82550_CSR_ID 0x0 /* register offsets */#define I82550_DATA_ID 0x1#define I82550_MSR_ID 0x2#define I82550_BAUD_ID 0x3#define I82550_RXINT_ID 0x0 /* vector offsets */#define I82550_TXINT_ID 0x1#define I82550_ERRINT_ID 0x2/* * Here is the real API for creating and destroying an instance of a i82550 * SIO device. Use the standard sioLib functions * for manipulating the device. The only really device specific * functions are for creation and destruction. */IMPORT SIO_CHAN * i82550SioCreate /* create an instance */ ( UINT32 ioBase, /* device adaptor specific data */ UINT32 vecBase, /* vector base number */ UINT32 intLevel, /* interrupt level for vectors */ UINT32 clkFreq /* device clock frequency */ );IMPORT STATUS i82550SioDestroy /* destroy an instance */ (SIO_CHAN *); /* must be a i82550 SIO type object */#ifdef __cplusplus}#endif#endif /* __INCi82550Sioh */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -