From fd7e8e72389dbef3738822974393345a7c981730 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sun, 28 Jul 2019 14:09:09 +0200 Subject: [PATCH] Added driving parameter --- hardware0.hpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hardware0.hpp b/hardware0.hpp index 16e6fff..81aa614 100644 --- a/hardware0.hpp +++ b/hardware0.hpp @@ -12,11 +12,16 @@ enum class Mode { SPI, }; -template +enum class Driven { + INTERRUPT, + BLOCKING, +}; + +template , Driven driven = Driven::INTERRUPT> class hardware0 { public: - using data_t = typename config::data_t; - static constexpr auto DATA_BITS = config::DATA_BITS; + using data_t = typename cfg::data_t; + static constexpr auto DATA_BITS = cfg::DATA_BITS; static void init() {} @@ -30,9 +35,9 @@ class hardware0 { static data_t peek() {} private: - static constexpr auto BAUD_RATE = config::BAUD_RATE; - static constexpr auto PARITY = config::PARITY; - static constexpr auto STOP_BITS = config::STOP_BITS; + static constexpr auto BAUD_RATE = cfg::BAUD_RATE; + static constexpr auto PARITY = cfg::PARITY; + static constexpr auto STOP_BITS = cfg::STOP_BITS; }; } // namespace uart