   digitalWrite(motorInBPin, (bits & 0x01) ? (HIGH) : (LOW));
 }
 
+void _motorFree() {
+  setMotorBits(0x00);
+}
+
+void _motorBrake() {
+  _motorFree();
+  digitalWrite(motorPWMPin, HIGH);
+}
+
+void _motorForward() {
+  setMotorBits(0x02);
+}
+
+void _motorBackward() {
+  setMotorBits(0x01);
+}
+
 void motorDisable() {
-  // actively pull diag pins low, disables driver bridges
+  // actively pull diag pins low, disables both driver bridges
   digitalWrite(motorDiagAPin, LOW);
   pinMode(motorDiagAPin, OUTPUT);
 

    } else {
      debounceIgnore--;
    }
 
    debounce(switchFront, &swFront, &swFrontDeglitch, &swFrontDebounce);
    debounce(switchBack, &swBack, &swBackDeglitch, &swBackDebounce);
    debounce(pirPin, &pirTrigger, &pirDeglitch, &pirDebounce);

  Serial.print(F("Brake engaged\r\n"));
}

void motorFree() {
  _motorFree();
  Serial.print(F("Brake released\r\n"));
}

void motorForward() {
  _motorForward();
  Serial.print(F("Forward\r\n"));
}

void motorBackward() {
  _motorBackward();
  Serial.print(F("Backward\r\n"));
}


