|
2 | 2 | /** |
3 | 3 | * @file minbasecli_avr.cpp |
4 | 4 | * @author Jose Miguel Rios Rubio <[email protected]> |
5 | | - * @date 08-02-2022 |
6 | | - * @version 1.0.1 |
| 5 | + * @date 10-02-2022 |
| 6 | + * @version 1.0.2 |
7 | 7 | * |
8 | 8 | * @section DESCRIPTION |
9 | 9 | * |
@@ -106,39 +106,6 @@ bool MINBASECLI_AVR::hal_setup(void* iface, const uint32_t baud_rate) |
106 | 106 | return hal_setup(baud_rate); |
107 | 107 | } |
108 | 108 |
|
109 | | -/** |
110 | | - * @brief Print a given string through the CLI HAL interface. |
111 | | - * @param str String to print. |
112 | | - */ |
113 | | -void MINBASECLI_AVR::hal_iface_print(const char* str) |
114 | | -{ |
115 | | - _IFACE* _Serial = (_IFACE*) this->iface; |
116 | | - |
117 | | - // Write each byte until end of string |
118 | | - while (*str != '\0') |
119 | | - { |
120 | | - _Serial->write(*str); |
121 | | - str = str + 1; |
122 | | - } |
123 | | -} |
124 | | - |
125 | | -/** |
126 | | - * @brief Print line a given string through the CLI HAL interface. |
127 | | - * @param str String to print. |
128 | | - */ |
129 | | -void MINBASECLI_AVR::hal_iface_println(const char* str) |
130 | | -{ |
131 | | - _IFACE* _Serial = (_IFACE*) this->iface; |
132 | | - |
133 | | - // Write each byte until end of string |
134 | | - while (*str != '\0') |
135 | | - { |
136 | | - _Serial->write(*str); |
137 | | - str = str + 1; |
138 | | - } |
139 | | - _Serial->write((uint8_t)('\n')); |
140 | | -} |
141 | | - |
142 | 109 | /** |
143 | 110 | * @brief Check if the internal CLI HAL interface has received any data. |
144 | 111 | * @return The number of bytes received by the interface. |
@@ -166,6 +133,17 @@ uint8_t MINBASECLI_AVR::hal_iface_read() |
166 | 133 | return read_byte; |
167 | 134 | } |
168 | 135 |
|
| 136 | +/** |
| 137 | + * @brief Print a byte with ASCII encode to CLI HAL interface. |
| 138 | + * @param data_byte Byte of data to write. |
| 139 | + */ |
| 140 | +void MINBASECLI_AVR::hal_iface_print(const uint8_t data_byte) |
| 141 | +{ |
| 142 | + _IFACE* _Serial = (_IFACE*) this->iface; |
| 143 | + |
| 144 | + _Serial->write(data_byte); |
| 145 | +} |
| 146 | + |
169 | 147 | /** |
170 | 148 | * @brief Timer1 setup and initialization to count System Tick. |
171 | 149 | */ |
|
0 commit comments