整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
48
hardware/hisilicon/TemperatureSensor.h
Normal file
48
hardware/hisilicon/TemperatureSensor.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#ifndef CBEF59CE_2DB7_43B5_AFA8_524952A27AF9
|
||||
#define CBEF59CE_2DB7_43B5_AFA8_524952A27AF9
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "../Sensor.h"
|
||||
|
||||
namespace Hardware
|
||||
{
|
||||
namespace Hisilicon
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class TemperatureSensor: public Sensor
|
||||
{
|
||||
protected:
|
||||
struct Registers
|
||||
{
|
||||
uint32_t ctrl0;
|
||||
uint32_t ctrl1;
|
||||
uint32_t ctrl2;
|
||||
uint32_t ctrl3;
|
||||
uint32_t ctrl4;
|
||||
uint32_t ctrl5;
|
||||
};
|
||||
|
||||
public:
|
||||
TemperatureSensor();
|
||||
~TemperatureSensor();
|
||||
|
||||
public:
|
||||
virtual void read(float& value) override;
|
||||
|
||||
protected:
|
||||
Registers* getRegisters();
|
||||
void releaseRegisters(Registers* pRegisters);
|
||||
|
||||
private:
|
||||
Registers* _pRegisters;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue