MT_OTA.h 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /**************************************************************************************************
  2. Filename: MT_OTA.h
  3. Revised: $Date: 2010-09-24 08:53:19 -0700 (Fri, 24 Sep 2010) $
  4. Revision: $Revision: 23901 $
  5. Description: MonitorTest functions for the ZCL OTA Upgrade.
  6. Copyright 2004-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. /***************************************************************************************************
  34. * INCLUDES
  35. ***************************************************************************************************/
  36. #include "ZComDef.h"
  37. #include "MT.h"
  38. #include "APSMEDE.h"
  39. #include "AF.h"
  40. #include "ota_common.h"
  41. #if !defined( WIN32 )
  42. #include "OnBoard.h"
  43. #endif
  44. typedef struct
  45. {
  46. osal_event_hdr_t hdr;
  47. uint8 cmd;
  48. uint8 data[];
  49. } OTA_MtMsg_t;
  50. /***************************************************************************************************
  51. * CONSTANTS
  52. ***************************************************************************************************/
  53. #define MT_OTA_FILE_READ_REQ_LEN 26
  54. #define MT_OTA_FILE_READ_RSP_LEN 26
  55. #define MT_OTA_GET_IMG_MSG_LEN 31
  56. /***************************************************************************************************
  57. * EXTERNAL FUNCTIONS
  58. ***************************************************************************************************/
  59. /*
  60. * Process all the MT OTA commands that are issued by OTA Console
  61. */
  62. extern uint8 MT_OtaCommandProcessing(uint8* pBuf);
  63. /*
  64. * Send messages to OTA Console from ZCL OTA
  65. */
  66. extern uint8 MT_OtaFileReadReq(afAddrType_t *pAddr, zclOTA_FileID_t *pFileId,
  67. uint8 len, uint32 offset);
  68. extern uint8 MT_OtaGetImage(afAddrType_t *pAddr, zclOTA_FileID_t *pFileId,
  69. uint16 hwVer, uint8 *ieee, uint8 options);
  70. extern uint8 MT_OtaSendStatus(uint16 shortAddr, uint8 type, uint8 status, uint8 optional);
  71. /*
  72. * Registration for MT OTA Callback Messages
  73. */
  74. extern void MT_OtaRegister(uint8 taskId);
  75. /***************************************************************************************************
  76. ***************************************************************************************************/