# HG changeset patch # User Paul Boddie # Date 1475501186 -7200 # Node ID cda6ef50864871d7688e3f21bf23cfca7e6d4ba6 # Parent b59bce1670f9376f8c9671f384c60651f6302226 Fixed GPIO set and clear pin functions. diff -r b59bce1670f9 -r cda6ef508648 stage2/task_gpio.c --- a/stage2/task_gpio.c Mon Oct 03 00:41:11 2016 +0200 +++ b/stage2/task_gpio.c Mon Oct 03 15:26:26 2016 +0200 @@ -36,12 +36,12 @@ inline void task_gpio_set_pin(unsigned short pin) { - TASK_REG_GPIO_PXDATS(pin / 32) = (1 << (pin % 32)); + TASK_REG_GPIO_PXDATS(pin / 32) |= (1 << (pin % 32)); } inline void task_gpio_clear_pin(unsigned short pin) { - TASK_REG_GPIO_PXDATS(pin / 32) = (1 << (pin % 32)); + TASK_REG_GPIO_PXDATS(pin / 32) &= ~(1 << (pin % 32)); } inline int task_gpio_get_pin(unsigned short pin)