BOOLEAN WinLdrPortPollOnly(IN ULONG PortId) { UCHAR Dummy; return CpGetByte(&Port[PortId], &Dummy, FALSE, TRUE) == CP_GET_SUCCESS; }
BOOLEAN NTAPI KdPortGetByteEx( IN PCPPORT PortInformation, OUT PUCHAR ByteReceived) { return (CpGetByte(PortInformation, ByteReceived, FALSE) == CP_GET_SUCCESS); }
KDP_STATUS NTAPI KdpReceiveByte(OUT PUCHAR OutByte) { /* Get the byte */ if (CpGetByte(&KdDebugComPort, OutByte, TRUE) == CP_GET_SUCCESS) { return KDP_PACKET_RECEIVED; } else { return KDP_PACKET_TIMEOUT; } }
KDP_STATUS NTAPI KdpPollByte(OUT PUCHAR OutByte) { /* Poll the byte */ if (CpGetByte(&KdDebugComPort, OutByte, FALSE) == CP_GET_SUCCESS) { return KDP_PACKET_RECEIVED; } else { return KDP_PACKET_TIMEOUT; } }
BOOLEAN WinLdrPortGetByte(IN ULONG PortId, OUT PUCHAR Data) { return CpGetByte(&Port[PortId], Data, TRUE, FALSE) == CP_GET_SUCCESS; }
// // poll byte,without wait // ULONG BlPortPollByte(__in ULONG DeviceId,__out PUCHAR Value) { return CpGetByte(Port + DeviceId,Value,FALSE,FALSE); }
// // poll port // ULONG BlPortPollOnly(__in ULONG DeviceId) { UCHAR Dummy; return CpGetByte(Port + DeviceId,&Dummy,FALSE,TRUE); }