You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. #include <stddef.h>
  2. #include <stdio.h>
  3. #include "base/config_service.hpp"
  4. #include "base/device_info.hpp"
  5. #include "spi.h"
  6. #include "usart.h"
  7. #include "zsdk/modbus/modbus_block_host.hpp"
  8. #include "zsdk/pxx_pressure_sensor_driver/pxx_pressure_sensor_bus.hpp"
  9. #include "zsdk/tmc/ztmc5130.hpp"
  10. #include "zsdk/zadc.hpp"
  11. #include "zsdk/zsdk.hpp"
  12. void hardware_init();
  13. namespace iflytop {
  14. class Hardware {
  15. public:
  16. static Hardware& ins() {
  17. static Hardware ins;
  18. return ins;
  19. }
  20. void init();
  21. void mini_pwm_blower_ctrl(int32_t val);
  22. int32_t mini_pwm_blower_read_fbcount();
  23. void heater_ctrl(int32_t val);
  24. void heater_ctrl_safe_valve(int32_t val);
  25. int32_t heater_read_electric_current();
  26. int32_t heater_read_temperature_data();
  27. bool h2o2_sensor_is_online();
  28. int32_t h2o2_sensor_read_calibration_date(int32_t* year, int32_t* month, int32_t* day);
  29. int32_t h2o2_sensor_read_sub_ic_errorcode();
  30. int32_t h2o2_sensor_read_sub_ic_reg(int32_t add, uint16_t* val, size_t len);
  31. int32_t h2o2_sensor_data(report_h2o2_data_t* sensorData);
  32. };
  33. } // namespace iflytop