diff --git a/hardware.hpp b/hardware.hpp index 3c02df4..945e4cd 100644 --- a/hardware.hpp +++ b/hardware.hpp @@ -23,8 +23,8 @@ enum class Driven { namespace detail { -template +template class Hardware { public: static void init() FORCE_INLINE diff --git a/hardware0.hpp b/hardware0.hpp index cf733ca..f46080e 100644 --- a/hardware0.hpp +++ b/hardware0.hpp @@ -73,7 +73,7 @@ extern void (*fnDataReg0EmptyIntHandler)(); } // namespace detail -template , Driven driven = Driven::INTERRUPT> +template , Driven driven = Driven::INTERRUPT, Mode mode = Mode::ASYNCHRONOUS> class Hardware0 { public: using data_t = typename cfg::data_t; @@ -117,11 +117,11 @@ class Hardware0 { private: using HardwareImpl = detail::Hardware; + detail::ControlFlagsC0, cfg, driven, mode>; }; -template -class Hardware0 { +template +class Hardware0 { public: using data_t = typename cfg::data_t; static constexpr auto DATA_BITS = cfg::DATA_BITS; @@ -188,7 +188,7 @@ class Hardware0 { private: using HardwareImpl = detail::Hardware; + detail::ControlFlagsC0, cfg, Driven::INTERRUPT, mode>; static constexpr auto TX_BUFFER_SIZE = 16; static constexpr auto RX_BUFFER_SIZE = 16; @@ -217,15 +217,15 @@ class Hardware0 { } }; -template -volatile detail::RingBuffer::data_t, - Hardware0::TX_BUFFER_SIZE> - Hardware0::sm_txBuf = {0, 0, {0}}; +template +volatile detail::RingBuffer::data_t, + Hardware0::TX_BUFFER_SIZE> + Hardware0::sm_txBuf = {0, 0, {0}}; -template -volatile detail::RingBuffer::data_t, - Hardware0::RX_BUFFER_SIZE> - Hardware0::sm_rxBuf = {0, 0, {0}}; +template +volatile detail::RingBuffer::data_t, + Hardware0::RX_BUFFER_SIZE> + Hardware0::sm_rxBuf = {0, 0, {0}}; } // namespace uart diff --git a/hardware1.hpp b/hardware1.hpp index 256b596..925e878 100644 --- a/hardware1.hpp +++ b/hardware1.hpp @@ -77,7 +77,7 @@ extern void (*fnDataReg1EmptyIntHandler)(); #ifdef HAS_UART1 -template , Driven driven = Driven::INTERRUPT> +template , Driven driven = Driven::INTERRUPT, Mode mode = Mode::ASYNCHRONOUS> class Hardware1 { public: using data_t = typename cfg::data_t; @@ -121,11 +121,11 @@ class Hardware1 { private: using HardwareImpl = detail::Hardware; + detail::ControlFlagsC1, cfg, driven, mode>; }; -template -class Hardware1 { +template +class Hardware1 { public: using data_t = typename cfg::data_t; static constexpr auto DATA_BITS = cfg::DATA_BITS; @@ -192,7 +192,7 @@ class Hardware1 { private: using HardwareImpl = detail::Hardware; + detail::ControlFlagsC1, cfg, Driven::INTERRUPT, mode>; static constexpr auto TX_BUFFER_SIZE = 16; static constexpr auto RX_BUFFER_SIZE = 16; @@ -221,15 +221,15 @@ class Hardware1 { } }; -template -volatile detail::RingBuffer::data_t, - Hardware1::TX_BUFFER_SIZE> - Hardware1::sm_txBuf = {0, 0, {0}}; +template +volatile detail::RingBuffer::data_t, + Hardware1::TX_BUFFER_SIZE> + Hardware1::sm_txBuf = {0, 0, {0}}; -template -volatile detail::RingBuffer::data_t, - Hardware1::RX_BUFFER_SIZE> - Hardware1::sm_rxBuf = {0, 0, {0}}; +template +volatile detail::RingBuffer::data_t, + Hardware1::RX_BUFFER_SIZE> + Hardware1::sm_rxBuf = {0, 0, {0}}; #endif diff --git a/uart.hpp b/uart.hpp index a3cefe7..c56f541 100644 --- a/uart.hpp +++ b/uart.hpp @@ -369,11 +369,11 @@ class Uart { }; template > -using Uart0 = Uart>; +using Uart0 = Uart>; #ifdef HAS_UART1 template > -using Uart1 = Uart>; +using Uart1 = Uart>; #endif } // namespace uart