MT_DEBUG.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /***************************************************************************************************
  2. Filename: MTEL.h
  3. Revised: $Date: 2011-06-07 14:34:55 -0700 (Tue, 07 Jun 2011) $
  4. Revision: $Revision: 26241 $
  5. Description:
  6. Copyright 2007-2011 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_DEBUG_H
  34. #define MT_DEBUG_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /***************************************************************************************************
  40. * INCLUDES
  41. ***************************************************************************************************/
  42. #include "OSAL.h"
  43. /***************************************************************************************************
  44. * TYPEDEFs
  45. ***************************************************************************************************/
  46. typedef struct
  47. {
  48. osal_event_hdr_t hdr;
  49. uint8 compID;
  50. uint8 severity;
  51. uint8 numParams;
  52. uint16 param1;
  53. uint16 param2;
  54. uint16 param3;
  55. uint16 timestamp;
  56. } mtDebugMsg_t;
  57. typedef struct
  58. {
  59. osal_event_hdr_t hdr;
  60. uint8 strLen;
  61. uint8 *pString;
  62. } mtDebugStr_t;
  63. typedef struct {
  64. #ifdef PACKET_FILTER_STATS
  65. uint32 nwkInvalidPackets;
  66. uint32 rxCrcFailure;
  67. uint32 rxCrcSuccess;
  68. #endif
  69. uint8 fsmstat0;
  70. uint8 fsmstat1;
  71. uint8 macData_rxCount;
  72. uint8 macData_directCount;
  73. uint8 macMain_state;
  74. uint8 macRxActive;
  75. uint8 macTxActive;
  76. } mtDebugMacDataDump_t;
  77. /***************************************************************************************************
  78. * EXTERNAL FUNCTIONS
  79. ***************************************************************************************************/
  80. #if defined (MT_DEBUG_FUNC)
  81. /*
  82. * Process MT_DEBUG commands
  83. */
  84. extern uint8 MT_DebugCommandProcessing(uint8 *pBuf);
  85. #endif /* MT_DEBUG_FUNC */
  86. /*
  87. * Process MT_DEBUG messages
  88. */
  89. extern void MT_ProcessDebugMsg(mtDebugMsg_t *pData);
  90. /*
  91. * Process MT_DEBUG strings
  92. */
  93. extern void MT_ProcessDebugStr(mtDebugStr_t *pData);
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97. #endif /* MTEL_H */
  98. /***************************************************************************************************
  99. ***************************************************************************************************/