1. #ifndef __LIHGT_TYPES_H__
    2. #define __LIHGT_TYPES_H__
    3. #include <stdio.h>
    4. #include <stdlib.h>
    5. #ifdef __cplusplus
    6. extern "C" {
    7. #endif /* __cplusplus */
    8. #ifndef WEAK
    9. #define WEAK __attribute__((weak))
    10. #endif
    11. //#ifndef WEAK
    12. //#define WEAK weak
    13. //#endif
    14. typedef int OPERATE_LIGHT;
    15. #ifndef LIGHT_OK
    16. #define LIGHT_OK (0)
    17. #endif
    18. #ifndef LIGHT_COM_ERROR
    19. #define LIGHT_COM_ERROR (-1)
    20. #endif
    21. #ifndef LIGHT_INVALID_PARM
    22. #define LIGHT_INVALID_PARM (-2)
    23. #endif
    24. #ifndef LIGHT_MALLOC_FAILED
    25. #define LIGHT_MALLOC_FAILED (-3)
    26. #endif
    27. #ifndef LIGHT_NOT_FOUND
    28. #define LIGHT_NOT_FOUND (-901)
    29. #endif
    30. #ifndef VOID
    31. typedef void VOID;
    32. #endif
    33. typedef void *PVOID_T;
    34. #ifndef bool_t
    35. typedef int bool_t;
    36. #endif
    37. typedef bool_t BOOL_T;
    38. typedef BOOL_T *PBOOL_T;
    39. typedef char CHAR_T;
    40. typedef signed char SCHAR_T;
    41. typedef unsigned char UCHAR_T;
    42. typedef char *PCHAR_T;
    43. typedef short SHORT_T;
    44. typedef unsigned short USHORT_T;
    45. typedef short *PSHORT_T;
    46. typedef signed int INT_T;
    47. typedef int *PINT_T;
    48. typedef unsigned int UINT_T;
    49. typedef unsigned int *PUINT_T;
    50. typedef long LONG_T;
    51. typedef unsigned long ULONG_T;
    52. typedef long *PLONG_T;
    53. typedef unsigned short WORD_T;
    54. typedef WORD_T *PWORD_T;
    55. typedef unsigned int DWORD_T;
    56. typedef DWORD_T *PDWORD_T;
    57. typedef float FLOAT_T;
    58. typedef FLOAT_T *PFLOAT_T;
    59. typedef long long DLONG_T;
    60. typedef DLONG_T *PDLONG_T;
    61. typedef unsigned long long DDWORD_T;
    62. typedef DDWORD_T *PDDWORD_T;
    63. typedef int OPERATE_RET;
    64. typedef double DOUBLE_T;
    65. #ifndef IN
    66. #define IN
    67. #endif
    68. #ifndef OUT
    69. #define OUT
    70. #endif
    71. #ifndef FALSE
    72. #define FALSE 0
    73. #endif
    74. #ifndef TRUE
    75. #define TRUE 1
    76. #endif
    77. #ifndef INOUT
    78. #define INOUT
    79. #endif
    80. #ifndef VOID
    81. #define VOID void
    82. #endif
    83. #ifndef CONST
    84. #define CONST const
    85. #endif
    86. #ifndef STATIC
    87. #define STATIC static
    88. #endif
    89. #ifndef SIZEOF
    90. #define SIZEOF sizeof
    91. #endif
    92. #ifndef INLINE
    93. #define INLINE inline
    94. #endif
    95. #ifndef NULL
    96. #ifdef __cplusplus
    97. #define NULL 0
    98. #else
    99. #define NULL ((void *)0)
    100. #endif
    101. #endif
    102. #ifndef true
    103. #define true 1
    104. #endif
    105. #ifndef false
    106. #define false 0
    107. #endif
    108. #define PIN_NOEXIST 0xFF ///< default pin def
    109. #ifdef __cplusplus
    110. }
    111. #endif /* __cplusplus */
    112. #endif /* __LIHGT_TYPES_H__ */