change name to inputs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
set(SOURCES
|
||||
"expander.cpp"
|
||||
"inputs.cpp"
|
||||
"i2c.cpp"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "blk_box_drivers/expander.hpp"
|
||||
#include "blk_box_drivers/inputs.hpp"
|
||||
|
||||
#include "pins.h"
|
||||
#include "blk_box_drivers/i2c.h"
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
static const char *TAG = "EXPANDER";
|
||||
static const char *TAG = "INPUTS";
|
||||
|
||||
static TaskHandle_t expander_task_handle = NULL;
|
||||
|
||||
@@ -37,7 +37,7 @@ class ExpanderPeripheral {
|
||||
// or even make this class hidden
|
||||
public:
|
||||
SemaphoreHandle_t state_mutex;
|
||||
ExpanderState state;
|
||||
InputsState state;
|
||||
|
||||
// channels
|
||||
QueueHandle_t button_press_events;
|
||||
@@ -323,9 +323,9 @@ void InputsController::clear_all_events() {
|
||||
xQueueReset(expander_peripheral_singleton.keypad_release_events);
|
||||
}
|
||||
|
||||
ExpanderState InputsController::get_input_state() {
|
||||
InputsState InputsController::get_input_state() {
|
||||
xSemaphoreTake(expander_peripheral_singleton.state_mutex, portMAX_DELAY);
|
||||
ExpanderState state_copy = expander_peripheral_singleton.state;
|
||||
InputsState state_copy = expander_peripheral_singleton.state;
|
||||
xSemaphoreGive(expander_peripheral_singleton.state_mutex);
|
||||
return state_copy;
|
||||
}
|
||||
Reference in New Issue
Block a user