Hi all,
Can someone explain the following code,kindly explain line by line.Since i'm new to hardware programming.
/* Initialize timer for GPIO toggling timing */ enable_timer( 0 );
counter = 0; FIO2SET = 1 << counter; // #define FIO2SET (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x58)) while ( 1 ) { if ( timer0_counter >= (0x20 * counter) ) { FIO2SET = 1 << counter; counter++; if ( counter > 8 ) { counter = 0; timer0_counter = 0; FIO2CLR = 0x000000FF; } } } return 0; }
Chethan
Hi
Ya,I have gone through the documentation and for different applications (like adc,can,SPI,I2c etc.) programs i'm trying to understand but not getting some logics in the source file (cleared with header file) and what code i have posted the logic not cleared to me.I know that is not sufficient to ans u people but their many header files are their that's why i compressed it.