implement display update function for lcd menu
This commit is contained in:
parent
7db5f02067
commit
917497e7e4
@ -18,4 +18,25 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <reflow-controller/lcd-menu.h>
|
#include <reflow-controller/lcd-menu.h>
|
||||||
|
#include <reflow-controller/ui/menu.h>
|
||||||
|
#include <reflow-controller/ui/lcd.h>
|
||||||
|
|
||||||
|
static char display_buffer[4][21] = {0};
|
||||||
|
|
||||||
|
static void update_display_buffer(uint8_t row, const char *data)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (row > 4)
|
||||||
|
return;
|
||||||
|
if (!data)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; data[i] && i < LCD_CHAR_WIDTH; i++) {
|
||||||
|
display_buffer[row][i] = data[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
display_buffer[row][i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user