         break;
       case 0x20DF10EF: // tv remote on/off
         if ( tvPowerStatus == 1 ) {
-          //t.stop(tvIsOffEvent);
-          //t.stop(tvIsOnEvent);
           timerStatus = 0;
         } else {
           timerStatus = 1;
-          //tvOnTimer();
+          tvOnTimer();
           temp_Mills = millis();
         }
         tvPowerStatus = ! tvPowerStatus;

  long magic;
  int pwrSrc;     // 1 : connected to TV, 0 : usb powered
  int wrkMode;    // 1 : thermostat + TV, 0 : thermostat
  int startMode;  // if wrkMode == 1, 1 : run TV on/off or channel change, 0 : do nothing indicating a sign on the lcd
  int beepMode;   // 1 : beep on
  int offMode;    // 1 : TV on/off, 0 : input change
  int channelGap; // 1 ~ 5
  int tvOnTime;   // 30 ~ 90
  int tvOffTime;  // 5 ~ 20
};

// pins

}


int initialise_eeprom(int o_pwrSrc, int o_wrkMode, int o_startMode, int o_beepMode, int o_channelGap, int o_tvOnTime)
{
  eeprom_write(o_pwrSrc, pwrSrc);
  eeprom_write(o_wrkMode, wrkMode);
  eeprom_write(o_startMode, startMode);
  eeprom_write(o_beepMode, beepMode);
  eeprom_write(o_channelGap, channelGap);
  eeprom_write(o_tvOnTime, tvOnTime);
  eeprom_write(magic_number, magic);

  alarm_set();
