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.
27 lines
658 B
27 lines
658 B
#pragma once
|
|
#include "base/appdep.hpp"
|
|
|
|
namespace iflytop {
|
|
using namespace transmit_disfection_protocol;
|
|
class PXXPSBus {
|
|
PXXPressureSensorBus psbus;
|
|
bool m_isInitialized = false;
|
|
osTimerId reportTimerId; // 压力传感器数值上报
|
|
|
|
public:
|
|
void initialize(UART_HandleTypeDef* huart);
|
|
bool isInitialized();
|
|
|
|
private:
|
|
void fn_psbus_read_data(ProcessContext* cxt);
|
|
void fn_psbus_scan(ProcessContext* cxt);
|
|
|
|
void fn_psbus_start_report(ProcessContext* cxt);
|
|
|
|
void fn_psbus_stop_report(ProcessContext* cxt);
|
|
|
|
public:
|
|
static void onTimer(const void* tid);
|
|
void onTimer();
|
|
};
|
|
} // namespace iflytop
|