MT_X.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /**************************************************************************************************
  2. Filename: MT_X.h
  3. Revised: $Date: 2009-08-21 13:10:13 -0700 (Fri, 21 Aug 2009) $
  4. Revision: $Revision: 20630 $
  5. Description: This file contains the interface to the Flash Service.
  6. Copyright 2008-2009 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_X_H
  34. #define MT_X_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /* ------------------------------------------------------------------------------------------------
  40. * Includes
  41. * ------------------------------------------------------------------------------------------------
  42. */
  43. #include "hal_types.h"
  44. #include "OSAL_Nv.h"
  45. /* ------------------------------------------------------------------------------------------------
  46. * Macros
  47. * ------------------------------------------------------------------------------------------------
  48. */
  49. /* ------------------------------------------------------------------------------------------------
  50. * Constants
  51. * ------------------------------------------------------------------------------------------------
  52. */
  53. /* ------------------------------------------------------------------------------------------------
  54. * Typedefs
  55. * ------------------------------------------------------------------------------------------------
  56. */
  57. /* ------------------------------------------------------------------------------------------------
  58. * Globals
  59. * ------------------------------------------------------------------------------------------------
  60. */
  61. extern uint8 mtxMode;
  62. /* ------------------------------------------------------------------------------------------------
  63. * Functions
  64. * ------------------------------------------------------------------------------------------------
  65. */
  66. /**************************************************************************************************
  67. * @fn MT_X_UartProcessZToolData
  68. *
  69. * @brief This function is called by Hal_UART_SendCallBack to read incoming Rx data.
  70. *
  71. * Attempt to sync on and parse the old MT 1.0 format:
  72. * | SOP | Data Length | CMD | Data | FCS |
  73. * | 1 | 1 | 2 | 0-Len | 1 |
  74. *
  75. * And then pass on all data to the MT 2.0 by invoking
  76. * void MT_UartProcessZToolData ( uint8 port, uint8 event )
  77. *
  78. * input parameters
  79. *
  80. * @param port - UART port.
  81. * @param event - Event that causes the callback.
  82. *
  83. * output parameters
  84. *
  85. * None.
  86. *
  87. * @return None.
  88. **************************************************************************************************
  89. */
  90. void MT_X_UartProcessZToolData(uint8 port, uint8 event);
  91. /**************************************************************************************************
  92. * @fn MT_X_TransportSend
  93. *
  94. * @brief Prepare message to send by old MT format if it is pertinent to ZOAD.
  95. * Copy message header to re-use to also send in new MT format and then
  96. * fill in SOP and FCS then send out the msg.
  97. *
  98. * input parameters
  99. *
  100. * @param msg - pointer to the message that contains spare byte, CMD, length, data and FCS.
  101. *
  102. * output parameters
  103. *
  104. * None.
  105. *
  106. * @return None.
  107. **************************************************************************************************
  108. */
  109. void MT_X_TransportSend(uint8 *msg);
  110. /**************************************************************************************************
  111. * @fn MT_X_FakeNwkJoinCnf
  112. *
  113. * @brief Fake a SPI_CB_NLME_JOIN_CNF to the old ZOAD.
  114. *
  115. * input parameters
  116. *
  117. * None.
  118. *
  119. * output parameters
  120. *
  121. * None.
  122. *
  123. * @return None.
  124. **************************************************************************************************
  125. */
  126. void MT_X_FakeNwkJoinCnf(void);
  127. /**************************************************************************************************
  128. */
  129. #ifdef __cplusplus
  130. };
  131. #endif
  132. #endif