libant.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. This software is subject to the license described in the License.txt file
  3. included with this software distribution. You may not use this file except
  4. in compliance with this license.
  5. Copyright (c) Dynastream Innovations Inc. 2016
  6. All rights reserved.
  7. */
  8. #if !defined(ANT_DLL_H)
  9. #define ANT_DLL_H
  10. #include "types.h"
  11. #if defined(__cplusplus)
  12. extern "C" {
  13. #endif
  14. //////////////////////////////////////////////////////////////////////////////////
  15. // Public Definitions
  16. //////////////////////////////////////////////////////////////////////////////////
  17. // Application callback function pointers
  18. typedef BOOL (*RESPONSE_FUNC)(UCHAR ucChannel, UCHAR ucResponseMsgID);
  19. typedef BOOL (*CHANNEL_EVENT_FUNC)(UCHAR ucChannel, UCHAR ucEvent);
  20. typedef BOOL (*P_ANT_INIT)(UCHAR, USHORT);
  21. typedef BOOL (*P_ANT_INIT_EXT)(UCHAR, USHORT, UCHAR, UCHAR);
  22. typedef BOOL (*P_ANT_GETDEVICEUSBINFO)(UCHAR ,UCHAR*, UCHAR*);
  23. typedef BOOL (*P_ANT_GETDEVICEUSBPID)(USHORT* pusPID_);
  24. typedef BOOL (*P_ANT_GETDEVICEUSBVID)(USHORT* pusVID_);
  25. typedef BOOL (*P_ANT_CLOSE)();
  26. typedef void (*P_ANT_ARF)(RESPONSE_FUNC, UCHAR*);
  27. typedef void (*P_ANT_AEF)(UCHAR, CHANNEL_EVENT_FUNC, UCHAR*);
  28. typedef BOOL (*P_ANT_UNASSIGN)(UCHAR);
  29. typedef BOOL (*P_ANT_ASSIGN)(UCHAR, UCHAR, UCHAR);
  30. typedef BOOL (*P_ANT_ASSIGN_EXT)(UCHAR, UCHAR, UCHAR, UCHAR);
  31. typedef BOOL (*P_ANT_SETID)(UCHAR, USHORT, UCHAR, UCHAR);
  32. typedef BOOL (*P_ANT_SETPER)(UCHAR, USHORT);
  33. typedef BOOL (*P_ANT_SETTIME)(UCHAR, UCHAR);
  34. typedef BOOL (*P_ANT_SETFREQ)(UCHAR, UCHAR);
  35. typedef BOOL (*P_ANT_SETKEY)(UCHAR, UCHAR*);
  36. typedef BOOL (*P_ANT_SETPWR)(UCHAR);
  37. typedef BOOL (*P_ANT_RST)(void);
  38. typedef BOOL (*P_ANT_OPENCHNL)(UCHAR);
  39. typedef BOOL (*P_ANT_CLOSECHNL)(UCHAR);
  40. typedef BOOL (*P_ANT_REQMSG)(UCHAR, UCHAR);
  41. typedef BOOL (*P_ANT_ENABLEEXT)(UCHAR);
  42. typedef BOOL (*P_ANT_TX)(UCHAR, UCHAR*);
  43. typedef BOOL (*P_ANT_TXA)(UCHAR, UCHAR*);
  44. typedef BOOL (*P_ANT_TXB)(UCHAR, UCHAR*, USHORT);
  45. typedef BOOL (*P_ANT_ADDID)(UCHAR, USHORT, UCHAR, UCHAR, UCHAR);
  46. typedef BOOL (*P_ANT_CONFIGLIST)(UCHAR, UCHAR, UCHAR);
  47. typedef BOOL (*P_ANT_CHANTXPWR)(UCHAR, UCHAR);
  48. typedef BOOL (*P_ANT_LOWPRITIME)(UCHAR, UCHAR);
  49. typedef BOOL (*P_ANT_SERIALID)(UCHAR, UCHAR, UCHAR);
  50. typedef BOOL (*P_ANT_SETLED)(UCHAR ucEnable_);
  51. typedef BOOL (*P_ANT_SETCRYSTAL)(void);
  52. typedef BOOL (*P_ANT_SETAGILITY)(UCHAR, UCHAR, UCHAR, UCHAR);
  53. typedef BOOL (*P_ANT_SETPROX)(UCHAR, UCHAR);
  54. typedef BOOL (*P_ANT_SETSCAN)(void);
  55. typedef BOOL (*P_ANT_SETSLEEP)(void);
  56. typedef BOOL (*P_ANT_CWINIT)(void);
  57. typedef BOOL (*P_ANT_CWMODE)(UCHAR, UCHAR);
  58. typedef BOOL (*P_ANT_TXEXT)(UCHAR, UCHAR*);
  59. typedef BOOL (*P_ANT_TXAEXT)(UCHAR, UCHAR*);
  60. typedef BOOL (*P_ANT_TXBEXT)(UCHAR, UCHAR*);
  61. typedef USHORT (*P_ANT_BURSTTFR)(UCHAR, UCHAR*, USHORT);
  62. typedef const UCHAR* (*P_ANT_LIBVER)(void);
  63. typedef void (*P_ANT_NAP)(ULONG);
  64. //////////////////////////////////////////////////////////////////////////////////
  65. // Public Variable Prototypes
  66. //////////////////////////////////////////////////////////////////////////////////
  67. // Function Pointers
  68. extern P_ANT_INIT ANT_Init;
  69. extern P_ANT_INIT_EXT ANT_InitExt;
  70. extern P_ANT_GETDEVICEUSBINFO ANT_GetDeviceUSBInfo;
  71. extern P_ANT_GETDEVICEUSBPID ANT_GetDeviceUSBPID;
  72. extern P_ANT_GETDEVICEUSBVID ANT_GetDeviceUSBVID;
  73. extern P_ANT_CLOSE ANT_Close;
  74. extern P_ANT_ARF ANT_AssignResponseFunction;
  75. extern P_ANT_AEF ANT_AssignChannelEventFunction;
  76. extern P_ANT_UNASSIGN ANT_UnAssignChannel;
  77. extern P_ANT_ASSIGN ANT_AssignChannel;
  78. extern P_ANT_ASSIGN_EXT ANT_AssignChannelExt;
  79. extern P_ANT_SETID ANT_SetChannelId;
  80. extern P_ANT_SETPER ANT_SetChannelPeriod;
  81. extern P_ANT_SETTIME ANT_SetChannelSearchTimeout;
  82. extern P_ANT_SETFREQ ANT_SetChannelRFFreq;
  83. extern P_ANT_SETKEY ANT_SetNetworkKey;
  84. extern P_ANT_SETPWR ANT_SetTransmitPower;
  85. extern P_ANT_RST ANT_ResetSystem;
  86. extern P_ANT_OPENCHNL ANT_OpenChannel;
  87. extern P_ANT_CLOSECHNL ANT_CloseChannel;
  88. extern P_ANT_REQMSG ANT_RequestMessage;
  89. extern P_ANT_TX ANT_SendBroadcastData;
  90. extern P_ANT_TXA ANT_SendAcknowledgedData;
  91. extern P_ANT_TXB ANT_SendBurstTransfer;
  92. extern P_ANT_ENABLEEXT ANT_RxExtMesgsEnable;
  93. extern P_ANT_ADDID ANT_AddChannelID;
  94. extern P_ANT_CONFIGLIST ANT_ConfigList;
  95. extern P_ANT_CHANTXPWR ANT_SetChannelTxPower;
  96. extern P_ANT_LOWPRITIME ANT_SetLowPriorityChannelSearchTimeout;
  97. extern P_ANT_SERIALID ANT_SetSerialNumChannelId;
  98. extern P_ANT_SETLED ANT_EnableLED;
  99. extern P_ANT_SETCRYSTAL ANT_CrystalEnable;
  100. extern P_ANT_SETAGILITY ANT_ConfigFrequencyAgility;
  101. extern P_ANT_SETPROX ANT_SetProximitySearch;
  102. extern P_ANT_SETSCAN ANT_OpenRxScanMode;
  103. extern P_ANT_SETSLEEP ANT_SleepMessage;
  104. extern P_ANT_CWINIT ANT_InitCWTestMode;
  105. extern P_ANT_CWMODE ANT_SetCWTestMode;
  106. extern P_ANT_TXEXT ANT_SendExtBroadcastData;
  107. extern P_ANT_TXAEXT ANT_SendExtAcknowledgedData;
  108. extern P_ANT_TXBEXT ANT_SendExtBurstTransferPacket;
  109. extern P_ANT_BURSTTFR ANT_SendExtBurstTransfer;
  110. extern P_ANT_LIBVER ANT_LibVersion;
  111. extern P_ANT_NAP ANT_Nap;
  112. //////////////////////////////////////////////////////////////////////////////////
  113. // Public Function Prototypes
  114. //////////////////////////////////////////////////////////////////////////////////
  115. extern BOOL ANT_Load(void);
  116. extern void ANT_UnLoad(void);
  117. extern BOOL ANT_LibVersionSupport();
  118. #if defined(__cplusplus)
  119. }
  120. #endif
  121. #endif // !defined(ANT_DLL_H)