diff options
| author | QMK Bot <hello@qmk.fm> | 2022-03-19 04:52:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-19 11:52:03 +0000 |
| commit | 98e783cc3ca76b542093bab9b0939030fd3cfba7 (patch) | |
| tree | 48d47c37919c507df1c7ad9e287fbce062850fc3 | |
| parent | 9ee2effe8e61d32524b11092a0d04a96972c1493 (diff) | |
Format code according to conventions (#16686)
| -rw-r--r-- | drivers/lcd/hd44780.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/lcd/hd44780.h b/drivers/lcd/hd44780.h index d4b8f9ea76..9e43339344 100644 --- a/drivers/lcd/hd44780.h +++ b/drivers/lcd/hd44780.h | |||
| @@ -33,34 +33,34 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 33 | * Table 6 (p24) | 33 | * Table 6 (p24) |
| 34 | */ | 34 | */ |
| 35 | // Clear display | 35 | // Clear display |
| 36 | #define HD44780_CMD_CLEAR_DISPLAY 0x01 | 36 | #define HD44780_CMD_CLEAR_DISPLAY 0x01 |
| 37 | // Return home | 37 | // Return home |
| 38 | #define HD44780_CMD_RETURN_HOME 0x02 | 38 | #define HD44780_CMD_RETURN_HOME 0x02 |
| 39 | // Entry mode set | 39 | // Entry mode set |
| 40 | #define HD44780_CMD_ENTRY_MODE 0x04 | 40 | #define HD44780_CMD_ENTRY_MODE 0x04 |
| 41 | #define HD44780_ENTRY_MODE_INC 0x02 // I/D | 41 | #define HD44780_ENTRY_MODE_INC 0x02 // I/D |
| 42 | #define HD44780_ENTRY_MODE_SHIFT 0x01 // S | 42 | #define HD44780_ENTRY_MODE_SHIFT 0x01 // S |
| 43 | // Display on/off control | 43 | // Display on/off control |
| 44 | #define HD44780_CMD_DISPLAY 0x08 | 44 | #define HD44780_CMD_DISPLAY 0x08 |
| 45 | #define HD44780_DISPLAY_ON 0x04 // D | 45 | #define HD44780_DISPLAY_ON 0x04 // D |
| 46 | #define HD44780_DISPLAY_CURSOR 0x02 // C | 46 | #define HD44780_DISPLAY_CURSOR 0x02 // C |
| 47 | #define HD44780_DISPLAY_BLINK 0x01 // B | 47 | #define HD44780_DISPLAY_BLINK 0x01 // B |
| 48 | // Cursor or display shift | 48 | // Cursor or display shift |
| 49 | #define HD44780_CMD_MOVE 0x10 | 49 | #define HD44780_CMD_MOVE 0x10 |
| 50 | #define HD44780_MOVE_DISPLAY 0x08 // S/C | 50 | #define HD44780_MOVE_DISPLAY 0x08 // S/C |
| 51 | #define HD44780_MOVE_RIGHT 0x04 // R/L | 51 | #define HD44780_MOVE_RIGHT 0x04 // R/L |
| 52 | // Function set | 52 | // Function set |
| 53 | #define HD44780_CMD_FUNCTION 0x20 | 53 | #define HD44780_CMD_FUNCTION 0x20 |
| 54 | #define HD44780_FUNCTION_8_BIT 0x10 // DL | 54 | #define HD44780_FUNCTION_8_BIT 0x10 // DL |
| 55 | #define HD44780_FUNCTION_2_LINES 0x08 // N | 55 | #define HD44780_FUNCTION_2_LINES 0x08 // N |
| 56 | #define HD44780_FUNCTION_5X10_DOTS 0x04 // F | 56 | #define HD44780_FUNCTION_5X10_DOTS 0x04 // F |
| 57 | // Set CGRAM address | 57 | // Set CGRAM address |
| 58 | #define HD44780_CMD_SET_CGRAM_ADDRESS 0x40 | 58 | #define HD44780_CMD_SET_CGRAM_ADDRESS 0x40 |
| 59 | // Set DDRAM address | 59 | // Set DDRAM address |
| 60 | #define HD44780_CMD_SET_DDRAM_ADDRESS 0x80 | 60 | #define HD44780_CMD_SET_DDRAM_ADDRESS 0x80 |
| 61 | 61 | ||
| 62 | // Bitmask for busy flag when reading | 62 | // Bitmask for busy flag when reading |
| 63 | #define HD44780_BUSY_FLAG 0x80 | 63 | #define HD44780_BUSY_FLAG 0x80 |
| 64 | 64 | ||
| 65 | /** | 65 | /** |
| 66 | * \brief Write a byte to the display. | 66 | * \brief Write a byte to the display. |
| @@ -72,7 +72,7 @@ void hd44780_write(uint8_t data, bool isData); | |||
| 72 | 72 | ||
| 73 | /** | 73 | /** |
| 74 | * \brief Read a byte from the display. | 74 | * \brief Read a byte from the display. |
| 75 | * | 75 | * |
| 76 | * \param isData Whether to read the current cursor position, or the character at the cursor. | 76 | * \param isData Whether to read the current cursor position, or the character at the cursor. |
| 77 | * | 77 | * |
| 78 | * \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. | 78 | * \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); | |||
| 90 | * \brief Send a command to the display. Refer to the datasheet for the valid commands. | 90 | * \brief Send a command to the display. Refer to the datasheet for the valid commands. |
| 91 | * | 91 | * |
| 92 | * This function waits for the display to clear the busy flag before sending the command. | 92 | * This function waits for the display to clear the busy flag before sending the command. |
| 93 | * | 93 | * |
| 94 | * \param command The command to send. | 94 | * \param command The command to send. |
| 95 | */ | 95 | */ |
| 96 | void hd44780_command(uint8_t command); | 96 | void hd44780_command(uint8_t command); |
| @@ -163,7 +163,7 @@ void hd44780_init(bool cursor, bool blink); | |||
| 163 | 163 | ||
| 164 | /** | 164 | /** |
| 165 | * \brief Move the cursor to the specified position on the display. | 165 | * \brief Move the cursor to the specified position on the display. |
| 166 | * | 166 | * |
| 167 | * \param col The column number to move to, from 0 to 15 on 16x2 displays. | 167 | * \param col The column number to move to, from 0 to 15 on 16x2 displays. |
| 168 | * \param line The line number to move to, either 0 or 1 on 16x2 displays. | 168 | * \param line The line number to move to, either 0 or 1 on 16x2 displays. |
| 169 | */ | 169 | */ |
| @@ -179,7 +179,7 @@ void hd44780_define_char(uint8_t index, uint8_t *data); | |||
| 179 | 179 | ||
| 180 | /** | 180 | /** |
| 181 | * \brief Print a character to the display. The newline character will move the cursor to the start of the next line. | 181 | * \brief Print a character to the display. The newline character will move the cursor to the start of the next line. |
| 182 | * | 182 | * |
| 183 | * The exact character shown may depend on the ROM code of your particular display - refer to the datasheet for the full character set. | 183 | * The exact character shown may depend on the ROM code of your particular display - refer to the datasheet for the full character set. |
| 184 | * | 184 | * |
| 185 | * \param c The character to print. | 185 | * \param c The character to print. |
