228229230231232233234235236237238
} @Override public void setPwm(Pin pin, int value) { if (!hasPin(pin)) { throw new InvalidPinException(pin); } PinMode mode = getMode(pin); if (mode != PinMode.PWM_OUTPUT) {
245246247248249250251252253254255
@Override public int getPwm(Pin pin) { if (!hasPin(pin)) { throw new InvalidPinException(pin); } // return cached pin PWM value return getPinCache(pin).getPwmValue(); }