mcu_hi3321_watch/tjd/ui/app/production/TjdUiAppProductModel.h
2025-05-26 20:15:20 +08:00

53 lines
1.1 KiB
C++

#ifndef TJD_UI_APP_PRODUCT_MODEL_H
#define TJD_UI_APP_PRODUCT_MODEL_H
#include "cmsis_os2.h"
namespace TJD {
enum class InterfaceType
{
OPEN = 0,
GET_DATA,
CLOSE,
};
struct GSensorInfo
{
uint16_t step;
int16_t x;
int16_t y;
int16_t z;
};
class TjdUiAppProductModel
{
public:
static TjdUiAppProductModel &GetInstance(void)
{
static TjdUiAppProductModel instance;
return instance;
};
void SetKeepScreenOn(bool keepScreenOn);
uint32_t HeartRateOperate(InterfaceType type, void *param);
uint32_t GsensorOperate(InterfaceType type, void *param);
uint32_t SpeakerOperate(InterfaceType type, void *param);
uint32_t MotorOperate(InterfaceType type, void *param);
uint32_t MicrophoneOperate(InterfaceType type, void *param);
uint32_t GPSOperate(InterfaceType type, void *param);
uint8_t GetPower(void);
bool GPSIsNormal(void);
private:
TjdUiAppProductModel() {};
~TjdUiAppProductModel() {};
int PlayerStart();
int PlayerStop();
int SingLoopEnable();
int SingLoopDisable();
};
} // namespace TJD
#endif