Removed unnecessary const qualifiers in template
This commit is contained in:
parent
29b4d85ce3
commit
2bbba0fcbd
@ -23,7 +23,7 @@ enum class Parity {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <const DataBits dataBits>
|
||||
template <DataBits dataBits>
|
||||
struct choose_data_type {
|
||||
using type = uint8_t;
|
||||
};
|
||||
@ -35,8 +35,8 @@ struct choose_data_type<DataBits::NINE> {
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <const uint32_t baudRate = 9600, const DataBits dataBits = DataBits::EIGHT, const Parity parity = Parity::NONE,
|
||||
const StopBits stopBits = StopBits::ONE>
|
||||
template <uint32_t baudRate = 9600, DataBits dataBits = DataBits::EIGHT, Parity parity = Parity::NONE,
|
||||
StopBits stopBits = StopBits::ONE>
|
||||
struct config {
|
||||
static constexpr auto BAUD_RATE = baudRate;
|
||||
static constexpr auto DATA_BITS = dataBits;
|
||||
|
@ -12,7 +12,7 @@ enum class Mode {
|
||||
SPI,
|
||||
};
|
||||
|
||||
template <const Mode mode, class config>
|
||||
template <Mode mode, class config>
|
||||
class hardware0 {
|
||||
public:
|
||||
using data_t = typename config::data_t;
|
||||
|
@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.hpp"
|
||||
|
||||
#include "../io/io.hpp"
|
||||
|
||||
namespace uart {
|
||||
|
||||
template <const io::P rxPin, const io::P txPin, class config>
|
||||
template <io::P rxPin, io::P txPin, class cfg = config<>>
|
||||
class software {
|
||||
public:
|
||||
using data_t = typename config::data_t;
|
||||
|
Loading…
Reference in New Issue
Block a user