change name to inputs

This commit is contained in:
2026-04-01 16:32:02 -05:00
parent c82c9adf32
commit 8bc5a982d1
5 changed files with 15 additions and 13 deletions
@@ -1,5 +1,5 @@
#ifndef EXPANDER_H
#define EXPANDER_H
#ifndef INPUTS_H
#define INPUTS_H
#include "blk_box_drivers/i2c.h"
#include <freertos/FreeRTOS.h>
@@ -207,7 +207,7 @@ static_assert(sizeof(ButtonOrSwitch) == 1);
/// @brief The state of the bottom half of the box.
struct ExpanderState {
struct InputsState {
/// The touch state of the switches in the lower 4 bits.
/// The touch pad state in bit 4.
uint8_t touch_state;
@@ -233,14 +233,14 @@ struct ExpanderState {
/// The RFID card that was presented last.
uint32_t rfid_state;
ExpanderState() : touch_state(0), button_state(0), switch_state(0), keypad_state(0), hal_sense(0), close_hal_sense(0), hal(0), close_hal(0), rfid_state(0) {}
InputsState() : touch_state(0), button_state(0), switch_state(0), keypad_state(0), hal_sense(0), close_hal_sense(0), hal(0), close_hal(0), rfid_state(0) {}
};
class InputsController {
public:
static void clear_all_events();
static ExpanderState get_input_state();
static InputsState get_input_state();
static bool has_button_press();
static std::optional<Button> get_button_press();
@@ -273,4 +273,4 @@ public:
// TODO: impl and add the hal and RFID stuff
};
#endif // EXPANDER_H
#endif // INPUTS_H