libs/avr_lib/devices/hd44780.c
void __wait()
{
    __setDataInput();
    __selInstrReg();
    uint8_t busy;
    do
    {
        _delay_us(1);
        GPIO_setValueLow(&((GPIO_TypeDef)EN));
        _delay_us(1);
        GPIO_setValueHigh(&((GPIO_TypeDef)EN));
        _delay_us(1);
        busy = GPIO_getInput(&((GPIO_TypeDef)D7));
#ifdef _4BIT_MODE
        GPIO_setValueLow(&((GPIO_TypeDef)EN));
        _delay_us(1);
        GPIO_setValueHigh(&((GPIO_TypeDef)EN));
#endif
    } while (busy);

    GPIO_setValueLow(&((GPIO_TypeDef)EN));
    __setDataOutput();
}
// wait until the devices has finished processing last command
wait until the devices has finished processing last command
wait until the devices has finished processing last command
void __wait()
{
    __setDataInput();
    __selInstrReg();
    uint8_t busy;
    do
    {
        _delay_us(1);
        GPIO_setValueLow(&((GPIO_TypeDef)EN));
        _delay_us(1);
        GPIO_setValueHigh(&((GPIO_TypeDef)EN));
        _delay_us(1);
        busy = GPIO_getInput(&((GPIO_TypeDef)D7));
#ifdef _4BIT_MODE
        GPIO_setValueLow(&((GPIO_TypeDef)EN));
        _delay_us(1);
        GPIO_setValueHigh(&((GPIO_TypeDef)EN));
#endif
    } while (busy);
    GPIO_setValueLow(&((GPIO_TypeDef)EN));
    __setDataOutput();
}
void __wait ( ) { __setDataInput ( ) ; __selInstrReg ( ) ; uint8_t busy ; do { _delay_us ( 1 ) ; GPIO_setValueLow ( & ( ( GPIO_TypeDef ) EN ) ) ; _delay_us ( 1 ) ; GPIO_setValueHigh ( & ( ( GPIO_TypeDef ) EN ) ) ; _delay_us ( 1 ) ; busy = GPIO_getInput ( & ( ( GPIO_TypeDef ) D7 ) ) ; #ifdef _4BIT_MODE GPIO_setValueLow ( & ( ( GPIO_TypeDef ) EN ) ) ; _delay_us ( 1 ) ; GPIO_setValueHigh ( & ( ( GPIO_TypeDef ) EN ) ) ; #endif } while ( busy ) ; GPIO_setValueLow ( & ( ( GPIO_TypeDef ) EN ) ) ; __setDataOutput ( ) ; }
wait until the devices has finished processing last command
wait until the devices has finished processing last command