Skip to content

Commit

Permalink
add fake gpio?
Browse files Browse the repository at this point in the history
  • Loading branch information
vegano1 committed Jan 18, 2024
1 parent b7a71b9 commit 736ee45
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions hepa-uv/simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ add_library(freertos-hepa-uv STATIC ${FREERTOS_SOURCES})

set(HEPA_UV_SIMULATOR_SRC
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gpio.cpp
${CMAKE_CURRENT_SOURCE_DIR}/freertos_idle_timer_task.cpp
)

Expand Down
16 changes: 16 additions & 0 deletions hepa-uv/simulator/gpio.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once
#include <cstdint>

namespace gpio {

struct PinConfig {
void* port;
uint16_t pin;
uint8_t active_setting;
};

auto set(const PinConfig& pc) -> void;
auto reset(const PinConfig& pc) -> void;
auto is_set(const PinConfig& pc) -> bool;

}; // namespace gpio

0 comments on commit 736ee45

Please sign in to comment.