Source code of Windows XP (NT5)
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.

69 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. port.c
  5. Abstract:
  6. This modules implements com port code to support the boot debugger.
  7. Author:
  8. Bryan M. Willman (bryanwi) 24-Sep-90
  9. Revision History:
  10. --*/
  11. #include "bd.h"
  12. _TUCHAR DebugMessage[80];
  13. LOGICAL
  14. BdPortInitialize(
  15. IN ULONG BaudRate,
  16. IN ULONG PortNumber,
  17. OUT PULONG BdFileId
  18. )
  19. /*++
  20. Routine Description:
  21. This functions initializes the boot debugger com port.
  22. Arguments:
  23. BaudRate - Supplies an optional baud rate.
  24. PortNumber - supplies an optinal port number.
  25. Returned Value:
  26. TRUE - If a debug port is found.
  27. --*/
  28. {
  29. //
  30. // Initialize the specified port.
  31. //
  32. if (!BlPortInitialize(BaudRate, PortNumber, NULL, FALSE, BdFileId)) {
  33. return FALSE;
  34. }
  35. _stprintf(DebugMessage,
  36. TEXT("\nBoot Debugger Using: COM%d (Baud Rate %d)\n"),
  37. PortNumber,
  38. BaudRate);
  39. //
  40. // We cannot use BlPrint() at this time because BlInitStdIo() has not been called, which is
  41. // required to use the Arc emulator code.
  42. //
  43. TextStringOut(DebugMessage);
  44. return TRUE;
  45. }