van_com_define.h 613 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __VAN_COM_DEFINE_H__
  2. #define __VAN_COM_DEFINE_H__
  3. #ifndef VAN_CONFIG_NOCARE
  4. #define VAN_CONFIG_NOCARE 0xffffffff
  5. #define VAN_CFG_NO_PRT (void *)0
  6. #endif
  7. #ifndef Bool
  8. typedef enum
  9. {
  10. True = 1,
  11. False = 0
  12. } Bool;
  13. #endif
  14. #ifndef Length
  15. #define Length(table) (sizeof(table) / sizeof(table[0]))
  16. #endif
  17. typedef enum {
  18. VAN_COM_EER_OK = 0,
  19. VAN_COM_EER_FAILED = 1,
  20. VAN_COM_EER_NOSUPPORT,
  21. VAN_COM_EER_OUTTIME,
  22. VAN_COM_EER_PARAM,
  23. VAN_COM_EER_SENSOR,
  24. VAN_COM_EER_NORUN = (int)0xffffffff,
  25. }VAN_COM_EER_DEF;
  26. #define NAMEANDID(chanle) .ID = chanle, .Name = #chanle
  27. #endif //__VAN_COM_DEFINE_H__