megatec.h 665 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * megatec.h
  3. *
  4. * Created on: 22.05.2017
  5. * Author: balbekova
  6. */
  7. #ifndef MEGATEC_H_
  8. #define MEGATEC_H_
  9. #include <stdbool.h>
  10. #include <stdint.h>
  11. #include <stdlib.h>
  12. typedef enum{
  13. ups_status_req,
  14. ups_test_10sec,
  15. ups_test_low_bat,
  16. ups_test_time,
  17. ups_beep,
  18. ups_shutdown,
  19. ups_shutdown_restore,
  20. ups_cancel_shut_down,
  21. ups_cancel_test,
  22. ups_info,
  23. ups_rating_info,
  24. MegaTec_cmd_max
  25. } cmdMegaTecEnums_t;
  26. typedef struct{
  27. float Freq_in;
  28. float VAC_in;
  29. float VAC_out;
  30. float Temp;
  31. uint8_t Load;
  32. uint8_t SOC;
  33. uint8_t work_time;
  34. uint8_t Status;
  35. bool Present;
  36. }UPS_value_t;
  37. UPS_value_t UPS;
  38. void ups_megatec_init(void);
  39. #endif /* MEGATEC_H_ */