Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main (void)
- {
- SystemInit();
- GPIO_PinDirection(LED1,OUTPUT); /* Configure the pins as Output to blink the Leds*/
- GPIO_PinDirection(LED2,OUTPUT);
- TIMER_Init(0,100000); /* Configure timer0 to generate 100ms(100000us) delay*/
- TIMER_Init(1,500000); /* Configure timer1 to generate 500ms(500000us) delay*/
- TIMER_AttachInterrupt(0,myTimerIsr_0); /* myTimerIsr_0 will be called by TIMER0_IRQn */
- TIMER_AttachInterrupt(1,myTimerIsr_1); /* myTimerIsr_1 will be called by TIMER1_IRQn */
- TIMER_Start(0); /* Start the Timers */
- TIMER_Start(1);
- while(1)
- {
- //do nothing
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement