Existem alguma regra basica para funcionar em rtos? estou aprendendo rtos dando uma fuçada pela net, to bem perdido ainda, batendo cabeça!!
alguem tem algum palpite?
- Código: Selecionar todos
void BUTTON_init(void) {
LPC_GPIO2->FIODIR &= ~(1 << 10); /* PORT2.10 defined as input */
LPC_GPIOINT->IO2IntEnF |= (1 << 10); /* enable falling edge irq */
NVIC_EnableIRQ(EINT3_IRQn); /* enable irq in nvic */
}
void EINT3_IRQHandler()
{
LPC_GPIO2->FIOSET =0xffffffff;
delay(10);
LPC_GPIO2->FIOCLR =0xffffffff;
LPC_GPIOINT->IO2IntClr |= (1 << 10); /* clear pending
}