diff --git a/io.hpp b/io.hpp index ea4bbcc..740a404 100644 --- a/io.hpp +++ b/io.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include @@ -188,20 +188,20 @@ static constexpr uintptr_t PORT_D_INPUT_REG_ADDR = 0; static constexpr auto getBus(const P pin) { // Upper 4 bits of pin encode which port this pin is on - const auto port = static_cast(pin) >> 4 & 0x0F; + const auto port = static_cast(pin) >> 4 & 0x0F; return static_cast(port); } static constexpr auto getPinBit(const P pin) { // Lower 4 bits of pin encode which pin bit it is - const auto pinBit = static_cast(pin) & 0x0F; + const auto pinBit = static_cast(pin) & 0x0F; return pinBit; } static constexpr auto getDDR(const Bus bus) { - switch (static_cast(bus)) { + switch (static_cast(bus)) { case 0: // Bus::A return PORT_A_DIR_REG_ADDR; case 1: // Bus::B @@ -215,7 +215,7 @@ static constexpr auto getDDR(const Bus bus) static constexpr auto getPORT(const Bus bus) { - switch (static_cast(bus)) { + switch (static_cast(bus)) { case 0: // Bus::A return PORT_A_OUTPUT_REG_ADDR; case 1: // Bus::B @@ -229,7 +229,7 @@ static constexpr auto getPORT(const Bus bus) static constexpr auto getPIN(const Bus bus) { - switch (static_cast(bus)) { + switch (static_cast(bus)) { case 0: // Bus::A return PORT_A_INPUT_REG_ADDR; case 1: // Bus::B @@ -241,7 +241,7 @@ static constexpr auto getPIN(const Bus bus) } } -using reg_ptr_t = volatile uint8_t *; +using reg_ptr_t = volatile std::uint8_t *; template static inline reg_ptr_t getRegPtr() @@ -249,7 +249,7 @@ static inline reg_ptr_t getRegPtr() return reinterpret_cast(Address); } -template