ピン変化割り込み拡張のテスト
Dependencies: interruptin_mod mbed
main.cpp
- Committer:
- bousiya03
- Date:
- 2014-11-13
- Revision:
- 0:13afa59109be
File content as of revision 0:13afa59109be:
#include "mbed.h" //#include "IRM2121.h" #include"interruptin_mod.h" interruptin_mod test(p5); //InterruptIn test1(p5); //IRM2121 test(p5); /* class intruptin_mod:public InterruptIn{ public: intruptin_mod(PinName pin): InterruptIn(pin){} void rise_disable(void (*fptr)(void)) { _rise.attach(fptr); gpio_irq_set(&gpio_irq, IRQ_RISE, 0); } void fall_disable(void (*fptr)(void)) { _fall.attach(fptr); gpio_irq_set(&gpio_irq, IRQ_FALL, 0); } }; */ void test_f(){ } int main(){ //int value = 0; test.fall(&test_f); test.fall_disable(NULL); // test.Set(); //value = test.Read(); //printf("value = %d\n" ,value); for(;;); }