⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 data.h

📁 完整的RTX串口驱动程序 供大家分享 谢谢
💻 H
字号:
//-----------------------------------------------------------------
// Initialized data
//-----------------------------------------------------------------

UCB   ucbList[COM_MAX_PORTS] =                
{
   {                             //COM1 UCB
      COM1,                      //COM port
      (PUCHAR)0X3F8,             //base address
      0,                         //isr Handle
      0x0c,                      //interrupt vector address
      0x04,                      //IRQ level
      NULL,                      //pointer to input ring buff
      NULL,                      //pointer to output ring buff
      DEFAULT_FIFO_MASK,         //default FIFO mask
      DEFAULT_FIFO_SIZE,         //default FIFO size in bytes
      DEFAULT_PARITY,            //default - no parity
      DEFAULT_STOP_BITS,         //default stop bits
      0,                         //receiver ISR inactive
      0,                         //transmitter ISR inactive
      0,                         //time-delimited receive
      0,                         //stats flag
      0,                         //spare bits
      COM_STATE_IDLE,            //UART is not yet initialized
      DEFAULT_WORDSIZE,          //default xmit wordsize in bits
      DEFAULT_BAUD_RATE,         //Default baud rate
      0,
      0,                         //receiver timer
      0,                         //last error         
      0                          //error count
   },
   {                             //COM2 UCB
      COM2,                      //COM port
      (PUCHAR)0X2F8,             //base address
      0,                         // isr handle
      0x0b,                      //interrupt vector address
      0x03,                      //IRQ level
      NULL,                      //pointer to input ring buff
      NULL,                      //pointer to output ring buff
      DEFAULT_FIFO_MASK,         //default FIFO mask
      DEFAULT_FIFO_SIZE,         //default FIFO size in bytes
      DEFAULT_PARITY,            //default - no parity
      DEFAULT_STOP_BITS,         //default stop bits
      0,                         //receiver ISR inactive
      0,                         //transmitter ISR inactive
      0,                         //time-delimited receive
      0,                         //stats flag
      0,                         //spare bits
      COM_STATE_IDLE,            //UART is not yet initialized
      DEFAULT_WORDSIZE,          //default xmit wordsize in bits
      DEFAULT_BAUD_RATE,         //Default baud rate
      0,
      0,                         //receiver timer
      0,                         //last error         
      0                          //error count
   }
};

//------------------------------------------------
//Table of baud rate values. The divorlatch high
//byte is always zero for the baud rate currently
//supported, but we define it anyway, just in case.
//Also, the "#define" values for the baud rates in
//serialAPI.h are used as an index into this table
//-------------------------------------------------

BAUDRATE baudRateTable[7] =
{
   {2400,0x00,0x30},
   {4800,0x00,0x18},
   {9600,0x00,0x0c},
   {19200,0x00,0x06},
   {38400,0x00,0x03},
   {57600,0x00,0x02},
   {115200,0x00,0x01}
};     
        
//-------------------------------
// table for Fifo size masks
//-------------------------------

FIFO  fifoTable[5] =
{
   {0,FCR_FIFO_DISABLED}, 
   {1,FCR_TRIGGER_1},             
   {4,FCR_TRIGGER_4},          
   {8,FCR_TRIGGER_8},     
   {14,FCR_TRIGGER_14}
};    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -