common_datatype.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright 2018 C-SKY Microsystems Co., Ltd.
  3. * Copyright (C) 2021 Alibaba Group Holding Limited
  4. * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. */
  19. #ifndef __COMMON_DATATYPE_H__
  20. #define __COMMON_DATATYPE_H__
  21. #ifndef NULL
  22. #define NULL 0x00
  23. #endif
  24. #ifndef TRUE
  25. #define TRUE 0x01
  26. #endif
  27. #ifndef FALSE
  28. #define FALSE 0x00
  29. #endif
  30. #ifndef true
  31. #define true 0x01
  32. #endif
  33. #ifndef false
  34. #define false 0x00
  35. #endif
  36. #ifndef bool
  37. typedef unsigned char bool;
  38. #endif
  39. #if 0 /* below types are defined in /usr/include/stdint.h */
  40. typedef unsigned char uint8_t;
  41. typedef unsigned short uint16_t;
  42. typedef unsigned int uint32_t;
  43. typedef signed char int8_t;
  44. typedef signed short int16_t;
  45. typedef signed int int32_t;
  46. typedef unsigned long long uint64_t;
  47. #endif
  48. #endif /* __COMMON_DATATYPE_H__ */