Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.0 KiB

  1. /******************************************************************************
  2. *
  3. * $Workfile: uartprvt.h $
  4. *
  5. * $Author: Psmith $
  6. *
  7. * $Revision: 8 $
  8. *
  9. * $Modtime: 22/09/99 10:22 $
  10. *
  11. * Description: Contains private UART Library definitions and prototypes.
  12. *
  13. ******************************************************************************/
  14. #if !defined(UARTPRVT_H) /* UARTPRVT.H */
  15. #define UARTPRVT_H
  16. #include "os.h"
  17. #define UL_IM_SIZE_OF_BUFFER 10
  18. #define UL_IM_SLOT_DATA 0x0
  19. #define UL_IM_SLOT_STATUS 0x1
  20. /* UART Object Structure */
  21. typedef struct _UART_OBJECT
  22. {
  23. PVOID pUartData; /* Pointer to UART Data */
  24. PUART_OBJECT pNextUart; /* Pointer to Next UART Object */
  25. PUART_OBJECT pPreviousUart; /* Pointer to Previous UART Object */
  26. DWORD UartNumber; /* UART Number. */
  27. PVOID BaseAddress; /* UART Base Address. */
  28. DWORD RegisterStride; /* UART Register Stride */
  29. DWORD ClockFreq; /* UART Clock Frequency in Hz */
  30. PBYTE pInBuf; /* Pointer to IN Buffer */
  31. DWORD InBufSize; /* Size of IN Buffer. */
  32. DWORD InBufBytes; /* Number of bytes in buffer */
  33. DWORD InBuf_ipos; /* Offset into buffer to place new data into buffer. */
  34. DWORD InBuf_opos; /* Offset into buffer take data out of buffer. */
  35. PBYTE pOutBuf; /* Pointer to OUT Buffer */
  36. DWORD OutBufSize; /* Size of OUT Buffer. */
  37. DWORD OutBuf_pos; /* Offset into buffer take data out of buffer to transmit. */
  38. BYTE ImmediateBuf[UL_IM_SIZE_OF_BUFFER][2];
  39. DWORD ImmediateBytes; /* Number of bytes to send */
  40. PUART_CONFIG pUartConfig; /* UART Configuration Structure. */
  41. PVOID pAppBackPtr; /* Back pointer to an application specific info. */
  42. } UART_OBJECT;
  43. /* Prototypes. */
  44. PUART_OBJECT UL_CommonInitUart(PUART_OBJECT pPreviousUart);
  45. void UL_CommonDeInitUart(PUART_OBJECT pUart);
  46. int UL_CalcBufferAmount(int Buf_ipos, int Buf_opos, int BufSize);
  47. int UL_CalcBufferSpace(int Buf_ipos, int Buf_opos, int BufSize);
  48. /* End of Prototypes. */
  49. #endif /* End of UARTPRVT.H */