56 lines
954 B
C++
56 lines
954 B
C++
#ifndef CONFIG_H_
|
|
#define CONFIG_H_
|
|
|
|
/**** Includes ****/
|
|
#include <stdint.h>
|
|
#include "../hw/button.h"
|
|
|
|
namespace logic {
|
|
|
|
/**** Public definitions ****/
|
|
|
|
class CfgMemory
|
|
{
|
|
protected:
|
|
uint8_t mem_btn_force;
|
|
uint8_t mem_bmode;
|
|
uint8_t mem_pot_mode;
|
|
uint8_t mem_dsp_brigth;
|
|
uint8_t mem_dsp_dimm;
|
|
uint8_t mem_brake_force;
|
|
uint16_t mem_max_hbrake_time;
|
|
uint16_t mem_lock_current;
|
|
uint16_t mem_max_out_voltage;
|
|
uint16_t mem_min_out_voltage;
|
|
|
|
public:
|
|
CfgMemory(void);
|
|
~CfgMemory(void);
|
|
|
|
uint8_t cfg_good;
|
|
uint8_t btn_force;
|
|
uint8_t bmode;
|
|
uint8_t pot_mode;
|
|
uint8_t dsp_brigth;
|
|
uint8_t dsp_dimm;
|
|
uint8_t brake_force;
|
|
uint16_t max_hbrake_time;
|
|
uint16_t lock_current;
|
|
uint16_t max_out_voltage;
|
|
uint16_t min_out_voltage;
|
|
|
|
void init(void);
|
|
void save(void);
|
|
void save_all(void);
|
|
void restore(void);
|
|
uint8_t checksum(void);
|
|
};
|
|
|
|
/**** Public function declarations ****/
|
|
|
|
#ifdef TESTING
|
|
#endif
|
|
|
|
} //namespace
|
|
|
|
#endif /* DCCD_FORCE_H_ */ |