rotary:[#9] enable interrupts on three pins
This commit is contained in:
parent
a57f814875
commit
da50fa4de1
@ -13,24 +13,21 @@ extern "C"
|
||||
void
|
||||
PIN_INT0_IRQHandler (void)
|
||||
{
|
||||
//portEND_SWITCHING_ISR ();
|
||||
Chip_PININT_ClearIntStatus (LPC_PININT, PININTCH (PIN_INT0_IRQn));
|
||||
}
|
||||
|
||||
void
|
||||
PIN_INT1_IRQHandler (void)
|
||||
{
|
||||
//portEND_SWITCHING_ISR ();
|
||||
Chip_PININT_ClearIntStatus (LPC_PININT, PININTCH (PIN_INT1_IRQn));
|
||||
}
|
||||
|
||||
void
|
||||
PIN_INT2_IRQHandler (void)
|
||||
{
|
||||
//portEND_SWITCHING_ISR ();
|
||||
Chip_PININT_ClearIntStatus (LPC_PININT, PININTCH (PIN_INT2_IRQn));
|
||||
}
|
||||
}
|
||||
// For example
|
||||
#define GPIO_PININT_PIN 1 /* GPIO pin number mapped to PININT */
|
||||
#define GPIO_PININT_PORT 0 /* GPIO port number mapped to PININT */
|
||||
|
||||
Rotary::Rotary(ThreadCommon::QueueManager* qm) : _qm(qm)
|
||||
{
|
||||
@ -44,7 +41,10 @@ void Rotary::taskFunction()
|
||||
Event data(Event::Null, 0);
|
||||
Event* e = new Event(Event::Rotary, ThreadCommon::RotaryAction::Idle);
|
||||
_qm->send<Event>(ThreadCommon::QueueManager::master_event_all, e, 10);
|
||||
for (;;) {}
|
||||
for (;;)
|
||||
{
|
||||
vTaskDelay(500);
|
||||
}
|
||||
}
|
||||
|
||||
void rotary_thread(void* pvParams)
|
||||
|
||||
@ -20,7 +20,7 @@ public:
|
||||
private:
|
||||
Event* message;
|
||||
ThreadCommon::QueueManager* _qm;
|
||||
DigitalIoPin signal[3] = { { 0, 6, true, false, false, true, PIN_INT0_IRQn},
|
||||
DigitalIoPin signal[3] = { { 0, 1, true, true, false, true, PIN_INT0_IRQn},
|
||||
{ 0, 5, true, false, false, true, PIN_INT1_IRQn},
|
||||
{ 1, 8, true, false, false, true, PIN_INT2_IRQn} };
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user