Browse Source

Format code according to conventions (#16686)

pull/16702/head
QMK Bot 2 years ago
committed by GitHub
parent
commit
98e783cc3c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 23 deletions
  1. +23
    -23
      drivers/lcd/hd44780.h

+ 23
- 23
drivers/lcd/hd44780.h View File

@ -33,34 +33,34 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* Table 6 (p24)
*/
// Clear display
#define HD44780_CMD_CLEAR_DISPLAY 0x01
#define HD44780_CMD_CLEAR_DISPLAY 0x01
// Return home
#define HD44780_CMD_RETURN_HOME 0x02
#define HD44780_CMD_RETURN_HOME 0x02
// Entry mode set
#define HD44780_CMD_ENTRY_MODE 0x04
#define HD44780_ENTRY_MODE_INC 0x02 // I/D
#define HD44780_ENTRY_MODE_SHIFT 0x01 // S
#define HD44780_CMD_ENTRY_MODE 0x04
#define HD44780_ENTRY_MODE_INC 0x02 // I/D
#define HD44780_ENTRY_MODE_SHIFT 0x01 // S
// Display on/off control
#define HD44780_CMD_DISPLAY 0x08
#define HD44780_DISPLAY_ON 0x04 // D
#define HD44780_DISPLAY_CURSOR 0x02 // C
#define HD44780_DISPLAY_BLINK 0x01 // B
#define HD44780_CMD_DISPLAY 0x08
#define HD44780_DISPLAY_ON 0x04 // D
#define HD44780_DISPLAY_CURSOR 0x02 // C
#define HD44780_DISPLAY_BLINK 0x01 // B
// Cursor or display shift
#define HD44780_CMD_MOVE 0x10
#define HD44780_MOVE_DISPLAY 0x08 // S/C
#define HD44780_MOVE_RIGHT 0x04 // R/L
#define HD44780_CMD_MOVE 0x10
#define HD44780_MOVE_DISPLAY 0x08 // S/C
#define HD44780_MOVE_RIGHT 0x04 // R/L
// Function set
#define HD44780_CMD_FUNCTION 0x20
#define HD44780_FUNCTION_8_BIT 0x10 // DL
#define HD44780_FUNCTION_2_LINES 0x08 // N
#define HD44780_FUNCTION_5X10_DOTS 0x04 // F
#define HD44780_CMD_FUNCTION 0x20
#define HD44780_FUNCTION_8_BIT 0x10 // DL
#define HD44780_FUNCTION_2_LINES 0x08 // N
#define HD44780_FUNCTION_5X10_DOTS 0x04 // F
// Set CGRAM address
#define HD44780_CMD_SET_CGRAM_ADDRESS 0x40
#define HD44780_CMD_SET_CGRAM_ADDRESS 0x40
// Set DDRAM address
#define HD44780_CMD_SET_DDRAM_ADDRESS 0x80
#define HD44780_CMD_SET_DDRAM_ADDRESS 0x80
// Bitmask for busy flag when reading
#define HD44780_BUSY_FLAG 0x80
#define HD44780_BUSY_FLAG 0x80
/**
* \brief Write a byte to the display.
@ -72,7 +72,7 @@ void hd44780_write(uint8_t data, bool isData);
/**
* \brief Read a byte from the display.
*
*
* \param isData Whether to read the current cursor position, or the character at the cursor.
*
* \return If `isData` is `true`, the returned byte will be the character at the current DDRAM address. Otherwise, it will be the current DDRAM address and the busy flag.
@ -90,7 +90,7 @@ bool hd44780_busy(void);
* \brief Send a command to the display. Refer to the datasheet for the valid commands.
*
* This function waits for the display to clear the busy flag before sending the command.
*
*
* \param command The command to send.
*/
void hd44780_command(uint8_t command);
@ -163,7 +163,7 @@ void hd44780_init(bool cursor, bool blink);
/**
* \brief Move the cursor to the specified position on the display.
*
*
* \param col The column number to move to, from 0 to 15 on 16x2 displays.
* \param line The line number to move to, either 0 or 1 on 16x2 displays.
*/
@ -179,7 +179,7 @@ void hd44780_define_char(uint8_t index, uint8_t *data);
/**
* \brief Print a character to the display. The newline character will move the cursor to the start of the next line.
*
*
* The exact character shown may depend on the ROM code of your particular display - refer to the datasheet for the full character set.
*
* \param c The character to print.


Loading…
Cancel
Save