#ifndef HW_DEVICES_H_
#define HW_DEVICES_H_

/**** Includes ****/
#include <stdint.h>

#include "../bsp/board.h"

#include "button.h"
#include "potentiometer.h"
#include "display_led.h"
#include "reg_out.h"
#include "fuse.h"

static hw::Button btn_mode = hw::Button(&din1, bsp::DIN_LOW, 10, hw::BUTTON_OFF);
static hw::Button btn_up = hw::Button(&din4, bsp::DIN_LOW, 10, hw::BUTTON_OFF);
static hw::Button btn_down = hw::Button(&din3, bsp::DIN_LOW, 10, hw::BUTTON_OFF);

static hw::Button sw_dimm = hw::Button(&hvdin1, bsp::DIN_HIGH, 10, hw::BUTTON_OFF);
static hw::Button sw_brakes = hw::Button(&hvdin2, bsp::DIN_HIGH, 10, hw::BUTTON_OFF);
static hw::Button sw_hbrake = hw::Button(&hvdin3, bsp::DIN_LOW, 10, hw::BUTTON_OFF);

static hw::Potentiometer pot = hw::Potentiometer(&ain2, 500, 4500);

static hw::DisplayLed display = hw::DisplayLed(&odout1, &odout2, &odout3, &odout4, &odout5, &odout6, &od_pwm);

static hw::RegOut ccout = hw::RegOut(&hbridge, &bat_u, &dccd_u, &dccd_i);
static hw::Fuse sup_fuse =  hw::Fuse(&bat_i);
static hw::Fuse out_fuse = hw::Fuse(&dccd_i);

void devices_init(void);
void devices_update_inputs(void);

#endif /* BSP_BOARD_H_ */