comdef.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /**************************************************************************************************
  2. Filename: comdef.h
  3. Revised: $Date: 2010-07-28 08:42:48 -0700 (Wed, 28 Jul 2010) $
  4. Revision: $Revision: 23160 $
  5. Description: Type definitions and macros.
  6. Copyright 2004-2008 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 COMDEF_H
  34. #define COMDEF_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /*********************************************************************
  40. * INCLUDES
  41. */
  42. /* HAL */
  43. #include "hal_types.h"
  44. #include "hal_defs.h"
  45. /*********************************************************************
  46. * Lint Keywords
  47. */
  48. #define VOID (void)
  49. #define NULL_OK
  50. #define INP
  51. #define OUTP
  52. #define UNUSED
  53. #define ONLY
  54. #define READONLY
  55. #define SHARED
  56. #define KEEP
  57. #define RELAX
  58. /*********************************************************************
  59. * CONSTANTS
  60. */
  61. #ifndef false
  62. #define false 0
  63. #endif
  64. #ifndef true
  65. #define true 1
  66. #endif
  67. #ifndef CONST
  68. #define CONST const
  69. #endif
  70. #ifndef GENERIC
  71. #define GENERIC
  72. #endif
  73. /*** Generic Status Return Values ***/
  74. #define SUCCESS 0x00
  75. #define FAILURE 0x01
  76. #define INVALIDPARAMETER 0x02
  77. #define INVALID_TASK 0x03
  78. #define MSG_BUFFER_NOT_AVAIL 0x04
  79. #define INVALID_MSG_POINTER 0x05
  80. #define INVALID_EVENT_ID 0x06
  81. #define INVALID_INTERRUPT_ID 0x07
  82. #define NO_TIMER_AVAIL 0x08
  83. #define NV_ITEM_UNINIT 0x09
  84. #define NV_OPER_FAILED 0x0A
  85. #define INVALID_MEM_SIZE 0x0B
  86. #define NV_BAD_ITEM_LEN 0x0C
  87. /*********************************************************************
  88. * TYPEDEFS
  89. */
  90. // Generic Status return
  91. typedef uint8 Status_t;
  92. // Data types
  93. typedef int32 int24;
  94. typedef uint32 uint24;
  95. /*********************************************************************
  96. * Global System Events
  97. */
  98. #define SYS_EVENT_MSG 0x8000 // A message is waiting event
  99. /*********************************************************************
  100. * Global Generic System Messages
  101. */
  102. #define KEY_CHANGE 0xC0 // Key Events
  103. // OSAL System Message IDs/Events Reserved for applications (user applications)
  104. // 0xE0 – 0xFC
  105. /*********************************************************************
  106. * MACROS
  107. */
  108. /*********************************************************************
  109. * GLOBAL VARIABLES
  110. */
  111. /*********************************************************************
  112. * FUNCTIONS
  113. */
  114. /*********************************************************************
  115. *********************************************************************/
  116. #ifdef __cplusplus
  117. }
  118. #endif
  119. #endif /* COMDEF_H */