comdef.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /**************************************************************************************************
  2. Filename: comdef.h
  3. Revised:
  4. Revision:
  5. Description: Type definitions and macros.
  6. **************************************************************************************************/
  7. #ifndef COMDEF_H
  8. #define COMDEF_H
  9. #ifdef __cplusplus
  10. extern "C"
  11. {
  12. #endif
  13. /*********************************************************************
  14. * INCLUDES
  15. */
  16. /* HAL */
  17. #include "types.h"
  18. /*********************************************************************
  19. * Lint Keywords
  20. */
  21. #define VOID (void)
  22. #define NULL_OK
  23. #define INP
  24. #define OUTP
  25. #define UNUSED
  26. #define ONLY
  27. #define READONLY
  28. #define SHARED
  29. #define KEEP
  30. #define RELAX
  31. /*********************************************************************
  32. * CONSTANTS
  33. */
  34. #ifndef false
  35. #define false 0
  36. #endif
  37. #ifndef true
  38. #define true 1
  39. #endif
  40. #ifndef CONST
  41. #define CONST const
  42. #endif
  43. #ifndef GENERIC
  44. #define GENERIC
  45. #endif
  46. /*** Generic Status Return Values ***/
  47. #define SUCCESS 0x00
  48. #define FAILURE 0x01
  49. #define INVALIDPARAMETER 0x02
  50. #define INVALID_TASK 0x03
  51. #define MSG_BUFFER_NOT_AVAIL 0x04
  52. #define INVALID_MSG_POINTER 0x05
  53. #define INVALID_EVENT_ID 0x06
  54. #define INVALID_INTERRUPT_ID 0x07
  55. #define NO_TIMER_AVAIL 0x08
  56. #define NV_ITEM_UNINIT 0x09
  57. #define NV_OPER_FAILED 0x0A
  58. #define INVALID_MEM_SIZE 0x0B
  59. #define NV_BAD_ITEM_LEN 0x0C
  60. /*********************************************************************
  61. * TYPEDEFS
  62. */
  63. // Generic Status return
  64. typedef uint8 Status_t;
  65. // Data types
  66. typedef int32 int24;
  67. typedef uint32 uint24;
  68. /*********************************************************************
  69. * Global System Events
  70. */
  71. #define SYS_EVENT_MSG 0x8000 // A message is waiting event
  72. /*********************************************************************
  73. * Global Generic System Messages
  74. */
  75. #define KEY_CHANGE 0xC0 // Key Events
  76. // OSAL System Message IDs/Events Reserved for applications (user applications)
  77. // 0xE0 – 0xFC
  78. /*********************************************************************
  79. * MACROS
  80. */
  81. /*********************************************************************
  82. * GLOBAL VARIABLES
  83. */
  84. /*********************************************************************
  85. * FUNCTIONS
  86. */
  87. /*********************************************************************
  88. *********************************************************************/
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif /* COMDEF_H */