   {"EXTERNAL", EXTERNAL}
 };
 
-// 24時間のmsec表現
-
-// タイマ割り込み
-volatile uint32_t timer2_tcnt2 = 0;
-
-void timer2Start(){
-  float prescaler = 0.0;
-
-  TIMSK2 &= ~(1<<TOIE2);
-  TCCR2A &= ~((1<<WGM21) | (1<<WGM20));
-  TCCR2B &= ~(1<<WGM22);
-  ASSR &= ~(1<<AS2);
-  TIMSK2 &= ~(1<<OCIE2A);
-
-  if ((F_CPU >= 1000000UL) && (F_CPU <= 16000000UL)) {  // prescaler set to 64
-    TCCR2B |= (1<<CS22);
-    TCCR2B &= ~((1<<CS21) | (1<<CS20));
-    prescaler = 64.0;
-  } else if (F_CPU < 1000000UL) { // prescaler set to 8
-    TCCR2B |= (1<<CS21);
-    TCCR2B &= ~((1<<CS22) | (1<<CS20));
-    prescaler = 8.0;
-  } else { // F_CPU > 16Mhz,  prescaler set to 128
-    TCCR2B |= ((1<<CS22) | (1<<CS20));
-    TCCR2B &= ~(1<<CS21);
-    prescaler = 128.0;
-  }
-
-  timer2_tcnt2 = 256 - (int)((float)F_CPU * 0.001 / prescaler);
-
-  TCNT2 = timer2_tcnt2;
-  TIMSK2 |= (1<<TOIE2);
-}
-
-void timer2Stop(){
-  TIMSK2 &= ~(1<<TOIE2);
-}
-
-ISR(TIMER2_OVF_vect) {
-  TCNT2 = timer2_tcnt2;
-
-  int i = 0;
-  for(; i < AI_MAX_PORT_NUM; ++i){
-    ++ai_stream_info[i].counter;
-  }
-  for(i = 0; i < DI_MAX_PORT_NUM; ++i){
-    ++di_stream_info[i].counter;
-  }
-}
 #endif
 
 const prog_char ILLEGAL_COMMAND[] PROGMEM       = "Illegal command.";

struct STR_UINT8_PEAR {
  char* key;
  uint8_t value;
};

/**************************************************************************

char read_buf[128];
int buf_index = 0;

volatile struct STREAM_INFO ai_stream_info[AI_MAX_PORT_NUM];
volatile struct STREAM_INFO di_stream_info[DI_MAX_PORT_NUM];

// pinModeの名前と値を保持するテーブル.
const struct STR_UINT8_PEAR PIN_MODE_TBL[] = {
