code: func (a *AdafruitMotorHatDriver) setPWM(conn Connection, pin byte, on, off int32) (err error) {
  	// register and values to be written to that register
  	regVals := make(map[int][]byte)
  	regVals[0] = []byte{byte(_LedZeroOnL + 4*pin), byte(on & 0xff)}
  	regVals[1] = []byte{byte(_LedZeroOnH + 4*pin), byte(on >> 8)}
  	regVals[2] = []byte{byte(_LedZeroOffL + 4*pin), byte(off & 0xff)}
  	regVals[3] = []byte{byte(_LedZeroOffH + 4*pin), byte(off >> 8)}
  	for i := 0; i < len(regVals); i++ {
  		if _, err = conn.Write(regVals[i]); err != nil {
  			return
  		}
  	}
  	return
  }
docs: // setPWM sets the start (on) and end (off) of the high-segment of the PWM pulse
  // on the specific channel (pin).