         return i;
     }
     return NONE;
+  }
+
+  void power_off() {
+    serprintf("Power off\r\n");
+  }
+
+  void reset() {
+    serprintf("Reset\r\n");
   }
 
   void tick() {

void handle_interrupt_1();

class Controller {
public:
  Player *players[2];
  static int active_player;
  volatile static int interrupt_fired;


      interrupt_fired = NONE;
    }

    unsigned long reset_button_held = reset_button->poll();
    //if (reset_button_held > 0)
    //  serprintf("reset button was held for %d\r\n", reset_button_held);
    if (reset_button_held > reset_button_poweroff_ms) {
      power_off();
    } else if (reset_button_held > reset_button_reset_ms) {
      reset();
    }

    if (active_player == NONE)
      // It's nobody's turn, so just keep waiting for a button press
      return;
