EINT2 interruption sur LPC1768

V

verd

Guest
Salut je ne peux pas configurer l'interruption EINT2 poste sur ma demande!

J'utilise compilateur Keil RTOS Pentecôte.

C'est le code:

Code:void extint1 (void) (

LPC_PINCON-> PINSEL4 & = ~ 0x03000000 / / P2.12 - EINT2 - pin51

LPC_PINCON-> PINSEL4 | = 0x01000000;

LPC_GPIO2-> FIODIR & = ~ (1 <<12); PORT2.10 * / * défini comme entrée /

LPC_GPIOINT-> IO2IntEnF | = (1 <<12); / * * permettre à la baisse irq / EDGE

NVIC_EnableIRQ (EINT2_IRQn); / * * permettre aux IRQ dans NVIC /

)void EINT2_IRQHandler ()

(

LPC_GPIOINT-> IO2IntClr | = (1 <<12); / * attente claire interruption * /

isr_evt_set ((1 <<4), t_tarefa4); / pavillon envia / de evento

)

 

Welcome to EDABoard.com

Sponsor

Back
Top