2020-06-01 21:45:36 +02:00
|
|
|
/* 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/>.
|
|
|
|
*/
|
|
|
|
|
2020-11-29 19:01:24 +01:00
|
|
|
#ifndef _GUI_H_
|
|
|
|
#define _GUI_H_
|
2020-06-01 21:45:36 +02:00
|
|
|
|
2021-05-22 11:34:33 +02:00
|
|
|
#include <stdint.h>
|
2021-10-24 14:47:52 +02:00
|
|
|
#include <stddef.h>
|
2021-05-22 11:34:33 +02:00
|
|
|
|
2020-06-12 01:35:37 +02:00
|
|
|
/**
|
|
|
|
* @brief Handle the reflow controller's LCD Menu
|
2020-06-14 01:31:44 +02:00
|
|
|
* @return 0 if no delay is requested, 1 if delay is requested
|
2020-06-12 01:35:37 +02:00
|
|
|
*/
|
2020-11-29 19:01:24 +01:00
|
|
|
int gui_handle(void);
|
2020-06-12 01:35:37 +02:00
|
|
|
|
2021-10-24 14:47:52 +02:00
|
|
|
/**
|
|
|
|
* @brief Initialize the GUI (LCD, button, and rotary encoder)
|
|
|
|
*/
|
2020-11-29 19:01:24 +01:00
|
|
|
void gui_init(void);
|
2020-06-12 01:35:37 +02:00
|
|
|
|
2021-10-24 14:47:52 +02:00
|
|
|
/**
|
|
|
|
* @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)
|
|
|
|
*/
|
2021-05-22 00:14:56 +02:00
|
|
|
void gui_root_menu_message_set(const char *heading, const char *text);
|
|
|
|
|
2021-10-24 14:47:52 +02:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
2021-05-22 11:34:33 +02:00
|
|
|
void gui_lcd_write_direct_blocking(uint8_t line, const char *text);
|
|
|
|
|
2021-10-24 14:47:52 +02:00
|
|
|
/**
|
|
|
|
* @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];
|
|
|
|
|
2020-11-29 19:01:24 +01:00
|
|
|
#endif /* _GUI_H_ */
|