1
0

ant_dll.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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_CLOSE)();
  22. typedef void (*P_ANT_ARF)(RESPONSE_FUNC, UCHAR*);
  23. typedef void (*P_ANT_AEF)(UCHAR, CHANNEL_EVENT_FUNC, UCHAR*);
  24. typedef BOOL (*P_ANT_UNASSIGN)(UCHAR);
  25. typedef BOOL (*P_ANT_ASSIGN)(UCHAR, UCHAR, UCHAR);
  26. typedef BOOL (*P_ANT_SETID)(UCHAR, USHORT, UCHAR, UCHAR);
  27. typedef BOOL (*P_ANT_SETPER)(UCHAR, USHORT);
  28. typedef BOOL (*P_ANT_SETTIME)(UCHAR, UCHAR);
  29. typedef BOOL (*P_ANT_SETFREQ)(UCHAR, UCHAR);
  30. typedef BOOL (*P_ANT_SETKEY)(UCHAR, UCHAR*);
  31. typedef BOOL (*P_ANT_SETPWR)(UCHAR);
  32. typedef BOOL (*P_ANT_RST)(void);
  33. typedef BOOL (*P_ANT_OPENCHNL)(UCHAR);
  34. typedef BOOL (*P_ANT_CLOSECHNL)(UCHAR);
  35. typedef BOOL (*P_ANT_REQMSG)(UCHAR, UCHAR);
  36. typedef BOOL (*P_ANT_ENABLEEXT)(UCHAR);
  37. typedef BOOL (*P_ANT_TX)(UCHAR, UCHAR*);
  38. typedef BOOL (*P_ANT_TXA)(UCHAR, UCHAR*);
  39. typedef BOOL (*P_ANT_TXB)(UCHAR, UCHAR*, USHORT);
  40. typedef BOOL (*P_ANT_ADDID)(UCHAR, USHORT, UCHAR, UCHAR, UCHAR);
  41. typedef BOOL (*P_ANT_CONFIGLIST)(UCHAR, UCHAR, UCHAR);
  42. typedef BOOL (*P_ANT_CHANTXPWR)(UCHAR, UCHAR);
  43. typedef BOOL (*P_ANT_LOWPRITIME)(UCHAR, UCHAR);
  44. typedef BOOL (*P_ANT_SERIALID)(UCHAR, UCHAR, UCHAR);
  45. typedef BOOL (*P_ANT_SETLED)(UCHAR ucEnable_);
  46. typedef BOOL (*P_ANT_SETCRYSTAL)(void);
  47. typedef BOOL (*P_ANT_SETAGILITY)(UCHAR, UCHAR, UCHAR, UCHAR);
  48. typedef BOOL (*P_ANT_SETPROX)(UCHAR, UCHAR);
  49. typedef BOOL (*P_ANT_SETSCAN)(void);
  50. typedef BOOL (*P_ANT_SETSLEEP)(void);
  51. typedef BOOL (*P_ANT_CWINIT)(void);
  52. typedef BOOL (*P_ANT_CWMODE)(UCHAR, UCHAR);
  53. typedef BOOL (*P_ANT_TXEXT)(UCHAR, UCHAR*);
  54. typedef BOOL (*P_ANT_TXAEXT)(UCHAR, UCHAR*);
  55. typedef BOOL (*P_ANT_TXBEXT)(UCHAR, UCHAR*);
  56. typedef USHORT (*P_ANT_BURSTTFR)(UCHAR, UCHAR*, USHORT);
  57. //////////////////////////////////////////////////////////////////////////////////
  58. // Public Variable Prototypes
  59. //////////////////////////////////////////////////////////////////////////////////
  60. // Function Pointers
  61. extern P_ANT_INIT ANT_Init;
  62. extern P_ANT_CLOSE ANT_Close;
  63. extern P_ANT_ARF ANT_AssignResponseFunction;
  64. extern P_ANT_AEF ANT_AssignChannelEventFunction;
  65. extern P_ANT_UNASSIGN ANT_UnAssignChannel;
  66. extern P_ANT_ASSIGN ANT_AssignChannel;
  67. extern P_ANT_SETID ANT_SetChannelId;
  68. extern P_ANT_SETPER ANT_SetChannelPeriod;
  69. extern P_ANT_SETTIME ANT_SetChannelSearchTimeout;
  70. extern P_ANT_SETFREQ ANT_SetChannelRFFreq;
  71. extern P_ANT_SETKEY ANT_SetNetworkKey;
  72. extern P_ANT_SETPWR ANT_SetTransmitPower;
  73. extern P_ANT_RST ANT_ResetSystem;
  74. extern P_ANT_OPENCHNL ANT_OpenChannel;
  75. extern P_ANT_CLOSECHNL ANT_CloseChannel;
  76. extern P_ANT_REQMSG ANT_RequestMessage;
  77. extern P_ANT_TX ANT_SendBroadcastData;
  78. extern P_ANT_TXA ANT_SendAcknowledgedData;
  79. extern P_ANT_TXB ANT_SendBurstTransfer;
  80. extern P_ANT_ENABLEEXT ANT_RxExtMesgsEnable;
  81. extern P_ANT_ADDID ANT_AddChannelID;
  82. extern P_ANT_CONFIGLIST ANT_ConfigList;
  83. extern P_ANT_CHANTXPWR ANT_SetChannelTxPower;
  84. extern P_ANT_LOWPRITIME ANT_SetLowPriorityChannelSearchTimeout;
  85. extern P_ANT_SERIALID ANT_SetSerialNumChannelId;
  86. extern P_ANT_SETLED ANT_EnableLED;
  87. extern P_ANT_SETCRYSTAL ANT_CrystalEnable;
  88. extern P_ANT_SETAGILITY ANT_ConfigFrequencyAgility;
  89. extern P_ANT_SETPROX ANT_SetProximitySearch;
  90. extern P_ANT_SETSCAN ANT_OpenRxScanMode;
  91. extern P_ANT_SETSLEEP ANT_SleepMessage;
  92. extern P_ANT_CWINIT ANT_InitCWTestMode;
  93. extern P_ANT_CWMODE ANT_SetCWTestMode;
  94. extern P_ANT_TXEXT ANT_SendExtBroadcastData;
  95. extern P_ANT_TXAEXT ANT_SendExtAcknowledgedData;
  96. extern P_ANT_TXBEXT ANT_SendExtBurstTransferPacket;
  97. extern P_ANT_BURSTTFR ANT_SendExtBurstTransfer;
  98. //////////////////////////////////////////////////////////////////////////////////
  99. // Public Function Prototypes
  100. //////////////////////////////////////////////////////////////////////////////////
  101. extern BOOL ANT_Load(void);
  102. extern void ANT_UnLoad(void);
  103. #if defined(__cplusplus)
  104. }
  105. #endif
  106. #endif // !defined(ANT_DLL_H)