Make twi timer local to the wait function
This commit is contained in:
parent
0172cbdf8b
commit
1e0f414d41
|
|
@ -62,7 +62,7 @@ static void twi_stop()
|
||||||
|
|
||||||
static uint8_t twi_wait(uint8_t status)
|
static uint8_t twi_wait(uint8_t status)
|
||||||
{
|
{
|
||||||
static ShortTimer timmy;
|
ShortTimer timmy;
|
||||||
timmy.start();
|
timmy.start();
|
||||||
while(!(TWCR & _BV(TWINT))) {
|
while(!(TWCR & _BV(TWINT))) {
|
||||||
if (timmy.expired(TWI_TIMEOUT_MS)) {
|
if (timmy.expired(TWI_TIMEOUT_MS)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue