void ISI_Reset(void) { unsigned int timeout=0; // Resets the image sensor interface. // Finish capturing the current frame and then shut down the module. AT91C_BASE_ISI->ISI_CR1 = AT91C_ISI_RST | AT91C_ISI_DIS; // wait Software reset has completed successfully. while( (!(volatile int)AT91C_BASE_ISI->ISI_SR & AT91C_ISI_SOFTRST) && (timeout < 0x5000) ){ timeout++; } if( timeout == 0x5000 ) { TRACE_ERROR("ISI-Reset timeout\n\r"); } }