@Override
public void setPullResistance(Pin pin, PinPullResistance resistance) {
if (!hasPin(pin)) {
throw new InvalidPinException(pin);
}
if (!pin.getSupportedPinPullResistance().contains(resistance)) {
throw new UnsupportedPinPullResistanceException(pin, resistance);
}