📄 w977uar1.asl
字号:
Device(UAR1) { //Communication Device (Modem Port)
Name(_HID, EISAID("PNP0501")) //PnP Device ID 16550 Type
Name(_UID,0x1)
Method(_STA,0){ //Status of the COM device
ENFG()
Store(0x02,LDN_)
If(ACTR) {
EXFG()
Return(0x0F)
} //Return Device Present and device Active
Else {
If (LOr(IOAH,IOAL)) {
EXFG()
Return(0x0D)
} //If device address is non zero
Else {
EXFG()
Return(0)
}
} //If device address is 0 return device not present
EXFG() //??????
} //end _STA method
Method(_DIS,0) { //Disable
ENFG()
Store(0x02, LDN_) //set logical device number for Serial Port 1
Store(Zero, ACTR) //Set Activate Register to zero
EXFG()
} //end _DIS method
Method(_CRS,0) { // Current Resource
Name(BUF1,Buffer()
{
0x47, //IO Port Descriptor
0x01, //16 bit decode
0x00, //IO Port Range Minimum Base Low
0x00, //IO Port Range Minimum Base High
0x00, //IO Port Range Maximum Base LOW
0x00, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x08, //Length of contiguous IO Ports
0x22, //IRQ Descriptor
0x00, //IRQ Mask Lo=bit 4
0x00,
0x79, //end tag
0x00, // Checksum = 0 Treat as if the
} // end of Buffer
)
CreateByteField (BUF1, 0x02, IOLO) //IO Port Low
CreateByteField (BUF1, 0x03, IOHI) //IO Port High
CreateByteField (BUF1, 0x04, IORL) //IO Port Low
CreateByteField (BUF1, 0x05, IORH) //IO Port High
CreateByteField (BUF1, 0x09, IRQL) //IRQ Mask
ENFG()
Store(0x02,LDN_) //Logical device number for serial port 1
Store(IOAL,IOLO)
Store(IOAL,IORL)
Store(IOAH,IOHI)
Store(IOAH,IORH)
Store(One,Local0)
ShiftLeft(Local0,INTR,IRQL)
EXFG()
Return(BUF1) //Return Buf1
} //end _CRS method
Name(_PRS,Buffer()
{
0x30, // Start Dependent Function
0x47, //IO Port Descriptor
0x01, //16 bit decode
0xF8, //IO Port Range Minimum Base Low
0x03, //IO Port Range Minimum Base High
0xF8, //IO Port Range Maximum Base LOW
0x03, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x08, //Length of contiguous IO Ports
0x22, //IRQ Descriptor
0x10, //IRQ Mask Lo=bits 3 and 4
0x00,
0x30, // Start Dependent Function
0x47, //IO Port Descriptor
0x01, //16 bit decode
0xF8, //IO Port Range Minimum Base Low
0x02, //IO Port Range Minimum Base High
0xF8, //IO Port Range Maximum Base LOW
0x02, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x08, //Length of contiguous IO Ports
0x22, //IRQ Descriptor
0x08, //IRQ Mask Lo=bits 3 and 4
0x00,
0x30, // Start Dependent Function
0x47, //IO Port Descriptor
0x01, //16 bit decode
0xE8, //IO Port Range Minimum Base Low
0x03, //IO Port Range Minimum Base High
0xE8, //IO Port Range Maximum Base LOW
0x03, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x08, //Length of contiguous IO Ports
0x22, //IRQ Descriptor
0x10, //IRQ Mask Lo=bits 3 and 4
0x00,
0x30, // Start Dependent Function
0x47, //IO Port Descriptor
0x01, //16 bit decode
0xE8, //IO Port Range Minimum Base Low
0x02, //IO Port Range Minimum Base High
0xE8, //IO Port Range Maximum Base LOW
0x02, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x08, //Length of contiguous IO Ports
0x22, //IRQ Descriptor
0x08, //IRQ Mask Lo=bits 3 and 4
0x00,
0x38, // End Dependent Function
0x79, //end tag
0x00, // Checksum = 0 Treat as if the
} // end of Buffer
)
Method(_SRS,1) { //Set Resource
CreateByteField (Arg0, 0x02, IOLO) //IO Port Low
CreateByteField (Arg0, 0x03, IOHI) //IO Port High
CreateByteField (Arg0, 0x09, IRQL) //IRQ
ENFG()
Store(0x02, LDN_)
Store(One, ACTR) //R01Set activate configuration register
Store(IOLO, IOAL)
Store(IOHI, IOAH)
FindSetRightBit(IRQL,Local0)
Subtract(Local0, 0x01, INTR)
EXFG()
} //End of _SRS Method
} // end of UART1 device
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -