Sync with trunk r62754.
[reactos.git] / ntoskrnl / inbv / inbvport.c
index 5f58cff..e95e825 100644 (file)
@@ -23,22 +23,41 @@ CPPORT Port[4] =
 
 /* FUNCTIONS *****************************************************************/
 
-VOID
+BOOLEAN
 NTAPI
-InbvPortEnableFifo(IN ULONG   PortId,
-                   IN BOOLEAN Enable)
+InbvPortPollOnly(IN ULONG PortId)
 {
-    /* Set FIFO as requested */
-    CpEnableFifo(Port[PortId].Address, Enable);
+    UCHAR Dummy;
+
+    /* Poll a byte from the port */
+    return CpGetByte(&Port[PortId], &Dummy, FALSE, TRUE) == CP_GET_SUCCESS;
+}
+
+BOOLEAN
+NTAPI
+InbvPortGetByte(IN  ULONG  PortId,
+                OUT PUCHAR Byte)
+{
+    /* Read a byte from the port */
+    return CpGetByte(&Port[PortId], Byte, TRUE, FALSE) == CP_GET_SUCCESS;
 }
 
 VOID
 NTAPI
-InbvPortPutByte(IN ULONG   PortId,
-                IN BOOLEAN Output)
+InbvPortPutByte(IN ULONG PortId,
+                IN UCHAR Byte)
 {
     /* Send the byte */
-    CpPutByte(&Port[PortId], Output);
+    CpPutByte(&Port[PortId], Byte);
+}
+
+VOID
+NTAPI
+InbvPortEnableFifo(IN ULONG   PortId,
+                   IN BOOLEAN Enable)
+{
+    /* Set FIFO as requested */
+    CpEnableFifo(Port[PortId].Address, Enable);
 }
 
 VOID