Changed template parameter order

This commit is contained in:
2019-08-05 20:05:59 +02:00
parent 87e6936051
commit c4f38cbcdf
4 changed files with 30 additions and 30 deletions

View File

@@ -77,7 +77,7 @@ extern void (*fnDataReg1EmptyIntHandler)();
#ifdef HAS_UART1
template <Mode mode = Mode::ASYNCHRONOUS, class cfg = Config<>, Driven driven = Driven::INTERRUPT>
template <class cfg = Config<>, 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::Registers1, detail::ControlFlagsA1, detail::ControlFlagsB1,
detail::ControlFlagsC1, cfg, mode, driven>;
detail::ControlFlagsC1, cfg, driven, mode>;
};
template <Mode mode, class cfg>
class Hardware1<mode, cfg, Driven::INTERRUPT> {
template <class cfg, Mode mode>
class Hardware1<cfg, Driven::INTERRUPT, mode> {
public:
using data_t = typename cfg::data_t;
static constexpr auto DATA_BITS = cfg::DATA_BITS;
@@ -192,7 +192,7 @@ class Hardware1<mode, cfg, Driven::INTERRUPT> {
private:
using HardwareImpl = detail::Hardware<detail::Registers1, detail::ControlFlagsA1, detail::ControlFlagsB1,
detail::ControlFlagsC1, cfg, mode, Driven::INTERRUPT>;
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<mode, cfg, Driven::INTERRUPT> {
}
};
template <Mode mode, class cfg>
volatile detail::RingBuffer<typename Hardware1<mode, cfg, Driven::INTERRUPT>::data_t,
Hardware1<mode, cfg, Driven::INTERRUPT>::TX_BUFFER_SIZE>
Hardware1<mode, cfg, Driven::INTERRUPT>::sm_txBuf = {0, 0, {0}};
template <class cfg, Mode mode>
volatile detail::RingBuffer<typename Hardware1<cfg, Driven::INTERRUPT, mode>::data_t,
Hardware1<cfg, Driven::INTERRUPT, mode>::TX_BUFFER_SIZE>
Hardware1<cfg, Driven::INTERRUPT, mode>::sm_txBuf = {0, 0, {0}};
template <Mode mode, class cfg>
volatile detail::RingBuffer<typename Hardware1<mode, cfg, Driven::INTERRUPT>::data_t,
Hardware1<mode, cfg, Driven::INTERRUPT>::RX_BUFFER_SIZE>
Hardware1<mode, cfg, Driven::INTERRUPT>::sm_rxBuf = {0, 0, {0}};
template <class cfg, Mode mode>
volatile detail::RingBuffer<typename Hardware1<cfg, Driven::INTERRUPT, mode>::data_t,
Hardware1<cfg, Driven::INTERRUPT, mode>::RX_BUFFER_SIZE>
Hardware1<cfg, Driven::INTERRUPT, mode>::sm_rxBuf = {0, 0, {0}};
#endif