ant_dll.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 in compliance
  4. with this license.
  5. Copyright (c) Dynastream Innovations Inc. 2012
  6. All rights reserved.
  7. */
  8. #ifndef ANT_DLL_H
  9. #define ANT_DLL_H
  10. #include "types.h"
  11. #include "antdefines.h"
  12. #include "antmessage.h"
  13. #if defined(__cplusplus)
  14. extern "C" {
  15. #endif
  16. //////////////////////////////////////////////////////////////////////////////////
  17. // Public Definitions
  18. //////////////////////////////////////////////////////////////////////////////////
  19. // Application callback function pointers
  20. typedef BOOL (*RESPONSE_FUNC)(UCHAR ucChannel, UCHAR ucResponseMsgID);
  21. typedef BOOL (*CHANNEL_EVENT_FUNC)(UCHAR ucChannel, UCHAR ucEvent);
  22. typedef BOOL (*P_ANT_INIT)(UCHAR, ULONG, UCHAR, UCHAR);
  23. typedef BOOL (*P_ANT_GETDEVICEUSBINFO)(UCHAR ,UCHAR*, UCHAR*);
  24. typedef BOOL (*P_ANT_GETDEVICEUSBPID)(USHORT* pusPID_);
  25. typedef void (*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, ULONG);
  29. typedef BOOL (*P_ANT_ASSIGN)(UCHAR, UCHAR, UCHAR, ULONG);
  30. typedef BOOL (*P_ANT_SETID)(UCHAR, USHORT, UCHAR, UCHAR, ULONG);
  31. typedef BOOL (*P_ANT_SETPER)(UCHAR, USHORT, ULONG);
  32. typedef BOOL (*P_ANT_SETTIME)(UCHAR, UCHAR, ULONG);
  33. typedef BOOL (*P_ANT_SETFREQ)(UCHAR, UCHAR, ULONG);
  34. typedef BOOL (*P_ANT_SETKEY)(UCHAR, UCHAR*, ULONG);
  35. typedef BOOL (*P_ANT_SETPWR)(UCHAR, ULONG);
  36. typedef BOOL (*P_ANT_SETCHNLPWR)(UCHAR, UCHAR, ULONG);
  37. typedef void (*P_ANT_RST)(void);
  38. typedef void (*P_ANT_OPENCHNL)(UCHAR);
  39. typedef void (*P_ANT_CLOSECHNL)(UCHAR);
  40. typedef void (*P_ANT_REQMSG)(UCHAR, UCHAR);
  41. typedef BOOL (*P_ANT_WRITEMSG)(UCHAR ucMessageID, UCHAR* aucData, USHORT usMessageSize);
  42. typedef void (*P_ANT_TX)(UCHAR, UCHAR*);
  43. typedef void (*P_ANT_TXA)(UCHAR, UCHAR*);
  44. typedef void (*P_ANT_TXB)(UCHAR, UCHAR*, USHORT);
  45. typedef const UCHAR* (*P_ANT_LIBVER)(void);
  46. //////////////////////////////////////////////////////////////////////////////////
  47. // Public Variable Prototypes
  48. //////////////////////////////////////////////////////////////////////////////////
  49. // Function Pointers
  50. extern P_ANT_INIT ANT_Init;
  51. extern P_ANT_GETDEVICEUSBINFO ANT_GetDeviceUSBInfo;
  52. extern P_ANT_GETDEVICEUSBPID ANT_GetDeviceUSBPID;
  53. extern P_ANT_CLOSE ANT_Close;
  54. extern P_ANT_ARF ANT_AssignResponseFunction;
  55. extern P_ANT_AEF ANT_AssignChannelEventFunction;
  56. extern P_ANT_UNASSIGN ANT_UnAssignChannel;
  57. extern P_ANT_ASSIGN ANT_AssignChannel;
  58. extern P_ANT_SETID ANT_SetChannelId;
  59. extern P_ANT_SETPER ANT_SetChannelPeriod;
  60. extern P_ANT_SETTIME ANT_SetChannelSearchTimeout;
  61. extern P_ANT_SETFREQ ANT_SetChannelRFFreq;
  62. extern P_ANT_SETKEY ANT_SetNetworkKey;
  63. extern P_ANT_SETPWR ANT_SetTransmitPower;
  64. extern P_ANT_SETCHNLPWR ANT_SetChannelTxPower;
  65. extern P_ANT_RST ANT_ResetSystem;
  66. extern P_ANT_OPENCHNL ANT_OpenChannel;
  67. extern P_ANT_CLOSECHNL ANT_CloseChannel;
  68. extern P_ANT_REQMSG ANT_RequestMessage;
  69. extern P_ANT_WRITEMSG ANT_WriteMessage;
  70. extern P_ANT_TX ANT_SendBroadcastData;
  71. extern P_ANT_TXA ANT_SendAcknowledgedData;
  72. extern P_ANT_TXB ANT_SendBurstTransfer;
  73. extern P_ANT_LIBVER ANT_LibVersion;
  74. //////////////////////////////////////////////////////////////////////////////////
  75. // Public Function Prototypes
  76. //////////////////////////////////////////////////////////////////////////////////
  77. extern BOOL ANT_Load(void);
  78. extern void ANT_UnLoad(void);
  79. extern BOOL ANT_LibVersionSupport();
  80. #if defined(__cplusplus)
  81. }
  82. #endif
  83. #endif // !ANT_DLL_H