+ chassis_set_pins((1<<POWER_PIN) | (1<<RESET_PIN), 0);
+ CDDR |= ((1<<POWER_PIN) | (1<<RESET_PIN));
+}
+
+static void chassis_set_pins(uint8_t pins, uint8_t state)
+{
+#ifdef ACTIVE_LOW
+ state = !state;
+#endif
+
+ if(state) {
+ CPORT |= pins;
+ } else {
+ CPORT &= ~pins;
+ }
+}
+
+static void chassis_power(int msec)
+{
+ volatile int i;
+
+ chassis_set_pins((1<<POWER_PIN), 1);
+
+ /* FIXME */
+ for(i = 0; i < (msec<<2); i++);
+
+ chassis_set_pins((1<<POWER_PIN), 0);
+}
+
+static void chassis_reset(int msec)
+{
+ volatile int i;
+
+ chassis_set_pins((1<<RESET_PIN), 1);
+
+ /* FIXME */
+ for(i = 0; i < (msec<<2); i++);
+
+ chassis_set_pins((1<<RESET_PIN), 0);