diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/port_api.c b/targets/TARGET_Cypress/TARGET_PSOC6/port_api.c index b1d849fd9c..ddcc0bc5d5 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/port_api.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6/port_api.c @@ -109,8 +109,8 @@ void port_write(port_t *obj, int value) for (pin = 0; pin < 8; ++pin) { if (obj->mask & (1 << pin)) { Cy_GPIO_Write(obj->port, pin, value & 0x1); - value >>= 1; } + value >>= 1; } } } diff --git a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/port_api.c b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/port_api.c index 5e124dd5b4..9fce69a494 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/port_api.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/port_api.c @@ -105,8 +105,8 @@ void port_write(port_t *obj, int value) for (pin = 0; pin < 8; ++pin) { if (obj->mask & (1 << pin)) { Cy_GPIO_Write(obj->port, pin, value & 0x1); - value >>= 1; } + value >>= 1; } } }