feat(arm03): pin_write uses sets/reset instead f writing to ODR
1 files changed, 5 insertions(+), 1 deletions(-) M arm03/src/pin.c
M arm03/src/pin.c => arm03/src/pin.c +5 -1
@@ 22,7 22,11 @@ uint8_t pin_read(pin_t *pin) { } uint8_t pin_write(pin_t *pin, uint8_t val) { - reg_write_bits_pos(&pin->gpio->ODR, val, pin->pin, 1); + if (val) { + pin_set(pin); + } else { + pin_reset(pin); + } } void pin_toggle(pin_t *pin) { reg_toggle_bits_pos(&pin->gpio->ODR, pin->pin, 1);