43 lines
710 B
C
43 lines
710 B
C
#ifndef INPUTS_H_
|
|
#define INPUTS_H_
|
|
|
|
/**** Includes ****/
|
|
#include <stdint.h>
|
|
#include "common/level.h"
|
|
|
|
/**** Public definitions ****/
|
|
typedef struct {
|
|
level_t act_level;
|
|
uint8_t dbnc_treshold;
|
|
} inChCfg_t;
|
|
|
|
typedef struct {
|
|
level_t level;
|
|
uint8_t dbnc_counter;
|
|
} inChRaw_t;
|
|
|
|
typedef struct {
|
|
uint8_t is_active;
|
|
uint8_t is_new;
|
|
uint16_t state_timer;
|
|
inChRaw_t proc;
|
|
inChCfg_t cfg;
|
|
} inCh_t;
|
|
|
|
typedef struct {
|
|
inCh_t handbrake;
|
|
inCh_t brakes;
|
|
inCh_t dimm;
|
|
inCh_t up;
|
|
inCh_t down;
|
|
inCh_t mode;
|
|
} inputs_t;
|
|
|
|
/**** Public function declarations ****/
|
|
void Inputs_DefInit(inputs_t* inputs);
|
|
|
|
void Inputs_UpdateAll(inputs_t* inputs);
|
|
|
|
void Inputs_SetHanbrakePullUp(uint8_t on);
|
|
|
|
#endif /* INPUTS_H_ */ |