diff --git a/src/platform/avr32/i2c.c b/src/platform/avr32/i2c.c index 96e33e2a..25bab83e 100644 --- a/src/platform/avr32/i2c.c +++ b/src/platform/avr32/i2c.c @@ -306,10 +306,9 @@ static void I2CDELAY() u32 delay_start_cycle = Get_system_register(AVR32_COUNT); // at 60MHz the count register wraps every 71.68 secs, at 66MHz every 65s. - // For delays <= 30 seconds, the following code in unsigned arithmetic - // handles the wraparound condition as it should. + // The following unsigned arithmetic handles the wraparound condition. while( (u32)Get_system_register(AVR32_COUNT) - delay_start_cycle < i2c_delay ) - ; + /* wait */; } // Set SCL as input and return current level of line diff --git a/src/platform/avr32/sdramc.c b/src/platform/avr32/sdramc.c index 7b17fdf6..5dff5c99 100644 --- a/src/platform/avr32/sdramc.c +++ b/src/platform/avr32/sdramc.c @@ -61,9 +61,9 @@ static void sdramc_ck_delay(unsigned long ck) unsigned long delay_start_cycle = Get_system_register(AVR32_COUNT); // at 60MHz the count register wraps every 71.68 secs, at 66MHz every 65s. - // For delays <= 30 seconds, the following code in unsigned arithmetic - // handles the wraparound condition as it should. - while((unsigned long)Get_system_register(AVR32_COUNT) - delay_start_cycle < ck ) ; + // The following unsigned arithmetic handles the wraparound condition. + while ((unsigned long)Get_system_register(AVR32_COUNT) - delay_start_cycle < ck) + /* wait */; }