MT_SAPI.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /**************************************************************************************************
  2. Filename: MT_SAPI.h
  3. Revised: $Date: 2008-01-17 12:22:57 -0800 (Thu, 17 Jan 2008) $
  4. Revision: $Revision: 16223 $
  5. Description: MonitorTest functions for the Simple API.
  6. Copyright 2007 Texas Instruments Incorporated. All rights reserved.
  7. IMPORTANT: Your use of this Software is limited to those specific rights
  8. granted under the terms of a software license agreement between the user
  9. who downloaded the software, his/her employer (which must be your employer)
  10. and Texas Instruments Incorporated (the "License"). You may not use this
  11. Software unless you agree to abide by the terms of the License. The License
  12. limits your use, and you acknowledge, that the Software may not be modified,
  13. copied or distributed unless embedded on a Texas Instruments microcontroller
  14. or used solely and exclusively in conjunction with a Texas Instruments radio
  15. frequency transceiver, which is integrated into your product. Other than for
  16. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  17. works of, modify, distribute, perform, display or sell this Software and/or
  18. its documentation for any purpose.
  19. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  20. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  21. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  22. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  23. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  24. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  25. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  26. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  27. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  28. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  29. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  30. Should you have any questions regarding your right to use this Software,
  31. contact Texas Instruments Incorporated at www.TI.com.
  32. **************************************************************************************************/
  33. #ifndef MT_SAPI_H
  34. #define MT_SAPI_H
  35. /*********************************************************************
  36. * INCLUDES
  37. */
  38. #include "ZComDef.h"
  39. #include "MT.h"
  40. #include "sapi.h"
  41. #include "OnBoard.h"
  42. /*********************************************************************
  43. * MACROS
  44. */
  45. #if !defined (SAPI_OSAL_ADD_TASK_ENABLED)
  46. #define SAPICB_CHECK(cbi) 1
  47. #else
  48. #define SAPICB_CHECK(cbi) (_sapiCallbackSub & (cbi))
  49. #endif
  50. /*********************************************************************
  51. * CONSTANTS
  52. */
  53. // SAPI MT Message Lengths
  54. #define SPI_CB_SAPI_START_CNF_LEN 1
  55. #define SPI_CB_SAPI_SEND_DATA_CNF_LEN 2
  56. #define SPI_CB_SAPI_BIND_CNF_LEN 3
  57. #define SPI_CB_SAPI_DISC_NET_CNF_LEN 1
  58. #define SPI_CB_SAPI_FIND_DEV_CNF_LEN 11
  59. #define SPI_CB_SAPI_RCV_DATA_IND_LEN 6
  60. #define SPI_CB_SAPI_ALLOW_BIND_CNF_LEN 2
  61. /*********************************************************************
  62. * TYPEDEFS
  63. */
  64. /*********************************************************************
  65. * GLOBAL VARIABLES
  66. */
  67. #if defined ( MT_SAPI_CB_FUNC )
  68. extern uint16 _sapiCallbackSub;
  69. #endif
  70. /*********************************************************************
  71. * EXTERNAL VARIABLES
  72. */
  73. /*********************************************************************
  74. * EXTERNAL FUNCTIONS
  75. */
  76. /*********************************************************************
  77. * LOCAL VARIABLES
  78. */
  79. /*********************************************************************
  80. * LOCAL FUNCTIONS
  81. */
  82. #if defined ( MT_SAPI_FUNC )
  83. extern uint8 MT_SapiCommandProcessing(uint8 *pBuf);
  84. #endif // MT_SAPI_FUNC
  85. #if defined ( MT_SAPI_CB_FUNC )
  86. extern void zb_MTCallbackStartConfirm( uint8 status );
  87. extern void zb_MTCallbackSendDataConfirm( uint8 handle, uint8 status );
  88. extern void zb_MTCallbackBindConfirm( uint16 commandId, uint8 status );
  89. extern void zb_MTCallbackFindDeviceConfirm( uint8 searchType,
  90. uint8 *searchKey, uint8 *result );
  91. extern void zb_MTCallbackReceiveDataIndication( uint16 source,
  92. uint16 command, uint16 len, uint8 *pData );
  93. extern void zb_MTCallbackAllowBindConfirm( uint16 source );
  94. #endif // MT_SAPI_CB_FUNC
  95. /*********************************************************************
  96. *********************************************************************/
  97. #endif