📄 p364midi.asl
字号:
Device(MIDI)
{
Name(_HID, EISAID("PNPB006")) // PnP Device ID Midi Type
Method(_STA,0)
{
Store(0x0C,LDN_)
If(ACTR)
{
Return(0x0F)
} // If device address is non zero
Else
{
If(LOr(IOAH,IOAL)) //R02
{
Return(0x0D)
}
else
{
Return(0)
}
} // If device address is 0 return device not present
} // end _STA method
Method(_DIS,0) // Disable
{
Store(0x0C, LDN_)
Store(Zero, ACTR)
DISD(0x05) //R01
} // 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, //R02 Base Alignment
0x04, //R02 Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x00, // IRQ7 (Bit15=IRQ15....Bit0=IRQ0)
0x00,
0x79, // end tag
0x00, // Checksum = 0 Treat as if the
})
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
CreateWordField (BUF1, 0x09, IRQW) // IRQ Mask
Store(0x0C,LDN_)
Store(IOAL,IOLO)
Store(IOAL,IORL)
Store(IOAH,IOHI)
Store(IOAH,IORH)
Store(Zero,IRQW)
If(LNotEqual(INTR, Zero))
{
ShiftLeft(One,INTR,IRQW)
}
Return(BUF1) // Return Buf1
} // end _CRS method
Name(_PRS,Buffer()
{
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0x30, // IO Port Range Minimum Base Low
0x03, // IO Port Range Minimum Base High
0x30, // IO Port Range Maximum Base LOW
0x03, // IO Port Range Maximum Base High
0x00, //R02 Base Alignment
0x04, //R02 Length of contiguous IO Ports
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0x00, // IO Port Range Minimum Base Low
0x03, // IO Port Range Minimum Base High
0x00, // IO Port Range Maximum Base LOW
0x03, // IO Port Range Maximum Base High
0x00, //R02 Base Alignment
0x04, //R02 Length of contiguous IO Ports
0x38, // End Dependent Function
0x22, // IRQ Descriptor
0xB8, // IRQ7 (Bit15=IRQ15....Bit0=IRQ0)
0x1E, // IRQ5, IRQ7(Bit15=IRQ15....Bit0=IRQ0)
0x79, // end tag
0x00, // Checksum = 0 Treat as if the
})
Method(_SRS,1)
{
CreateByteField (Arg0, 0x02, IOLO) // IO Port Low
CreateByteField (Arg0, 0x03, IOHI) // IO Port High
CreateWordField (Arg0, 0x02, IOAD) //R01
CreateWordField (Arg0, 0x09, IRQW) // IRQ MASK
Store(0x0C, LDN_)
Store(One, ACTR) //R02
Store(IOLO, IOAL)
Store(IOHI, IOAH)
FindSetLeftBit(IRQW, Local0)
If(LNotEqual(Local0, Zero))
{
Subtract(Local0, 0x01, Local0)
}
Store (Local0, INTR)
CKIO(IOAD,0x05) //R01
} // End of _SRS Method
} // end of UART1 device
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -