reflow-oven-control-sw/stm-firmware/include/reflow-controller/ui/gui.h

69 lines
2.1 KiB
C
Raw Normal View History

/* Reflow Oven Controller
*
* Copyright (C) 2020 Mario Hüttel <mario.huettel@gmx.net>
*
* This file is part of the Reflow Oven Controller Project.
*
* The reflow oven controller is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* The Reflow Oven Control Firmware is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the reflow oven controller project.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GUI_H_
#define _GUI_H_
#include <stdint.h>
#include <stddef.h>
/**
* @brief Handle the reflow controller's LCD Menu
* @return 0 if no delay is requested, 1 if delay is requested
*/
int gui_handle(void);
/**
* @brief Initialize the GUI (LCD, button, and rotary encoder)
*/
void gui_init(void);
/**
* @brief Set a overlay message displayed on top of the root menu
* @param heading Heading of the overlay message (1st line)
* @param text Text of the overlay (the two bottom lines, 2 times 16 chars)
*/
void gui_root_menu_message_set(const char *heading, const char *text);
/**
* @brief Directly write to the LCD
*
* This function writes directly to the LCD and doesn't use the handling FSM in the
* background. Therefore, the function will block until all data is written to the LCD.
*
* @param line line to write to. Starts at 0
* @param text Text to write to the line
*/
void gui_lcd_write_direct_blocking(uint8_t line, const char *text);
/**
* @brief Get the vertical size of the display
* @return Count of rows
*/
size_t gui_get_line_count(void);
/**
* @brief Return the const char disp[][21] array contianing all display rows
* @note This directly returns the working buffer pointer. Do not change it!
*/
const char (*gui_get_current_display_content(void))[21];
#endif /* _GUI_H_ */