Beispiel #1
0
/*
 * Wait until the busy flag is cleared.
 */
void
hd44780_wait_ready(bool longwait)
{
#if USE_BUSY_BIT
  while (hd44780_incmd() & HD44780_BUSYFLAG) ;
#else
  if (longwait)
    _delay_ms(1.52);
  else
    _delay_us(37);
#endif
}
Beispiel #2
0
/*
 * Wait until the busy flag is cleared.
 */
void
hd44780_wait_ready(void)
{
  uint16_t cnt=30000; // With 1us/read this is 30ms+, should be enough.
  while ((hd44780_incmd() & HD44780_BUSYFLAG)&&(cnt)) cnt--;
}