code: func (a *AdafruitMotorHatDriver) RunDCMotor(dcMotor int, dir AdafruitDirection) (err error) {
  
  	switch {
  	case dir == AdafruitForward:
  		if err = a.setPin(a.motorHatConnection, a.dcMotors[dcMotor].in2Pin, 0); err != nil {
  			return
  		}
  		if err = a.setPin(a.motorHatConnection, a.dcMotors[dcMotor].in1Pin, 1); err != nil {
  			return
  		}
  	case dir == AdafruitBackward:
  		if err = a.setPin(a.motorHatConnection, a.dcMotors[dcMotor].in1Pin, 0); err != nil {
  			return
  		}
  		if err = a.setPin(a.motorHatConnection, a.dcMotors[dcMotor].in2Pin, 1); err != nil {
  			return
  		}
  	case dir == AdafruitRelease:
  		if err = a.setPin(a.motorHatConnection, a.dcMotors[dcMotor].in1Pin, 0); err != nil {
  			return
  		}
  		if err = a.setPin(a.motorHatConnection, a.dcMotors[dcMotor].in2Pin, 0); err != nil {
  			return
  		}
  	}
  	return
  }
docs: // RunDCMotor will set the appropriate pins to run the specified DC motor for
  // the given direction