breaker.h 594 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __BREAKER_H_
  2. #define __BREAKER_H_
  3. typedef char S8;
  4. typedef short S16;
  5. typedef int S32;
  6. typedef unsigned char U8;
  7. typedef unsigned short U16;
  8. typedef unsigned int U32;
  9. enum{
  10. BREAKER_CHANNAL_1 = 1,
  11. BREAKER_CHANNAL_2,
  12. BREAKER_CHANNAL_3,
  13. BREAKER_CHANNAL_4,
  14. BREAKER_CHANNAL_5,
  15. BREAKER_CHANNAL_6,
  16. BREAKER_CHANNAL_ERR
  17. };
  18. typedef struct{
  19. U16 channel[7];
  20. }breaker_channels_t;
  21. // breaker io init
  22. void breaker_init(void);
  23. U8 breaker_read_id(void);
  24. S8 breaker_chn_read(U16* statue,U8 chanel);
  25. U16 get_channel_val(U8 chanel);
  26. breaker_channels_t *get_breakers(void);
  27. #endif