bool sioWait()
{
// 50 ms timeout
REG_TM0CNT = TIMER_FREQ_16KHZ;
REG_TM0VAL = 65536 - 819;
REG_TM1CNT = TIMER_FREQ_CASCADE;
REG_TM1VAL = 0;
REG_TM0CNT |= TIMER_ENABLE;
while (!REG_TM1VAL);
return hadTrans;
}
Had this code hang on hardware, despite working fine in mGBA. Turns out hardware demands the TIMER_ENABLE flag be set on both TM0 and TM1 for TM1 to count up.
Had this code hang on hardware, despite working fine in mGBA. Turns out hardware demands the TIMER_ENABLE flag be set on both TM0 and TM1 for TM1 to count up.