From 1ba8dd6b86ddda3a460162a63652842da21e8b37 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Thu, 15 Oct 2015 02:07:19 -0400 Subject: [PATCH] Replaced unnecessary delays with BF check in init In the function initLCD, since the loop_until_LCD_BF_clear is working, there is no need for manual delays at a point through the software initialization. This fix is a remnant of commit 435c8eb07b16b22b88b200fedf187e1a1c26619e, where the busy flag check was fixed. Signed-off-by: Collin J. Doering --- lcdLib.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lcdLib.c b/lcdLib.c index 4456cb7..9a6ca4d 100644 --- a/lcdLib.c +++ b/lcdLib.c @@ -396,20 +396,16 @@ void initLCD (void) { /* BF now can be checked */ // Set functions of LCD - writeLCDInstr_(INSTR_DISPLAY); // Display off - _delay_us(LCD_GENERIC_INSTR_DELAY); + writeLCDInstr(INSTR_DISPLAY); // Display off // Clear display - writeLCDInstr_(CMD_CLEAR_DISPLAY); - _delay_us(LCD_CLEAR_DISPLAY_DELAY); + writeLCDInstr(CMD_CLEAR_DISPLAY); // Increment mode, no shift - writeLCDInstr_(INSTR_ENTRY_SET | (1 << INSTR_ENTRY_SET_ID)); - _delay_us(LCD_GENERIC_INSTR_DELAY); + writeLCDInstr(INSTR_ENTRY_SET | (1 << INSTR_ENTRY_SET_ID)); // Display on, cursor on, blink off - writeLCDInstr_(INSTR_DISPLAY | (1 << INSTR_DISPLAY_D) | (1 << INSTR_DISPLAY_C)); - _delay_us(LCD_GENERIC_INSTR_DELAY); + writeLCDInstr(INSTR_DISPLAY | (1 << INSTR_DISPLAY_D) | (1 << INSTR_DISPLAY_C)); flashLED(5); // DEBUG }