DEV: a liquid crystal display driver added
This commit is contained in:
parent
e02f7dad6b
commit
887bbf391e
@ -58,6 +58,7 @@ namespace tbx {
|
|||||||
* \tparam Impl_t The derived class
|
* \tparam Impl_t The derived class
|
||||||
* \tparam Lines The lines of the LCD
|
* \tparam Lines The lines of the LCD
|
||||||
* \tparam Columns The coluns of the LCD
|
* \tparam Columns The coluns of the LCD
|
||||||
|
* \tparam BusSize The LCD bus size (4 or 8 bits)
|
||||||
*/
|
*/
|
||||||
template <typename Impl_t, size_t Lines, size_t Columns, size_t BusSize =4>
|
template <typename Impl_t, size_t Lines, size_t Columns, size_t BusSize =4>
|
||||||
class liquid_crystal : public Print<liquid_crystal<Impl_t, Lines, Columns, BusSize>, char>{
|
class liquid_crystal : public Print<liquid_crystal<Impl_t, Lines, Columns, BusSize>, char>{
|
||||||
@ -66,7 +67,8 @@ namespace tbx {
|
|||||||
static_assert((BusSize == 4) || (BusSize == 8), "BusSize must be either 4 or 8.");
|
static_assert((BusSize == 4) || (BusSize == 8), "BusSize must be either 4 or 8.");
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
constexpr static size_t lines = Lines;
|
||||||
|
constexpr static size_t columns = Columns;
|
||||||
/*!
|
/*!
|
||||||
* Public enumerator to be used as argument to the init() function.
|
* Public enumerator to be used as argument to the init() function.
|
||||||
* Selects the font size and thus the number of active lines
|
* Selects the font size and thus the number of active lines
|
||||||
@ -475,7 +477,7 @@ namespace tbx {
|
|||||||
home ();
|
home ();
|
||||||
break;
|
break;
|
||||||
case '\f':
|
case '\f':
|
||||||
set_cursor (1, 1);
|
clear();
|
||||||
break;
|
break;
|
||||||
case '\b':
|
case '\b':
|
||||||
--cursor_;
|
--cursor_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user