<commit_before>/* automaton
 * (c) 2013 <NAME>
 * The source code of this project is distributed under the terms of the
 * simplified BSD license. See the LICENSE file for details.
 */


#ifndef AUTOMATON_LCD_HD44780_H
#define AUTOMATON_LCD_HD44780_H


#include "std.h"


enum hd44780_instr {
	HD44780_INSTR_CLEAR      = 0,
	HD44780_INSTR_HOME       = 1,
	HD44780_INSTR_ENT_MODE   = 2,
	HD44780_INSTR_ONOFF      = 3,
	HD44780_INSTR_SHIFT      = 4,
	HD44780_INSTR_FUNC_SET   = 5,
	HD44780_INSTR_CGRAM_ADDR = 6,
	HD44780_INSTR_DDRAM_ADDR = 7,
};

enum hd44780_instr_bit {
	/* entry mode */
	HD44780_IBIT_S  = _BV(0),
	HD44780_IBIT_ID = _BV(1),
	
	/* on/off */
	HD44780_IBIT_B = _BV(0),
	HD44780_IBIT_C = _BV(1),
	HD44780_IBIT_D = _BV(2),
	
	/* shift */
	HD44780_IBIT_RL = _BV(2),
	HD44780_IBIT_SC = _BV(3),
	
	/* function set */
	HD44780_IBIT_F  = _BV(2),
	HD44780_IBIT_N  = _BV(3),
	HD44780_IBIT_DL = _BV(4),
	
	/* read addr */
	HD44780_IBIT_BF = _BV(7),
};

enum hd44780_param {
	/* entry mode: address increment/decrement */
	HD44780_ADDR_INCR = 0,
	HD44780_ADDR_DECR = HD44780_IBIT_ID,
	
	/* entry mode: display shift */
	HD44780_SHIFT_DISABLE = 0,
	HD44780_SHIFT_ENABLE  = HD44780_IBIT_S,
	
	/* on/off: display power */
	HD44780_DISPLAY_OFF = 0,
	HD44780_DISPLAY_ON  = HD44780_IBIT_D,
	
	/* on/off: cursor visibility */
	HD44780_CUR_HIDE = 0,
	HD44780_CUR_SHOW = HD44780_IBIT_C,
	
	/* on/off: cursor blink */
	HD44780_BLINK_OFF = 0,<commit_msg>lcd/hd44780: fix typo in friendly ID bit enum<commit_after>/* automaton
 * (c) 2013 <NAME>
 * The source code of this project is distributed under the terms of the
 * simplified BSD license. See the LICENSE file for details.
 */


#ifndef AUTOMATON_LCD_HD44780_H
#define AUTOMATON_LCD_HD44780_H


#include "std.h"


enum hd44780_instr {
	HD44780_INSTR_CLEAR      = 0,
	HD44780_INSTR_HOME       = 1,
	HD44780_INSTR_ENT_MODE   = 2,
	HD44780_INSTR_ONOFF      = 3,
	HD44780_INSTR_SHIFT      = 4,
	HD44780_INSTR_FUNC_SET   = 5,
	HD44780_INSTR_CGRAM_ADDR = 6,
	HD44780_INSTR_DDRAM_ADDR = 7,
};

enum hd44780_instr_bit {
	/* entry mode */
	HD44780_IBIT_S  = _BV(0),
	HD44780_IBIT_ID = _BV(1),
	
	/* on/off */
	HD44780_IBIT_B = _BV(0),
	HD44780_IBIT_C = _BV(1),
	HD44780_IBIT_D = _BV(2),
	
	/* shift */
	HD44780_IBIT_RL = _BV(2),
	HD44780_IBIT_SC = _BV(3),
	
	/* function set */
	HD44780_IBIT_F  = _BV(2),
	HD44780_IBIT_N  = _BV(3),
	HD44780_IBIT_DL = _BV(4),
	
	/* read addr */
	HD44780_IBIT_BF = _BV(7),
};

enum hd44780_param {
	/* entry mode: address increment/decrement */
	HD44780_ADDR_DECR = 0,
	HD44780_ADDR_INCR = HD44780_IBIT_ID,
	
	/* entry mode: display shift */
	HD44780_SHIFT_DISABLE = 0,
	HD44780_SHIFT_ENABLE  = HD44780_IBIT_S,
	
	/* on/off: display power */
	HD44780_DISPLAY_OFF = 0,
	HD44780_DISPLAY_ON  = HD44780_IBIT_D,
	
	/* on/off: cursor visibility */
	HD44780_CUR_HIDE = 0,
	HD44780_CUR_SHOW = HD44780_IBIT_C,
	
	/* on/off: cursor blink */
	HD44780_BLINK_OFF = 0,
{'fraction_non_alphanumeric': 0.10799726589200273, 'fraction_numerical': 0.14730006835269993, 'mean_word_length': 3.774877650897227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3663115', 'n_tokens_mistral': 1650, 'n_tokens_neox': 1328, 'n_words': 246}