   {"EXTERNAL", EXTERNAL}
 };
 
+const struct STR_UINT8_PEAR INTERRUPT_MODE_TBL[] = {
+  {"LOW", LOW},
+  {"CHANGE", CHANGE},
+  {"RISING", RISING},
+  {"FALLING", FALLING}
+};
+
+volatile uint32_t interrupt_counter[2] = {0};
+void interrupt0(void){
+  ++interrupt_counter[0];
+}
+
+void interrupt1(void){
+  ++interrupt_counter[1];
+}
+
+const VOID_FUNC_PTR INTERRUPT_FUNC_TBL[] = {
+  interrupt0,
+  interrupt1,
+};
+
 #endif
 
 const prog_char ILLEGAL_COMMAND[] PROGMEM       = "Illegal command.";

  return okIoJson(port, 0);
}


// スタックオーバーフローにより強制的にリセット
char* resetTask(String empty){

    }
  }

  for(uint8_t i = 0; i < ARRAYSIZE(interrupt_counter); i++){
    if(interrupt_counter[i] > 0){
      Serial.println(wrapEventJson("int", interruptJson(i, interrupt_counter[i])));
      interrupt_counter[i] = 0;
    }
  }

}


char* task(String msg){
  // 関数テーブルからタスクを決定する.
