56 lines
777 B
C++
56 lines
777 B
C++
#ifndef DCCD_TPS_H_
|
|
#define DCCD_TPS_H_
|
|
|
|
/**** Includes ****/
|
|
#include <stdint.h>
|
|
#include "dccd_hw.h"
|
|
|
|
namespace dccd {
|
|
|
|
/**** Public definitions ****/
|
|
class Thtrottle
|
|
{
|
|
public:
|
|
typedef enum
|
|
{
|
|
MODE0 = 0,
|
|
MODE1 = 1,
|
|
MODE2 = 2,
|
|
MODE3 = 3
|
|
}tpsmode_t;
|
|
|
|
Thtrottle(void);
|
|
~Thtrottle(void);
|
|
|
|
void init(dccd::DccdHw* dccd_hw);
|
|
|
|
uint8_t treshold_on;
|
|
uint8_t treshold_off;
|
|
uint16_t timeout_time;
|
|
|
|
tpsmode_t mode;
|
|
uint8_t is_new_mode;
|
|
|
|
uint8_t is_new;
|
|
uint8_t is_active(void);
|
|
|
|
void process(void);
|
|
tpsmode_t cycle_mode(void);
|
|
|
|
#ifdef TESTING
|
|
protected:
|
|
#endif
|
|
dccd::DccdHw* hardware;
|
|
uint16_t start_ts;
|
|
uint8_t is_timed_out;
|
|
uint8_t active;
|
|
};
|
|
|
|
/**** Public function declarations ****/
|
|
|
|
#ifdef TESTING
|
|
#endif
|
|
|
|
} //namespace
|
|
|
|
#endif /* DCCD_TPS_H_ */ |