2020-02-23 21:06:42 +01: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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LCD_H__
|
|
|
|
#define __LCD_H__
|
|
|
|
|
2021-05-22 11:34:33 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-02-23 21:22:38 +01:00
|
|
|
#define LCD_DPORT (GPIOD)
|
|
|
|
#define LCD_RCC_MASK RCC_AHB1ENR_GPIODEN
|
|
|
|
#define LCD_DATA_BIT_OFFSET (8)
|
|
|
|
#define LCD_RS (6)
|
|
|
|
#define LCD_E (7)
|
|
|
|
|
|
|
|
#define LCD_DATA_MASK (0xFU << LCD_DATA_BIT_OFFSET)
|
|
|
|
#define LCD_RS_MASK (1U << LCD_RS)
|
|
|
|
#define LCD_E_MASK (1U << LCD_E)
|
|
|
|
|
2020-06-01 21:42:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
#define LCD_CHAR_WIDTH 16
|
|
|
|
#define LCD_ROW_COUNT 4
|
|
|
|
|
2020-06-11 23:58:51 +02:00
|
|
|
#define LCD_SHIMATTA_STRING "\xBC\xCF\xAF\xC0"
|
|
|
|
#define LCD_DEGREE_SYMBOL_STRING "\xDF"
|
|
|
|
#define LCD_DEGREE_SYMBOL_CHAR '\xDF'
|
2020-06-16 20:05:32 +02:00
|
|
|
#define LCD_OHM_SYMBOL_CHAR '\xF4'
|
|
|
|
#define LCD_OHM_SYMBOL_STRING "\xF4"
|
2020-06-11 23:58:51 +02:00
|
|
|
|
2020-05-02 19:10:20 +02:00
|
|
|
enum lcd_fsm_ret {LCD_FSM_NOP, LCD_FSM_CALL_AGAIN, LCD_FSM_WAIT_CALL};
|
|
|
|
|
|
|
|
void lcd_init(void);
|
|
|
|
|
|
|
|
void lcd_string(const char *data);
|
|
|
|
|
2021-05-22 11:34:33 +02:00
|
|
|
void lcd_setcursor(uint8_t x, uint8_t y);
|
|
|
|
|
2020-05-02 19:10:20 +02:00
|
|
|
void lcd_home(void);
|
|
|
|
|
|
|
|
enum lcd_fsm_ret lcd_fsm_write_buffer(const char (*display_buffer)[21]);
|
|
|
|
|
2020-02-23 21:06:42 +01:00
|
|
|
#endif /* __LCD_H__ */
|