55 lines
938 B
C++
55 lines
938 B
C++
#ifndef DCCD_DISPLAY_H_
|
|
#define DCCD_DISPLAY_H_
|
|
|
|
/**** Includes ****/
|
|
#include <stdint.h>
|
|
#include "dccd_hw.h"
|
|
|
|
namespace dccd {
|
|
|
|
/**** Public definitions ****/
|
|
class DccdDisplay
|
|
{
|
|
public:
|
|
typedef enum
|
|
{
|
|
DOT10 = 0,
|
|
DOT20 = 1,
|
|
BAR20 = 2
|
|
} dspstyle_t;
|
|
|
|
DccdDisplay(void);
|
|
~DccdDisplay(void);
|
|
|
|
void init(dccd::DccdHw* dccd_hw);
|
|
void cfg_debounce(uint16_t dbnc_time);
|
|
|
|
uint8_t brigth_pwm;
|
|
uint8_t dimm_pwm;
|
|
|
|
uint8_t next_image;
|
|
uint8_t next_lock_lvl;
|
|
uint16_t next_lock_time;
|
|
|
|
void write(uint8_t image, uint8_t lock_lvl, uint16_t lock_time);
|
|
void write_percent(uint8_t percent, dspstyle_t style, uint8_t lock_lvl, uint16_t lock_time);
|
|
void force_backlight(uint8_t percent);
|
|
void process(void);
|
|
|
|
#ifdef TESTING
|
|
protected:
|
|
#endif
|
|
dccd::DccdHw* hardware;
|
|
|
|
uint8_t act_image;
|
|
uint8_t act_lock_lvl;
|
|
};
|
|
|
|
/**** Public function declarations ****/
|
|
|
|
#ifdef TESTING
|
|
#endif
|
|
|
|
} //namespace
|
|
|
|
#endif /* DCCD_MODE_BTN_H_ */ |