add yield(), issue #530

This commit is contained in:
kraus 2018-08-23 22:38:50 +02:00
parent 22424d1862
commit 120decefd8
1 changed files with 5 additions and 0 deletions

View File

@ -147,6 +147,11 @@ extern "C" uint8_t u8x8_gpio_and_delay_arduino(u8x8_t *u8x8, uint8_t msg, uint8_
}
else
{
if ( u8x8_GetPinIndex(u8x8, msg) == U8X8_PIN_OUTPUT_CNT )
{
// call yield() for the first pin only, u8x8 will always request all the pins, so this should be ok
yield();
}
u8x8_SetGPIOResult(u8x8, digitalRead(i) == 0 ? 0 : 1);
}
}