Created more helpers
This commit is contained in:
47
firmware/src/dccd/brakes.h
Normal file
47
firmware/src/dccd/brakes.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef DCCD_BRAKES_H_
|
||||
#define DCCD_BRAKES_H_
|
||||
|
||||
/**** Includes ****/
|
||||
#include <stdint.h>
|
||||
#include "dccd_hw.h"
|
||||
|
||||
namespace dccd {
|
||||
|
||||
/**** Public definitions ****/
|
||||
class Brakes
|
||||
{
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
OPEN = 0,
|
||||
KEEP = 1,
|
||||
LOCK = 2
|
||||
}bmode_t;
|
||||
|
||||
Brakes(void);
|
||||
~Brakes(void);
|
||||
|
||||
void init(dccd::DccdHw* dccd_hw);
|
||||
|
||||
bmode_t mode;
|
||||
uint8_t is_active;
|
||||
uint8_t is_new_mode;
|
||||
|
||||
void cfg_debounce(uint16_t dbnc_time);
|
||||
bmode_t cycle_mode(void);
|
||||
uint8_t process(void);
|
||||
|
||||
#ifdef TESTING
|
||||
protected:
|
||||
#endif
|
||||
dccd::DccdHw* hardware;
|
||||
};
|
||||
|
||||
/**** Public function declarations ****/
|
||||
|
||||
#ifdef TESTING
|
||||
#endif
|
||||
|
||||
} //namespace
|
||||
|
||||
#endif /* DCCD_BRAKES_H_ */
|
||||
Reference in New Issue
Block a user