ピン変化割り込み拡張しよう的な
Dependents: inte_mod_test test_irm2121 BallCheck_IRM2121_InterrputInAdd CatPot_SensorRight
interruptin_mod.cpp
- Committer:
- bousiya03
- Date:
- 2014-12-03
- Revision:
- 3:1cc9d9e3cf8c
- Parent:
- 1:c63d872cfdb7
File content as of revision 3:1cc9d9e3cf8c:
#include"mbed.h" #include"interruptin_mod.h" interruptin_mod::interruptin_mod(PinName pin) : InterruptIn(pin){} void interruptin_mod::fall_disable(void (*fptr)(void)){ _rise.attach(fptr); gpio_irq_set(&gpio_irq, IRQ_RISE, NULL); } void interruptin_mod::rise_disable(void (*fptr)(void)) { _fall.attach(fptr); gpio_irq_set(&gpio_irq, IRQ_FALL, NULL); }