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.

26 lines
658 B

12 months ago
3 weeks ago
12 months ago
3 weeks ago
12 months ago
3 weeks ago
12 months ago
3 weeks ago
12 months ago
3 weeks ago
12 months ago
  1. #pragma once
  2. #include "base/appdep.hpp"
  3. namespace iflytop {
  4. using namespace transmit_disfection_protocol;
  5. class PXXPSBus {
  6. PXXPressureSensorBus psbus;
  7. bool m_isInitialized = false;
  8. osTimerId reportTimerId; // 压力传感器数值上报
  9. public:
  10. void initialize(UART_HandleTypeDef* huart);
  11. bool isInitialized();
  12. private:
  13. void fn_psbus_read_data(ProcessContext* cxt);
  14. void fn_psbus_scan(ProcessContext* cxt);
  15. void fn_psbus_start_report(ProcessContext* cxt);
  16. void fn_psbus_stop_report(ProcessContext* cxt);
  17. public:
  18. static void onTimer(const void* tid);
  19. void onTimer();
  20. };
  21. } // namespace iflytop