diff --git a/config.hpp b/config.hpp index cdcb07c..c9761d7 100644 --- a/config.hpp +++ b/config.hpp @@ -1,5 +1,7 @@ #pragma once +#include "../io/io.hpp" + namespace spi { enum class ClockDiv { @@ -32,12 +34,13 @@ enum class BitOrder { }; template + BitOrder bitOrder = BitOrder::MSB_FIRST, io::P ssPin = io::P::B2, bool pullup = false> struct Config { static constexpr auto FREQ = freq; static constexpr auto MODE = mode; static constexpr auto SIDE = side; static constexpr auto BIT_ORDER = bitOrder; + static constexpr auto SS_PIN = ssPin; static constexpr auto PULLUP = pullup; }; diff --git a/hardware.hpp b/hardware.hpp index 913569e..8ee6735 100644 --- a/hardware.hpp +++ b/hardware.hpp @@ -52,7 +52,7 @@ class Hardware { static io::Pin sm_sck; static io::Pin sm_miso; static io::Pin sm_mosi; - static io::Pin sm_ss; + static io::Pin sm_ss; static void setClockDiv() {