Show
Ignore:
Timestamp:
07/03/2009 02:56:55 AM (9 months ago)
Author:
BrainSlayer
Message:

compressed ELF support is required for ubnt images

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ar5315_microredboot/microredboot/ecos/packages/redboot/current/src/main.c

    r12409 r12429  
    159159 
    160160int in_rescue_mode = 0; 
     161 
     162void set_gpio(int gpio,int state) 
     163{ 
     164#if defined(CYGPKG_HAL_MIPS_AR2316) 
     165        *(volatile unsigned *)AR2316_GPIO_CR |= 1<<gpio;        /*set GPIO0 to be output */ 
     166if (state) 
     167        *(volatile unsigned *)AR2316_GPIO_DO |= 1<<gpio;        /*set GPIO0 to 1 to spi flash CS normal state */ 
     168else 
     169        *(volatile unsigned *)AR2316_GPIO_DO &= ~(1<<gpio);     /*set GPIO0 to 1 to spi flash CS normal state */ 
     170#else 
     171        *(volatile unsigned *)AR531X_GPIO_CR &= ~(1<<gpio);     /*set GPIO0 to be output */ 
     172if (state) 
     173        *(volatile unsigned *)AR531X_GPIO_DO |= 1<<gpio;        /*set GPIO0 to 1 to spi flash CS normal state */ 
     174else 
     175        *(volatile unsigned *)AR531X_GPIO_DO &= ~(1<<gpio);     /*set GPIO0 to 1 to spi flash CS normal state */ 
     176#endif 
     177 
     178} 
    161179 
    162180