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.

234 lines
5.2 KiB

  1. /*****************************************************************************
  2. *
  3. * Copyright (c) 1996-1999 Microsoft Corporation
  4. *
  5. * @doc
  6. * @module externs.h | IrSIR NDIS Miniport Driver
  7. * @comm
  8. *
  9. *-----------------------------------------------------------------------------
  10. *
  11. * Author: Scott Holden (sholden)
  12. *
  13. * Date: 10/9/1996 (created)
  14. *
  15. * Contents:
  16. *
  17. *****************************************************************************/
  18. #ifndef EXTERNS_H
  19. #define EXTERNS_H
  20. //
  21. // Include externs for dongle modules
  22. //
  23. #include "esi.h"
  24. #include "parallax.h"
  25. #include "actisys.h"
  26. #include "tekram.h"
  27. #include "crystal.h"
  28. #include "temic.h"
  29. #include "girbil.h"
  30. // #include "adaptec.h"
  31. // #include "nscdemo.h"
  32. //
  33. // Externs for required miniport export functions
  34. //
  35. VOID IrsirHalt(
  36. IN NDIS_HANDLE MiniportAdapterContext
  37. );
  38. NDIS_STATUS IrsirInitialize(
  39. OUT PNDIS_STATUS OpenErrorStatus,
  40. OUT PUINT SelectedMediumIndex,
  41. IN PNDIS_MEDIUM MediumArray,
  42. IN UINT MediumArraySize,
  43. IN NDIS_HANDLE MiniportAdapterHandle,
  44. IN NDIS_HANDLE WrapperConfigurationContext
  45. );
  46. NDIS_STATUS IrsirQueryInformation(
  47. IN NDIS_HANDLE MiniportAdapterContext,
  48. IN NDIS_OID Oid,
  49. IN PVOID InformationBuffer,
  50. IN ULONG InformationBufferLength,
  51. OUT PULONG BytesWritten,
  52. OUT PULONG BytesNeeded
  53. );
  54. NDIS_STATUS IrsirSend(
  55. IN NDIS_HANDLE MiniportAdapterContext,
  56. IN PNDIS_PACKET Packet,
  57. IN UINT Flags
  58. );
  59. NDIS_STATUS IrsirReset(
  60. OUT PBOOLEAN AddressingReset,
  61. IN NDIS_HANDLE MiniportAdapterContext
  62. );
  63. NDIS_STATUS ResetIrDevice(
  64. IN OUT PIR_DEVICE pThisDev
  65. );
  66. NDIS_STATUS IrsirSetInformation(
  67. IN NDIS_HANDLE MiniportAdapterContext,
  68. IN NDIS_OID Oid,
  69. IN PVOID InformationBuffer,
  70. IN ULONG InformationBufferLength,
  71. OUT PULONG BytesRead,
  72. OUT PULONG BytesNeeded
  73. );
  74. VOID IrsirReturnPacket(
  75. IN NDIS_HANDLE MiniportAdapterContext,
  76. IN PNDIS_PACKET Packet
  77. );
  78. VOID PassiveLevelThread(
  79. IN PVOID Context
  80. );
  81. NTSTATUS SetIrFunctions(PIR_DEVICE pThisDev);
  82. extern PDRIVER_OBJECT DriverObject;
  83. //
  84. // exported from openclos.c
  85. //
  86. NDIS_STATUS InitializeDevice(
  87. IN OUT PIR_DEVICE dev
  88. );
  89. NDIS_STATUS DeinitializeDevice(
  90. IN OUT PIR_DEVICE dev
  91. );
  92. NDIS_STATUS GetDeviceConfiguration(
  93. IN OUT PIR_DEVICE dev,
  94. IN NDIS_HANDLE WrapperConfigurationContext
  95. );
  96. NDIS_STATUS SerialOpen(
  97. IN PIR_DEVICE pThisDev
  98. );
  99. NDIS_STATUS SerialClose(
  100. IN PIR_DEVICE pThisDev
  101. );
  102. NTSTATUS GetComPortNtDeviceName(IN PUNICODE_STRING SerialDosName,
  103. IN OUT PUNICODE_STRING NtDevName);
  104. //
  105. // exported from receive.c
  106. //
  107. NDIS_STATUS InitializeReceive(
  108. IN OUT PIR_DEVICE pThisDev
  109. );
  110. //
  111. // exported from resources.c
  112. //
  113. #if 0 // Defined in debug.h
  114. PVOID MyMemAlloc(
  115. IN UINT size
  116. );
  117. #endif
  118. VOID MyMemFree(
  119. IN PVOID memptr,
  120. IN UINT size
  121. );
  122. PIR_DEVICE NewDevice();
  123. VOID FreeDevice(
  124. IN PIR_DEVICE dev
  125. );
  126. PIRP SerialBuildReadWriteIrp(
  127. IN PDEVICE_OBJECT pSerialDevObj,
  128. IN ULONG MajorFunction,
  129. IN OUT PVOID pBuffer,
  130. IN ULONG BufferLength,
  131. IN PIO_STATUS_BLOCK pIosb
  132. );
  133. NTSTATUS
  134. SerialSynchronousWrite(
  135. IN PDEVICE_OBJECT pSerialDevObj,
  136. IN PVOID pBuffer,
  137. IN ULONG dwLength,
  138. OUT PULONG pdwBytesWritten);
  139. NTSTATUS
  140. SerialSynchronousRead(
  141. IN PDEVICE_OBJECT pSerialDevObj,
  142. OUT PVOID pBuffer,
  143. IN ULONG dwLength,
  144. OUT PULONG pdwBytesRead);
  145. NDIS_STATUS
  146. ScheduleWorkItem(PASSIVE_PRIMITIVE Prim,
  147. PIR_DEVICE pDevice,
  148. WORK_PROC Callback,
  149. PVOID InfoBuf,
  150. ULONG InfoBufLen);
  151. VOID FreeWorkItem(
  152. IN PIR_WORK_ITEM pItem
  153. );
  154. //
  155. // exported from fcs.c
  156. //
  157. USHORT ComputeFCS(
  158. IN UCHAR *data,
  159. IN UINT dataLen
  160. );
  161. //
  162. // exported from convert.c
  163. //
  164. BOOLEAN NdisToIrPacket(
  165. IN PIR_DEVICE thisDev,
  166. IN PNDIS_PACKET Packet,
  167. OUT UCHAR *irPacketBuf,
  168. IN UINT irPacketBufLen,
  169. OUT UINT *irPacketLen
  170. );
  171. //
  172. // Externs for global data objects
  173. //
  174. extern PIR_DEVICE firstIrDevice;
  175. //
  176. // exported from comm.c
  177. //
  178. NTSTATUS SetSpeed(
  179. IN OUT PIR_DEVICE thisDev
  180. );
  181. VOID
  182. SetSpeedCallback(PIR_WORK_ITEM pWorkItem);
  183. //
  184. // exported from settings.c
  185. //
  186. extern baudRateInfo supportedBaudRateTable[NUM_BAUDRATES];
  187. #endif EXTERNS_H