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.

123 lines
5.1 KiB

  1. /***************************************************************************
  2. Name : CLASS1.H
  3. Comment : Main include file for Windows Comm Class-1 Modem driver
  4. Copyright (c) Microsoft Corp. 1991 1992 1993
  5. Revision Log
  6. Date Name Description
  7. -------- ----- ---------------------------------------------------------
  8. ***************************************************************************/
  9. /**---------------------- #define of sizes of things ---------------------
  10. Frames can be at most 2.55 secs (sent) or 3.45 secs (recvd) long, or
  11. 2.55 * 300/8 = 96 bytes and 132 bytes long respectively
  12. Dialstrings are limited to 60 bytes (arbitrarily)
  13. Commands (except dial) are never more than about 10-20 bytes long, so
  14. we use a buffer of 40 bytes. Replies are never big at all, but we
  15. might hold a frame in there, so keep it same size as a Framebuffer
  16. The Dial command is ATDT <string><CR>, so we use 60+10 bytes buffer
  17. ---------------------- #define of sizes of things ---------------------**/
  18. /**---------------------- #define of other things ---------------------
  19. FAX_CLASSn is used in Modem.FaxClass.
  20. CHECK_PATTERN is used in the Guard elements.
  21. ECM_FRAMESIZE in T30.C
  22. ---------------------- #define of other things ---------------------**/
  23. #define CR 0x0d
  24. #define LF 0x0a
  25. #define DLE 0x10 // DLE = ^P = 16d = 10h
  26. #define ETX 0x03
  27. #ifdef MDDI
  28. # define MDDISTMT(x) x
  29. # define HLINE_2 ((HLINE)2)
  30. # define HMODEM_3 ((HMODEM)3)
  31. #else // MDDI
  32. # define MDDISTMT(x)
  33. #endif //MDDI
  34. extern BYTE bDLEETX[];
  35. extern BYTE bDLEETXOK[];
  36. #define EndMode(pTG) { pTG->Class1Modem.DriverMode = IDLE; \
  37. pTG->Class1Modem.ModemMode = COMMAND; \
  38. pTG->Class1Modem.CurMod = 0; }
  39. /****************** begin prototypes from framing.c *****************/
  40. BOOL SWFramingSendSetup(PThrdGlbl pTG, BOOL fOn);
  41. BOOL SWFramingRecvSetup(PThrdGlbl pTG, BOOL fOn);
  42. BOOL SWFramingSendFrame(PThrdGlbl pTG, LPBYTE lpb, USHORT uCount, USHORT uFlags);
  43. BOOL SWFramingSendFlags(PThrdGlbl pTG, USHORT uHowMany);
  44. USHORT SWFramingRecvFrame(PThrdGlbl pTG, LPBYTE lpb, USHORT cbMax, ULONG ulTimeout, USHORT far* lpcbRecv);
  45. BOOL SWFramingSendPreamble(PThrdGlbl pTG, USHORT uCurMod);
  46. BOOL SWFramingSendPostamble(PThrdGlbl pTG, USHORT uCurMod);
  47. /***************** end of prototypes from framing.c *****************/
  48. // from ddi.c
  49. void SendZeros1(PThrdGlbl pTG, USHORT uCount);
  50. BOOL iModemDrain(PThrdGlbl pTG);
  51. #define iModemNoPauseDialog(pTG, s, l, t, w) \
  52. iiModemDialog(pTG, s, l, t, FALSE, 1, FALSE, (CBPSTR)w, (CBPSTR)(NULL))
  53. #define iModemNoPauseDialog2(pTG, s, l, t, w1, w2) \
  54. iiModemDialog(pTG, s, l, t, FALSE, 1, FALSE, (CBPSTR)w1, (CBPSTR)w2, (CBPSTR)(NULL))
  55. #define iModemNoPauseDialog3(pTG, s, l, t, w1, w2, w3) \
  56. iiModemDialog(pTG, s, l, t, FALSE, 1, FALSE, (CBPSTR)w1, (CBPSTR)w2, (CBPSTR)w3, (CBPSTR)(NULL))
  57. #define iModemPauseDialog(pTG, s, l, t, w) \
  58. iiModemDialog(pTG, s, l, t, FALSE, 1, TRUE, (CBPSTR)w, (CBPSTR)(NULL))
  59. #define iModemPauseDialog2(pTG, s, l, t, w1, w2) \
  60. iiModemDialog(pTG, s, l, t, FALSE, 1, TRUE, (CBPSTR)w1, (CBPSTR)w2, (CBPSTR)(NULL))
  61. #define iModemPauseDialog3(pTG, s, l, t, w1, w2, w3) \
  62. iiModemDialog(pTG, s, l, t, FALSE, 1, TRUE, (CBPSTR)w1, (CBPSTR)w2, (CBPSTR)w3, (CBPSTR)(NULL))
  63. #define iModemResp1( pTG, t, w) \
  64. iiModemDialog(pTG, NULL, 0, t, FALSE, 1, FALSE, (CBPSTR)w, (CBPSTR)(NULL))
  65. #define iModemResp2(pTG, t, w1, w2) \
  66. iiModemDialog(pTG, NULL, 0, t, FALSE, 1, FALSE, (CBPSTR)w1, (CBPSTR)w2, (CBPSTR)(NULL))
  67. #define iModemResp3(pTG, t, w1, w2, w3) \
  68. iiModemDialog(pTG, NULL, 0, t, FALSE, 1, FALSE, (CBPSTR)w1, (CBPSTR)w2, (CBPSTR)w3, (CBPSTR)(NULL))
  69. #define iModemResp4( pTG, t, w1, w2, w3, w4) \
  70. iiModemDialog(pTG, NULL, 0, t, FALSE, 1, FALSE, (CBPSTR)w1, (CBPSTR)w2, (CBPSTR)w3, (CBPSTR)w4, (CBPSTR)(NULL))
  71. #ifdef CL0
  72. /****************** begin prototypes from class0.c *****************/
  73. BOOL Class0ModemSendMode(PThrdGlbl pTG, HMODEM hModem, BOOL fHDLC);
  74. BOOL Class0ModemSendMem(PThrdGlbl pTG, HMODEM hModem, LPBYTE lpb, USHORT uCount, USHORT uFlags);
  75. USHORT Class0ModemRecvMode(PThrdGlbl pTG, HMODEM hModem, BOOL fHDLC, ULONG ulTimeout);
  76. USHORT Class0ModemRecvMem(PThrdGlbl pTG, HMODEM hModem, LPBYTE lpb, USHORT cbMax, ULONG ulTimeout, USHORT far* lpcbRecv);
  77. BOOL Class0SendData(PThrdGlbl pTG, LPB lpb, USHORT uCount, USHORT uFlags);
  78. USHORT Class0RecvData(PThrdGlbl pTG, LPB lpb, USHORT cbMax, ULONG ulTimeout, USHORT far* lpcbRecv);
  79. void Class0ModemEndRecv(PThrdGlbl pTG, HMODEM hModem);
  80. /***************** end of prototypes from class0.c *****************/
  81. #endif //CL0