コード例 #1
0
ファイル: hd44780-8b.c プロジェクト: poizan42/awesome-lights
/*
 * 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
}
コード例 #2
0
ファイル: hd44780.c プロジェクト: urjaman/carlcdp
/*
 * 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--;
}