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
435c8eb07b
, where the busy flag check was
fixed.
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
This commit is contained in:
parent
bc48704477
commit
1ba8dd6b86
12
lcdLib.c
12
lcdLib.c
|
@ -396,20 +396,16 @@ void initLCD (void) {
|
||||||
/* BF now can be checked */
|
/* BF now can be checked */
|
||||||
|
|
||||||
// Set functions of LCD
|
// Set functions of LCD
|
||||||
writeLCDInstr_(INSTR_DISPLAY); // Display off
|
writeLCDInstr(INSTR_DISPLAY); // Display off
|
||||||
_delay_us(LCD_GENERIC_INSTR_DELAY);
|
|
||||||
|
|
||||||
// Clear display
|
// Clear display
|
||||||
writeLCDInstr_(CMD_CLEAR_DISPLAY);
|
writeLCDInstr(CMD_CLEAR_DISPLAY);
|
||||||
_delay_us(LCD_CLEAR_DISPLAY_DELAY);
|
|
||||||
|
|
||||||
// Increment mode, no shift
|
// Increment mode, no shift
|
||||||
writeLCDInstr_(INSTR_ENTRY_SET | (1 << INSTR_ENTRY_SET_ID));
|
writeLCDInstr(INSTR_ENTRY_SET | (1 << INSTR_ENTRY_SET_ID));
|
||||||
_delay_us(LCD_GENERIC_INSTR_DELAY);
|
|
||||||
|
|
||||||
// Display on, cursor on, blink off
|
// Display on, cursor on, blink off
|
||||||
writeLCDInstr_(INSTR_DISPLAY | (1 << INSTR_DISPLAY_D) | (1 << INSTR_DISPLAY_C));
|
writeLCDInstr(INSTR_DISPLAY | (1 << INSTR_DISPLAY_D) | (1 << INSTR_DISPLAY_C));
|
||||||
_delay_us(LCD_GENERIC_INSTR_DELAY);
|
|
||||||
|
|
||||||
flashLED(5); // DEBUG
|
flashLED(5); // DEBUG
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue