optimisation: Tighter LCD timing
Author: leptun Change in memory: Flash: -14 bytes SRAM: 0 bytes
This commit is contained in:
parent
5288d615f8
commit
6623d45af9
|
|
@ -129,18 +129,17 @@ static void lcd_send(uint8_t data, uint8_t flags, uint16_t duration = LCD_DEFAUL
|
||||||
_delay_us(5);
|
_delay_us(5);
|
||||||
lcd_writebits(data);
|
lcd_writebits(data);
|
||||||
#ifndef LCD_8BIT
|
#ifndef LCD_8BIT
|
||||||
if (!(flags & LCD_HALF_FLAG))
|
if (!(flags & LCD_HALF_FLAG)) {
|
||||||
{
|
// _delay_us(LCD_DEFAULT_DELAY); // should not be needed when sending a two nibble instruction.
|
||||||
_delay_us(LCD_DEFAULT_DELAY);
|
lcd_writebits((data << 4) | (data >> 4)); //force efficient swap opcode even though the lower nibble is ignored in this case
|
||||||
lcd_writebits(data<<4);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
delayMicroseconds(duration);
|
delayMicroseconds(duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_command(uint8_t value, uint16_t delayExtra = 0)
|
static void lcd_command(uint8_t value, uint16_t duration = LCD_DEFAULT_DELAY)
|
||||||
{
|
{
|
||||||
lcd_send(value, LOW, LCD_DEFAULT_DELAY + delayExtra);
|
lcd_send(value, LOW, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_write(uint8_t value)
|
static void lcd_write(uint8_t value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue