Skip to content

Commit fded363

Browse files
author
Cruz Monrreal
authored
Merge pull request #9775 from vmedcy/psoc6-port-api
PSOC6: fix port_write API
2 parents 59549b8 + d49e2ab commit fded363

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/port_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ void port_write(port_t *obj, int value)
109109
for (pin = 0; pin < 8; ++pin) {
110110
if (obj->mask & (1 << pin)) {
111111
Cy_GPIO_Write(obj->port, pin, value & 0x1);
112-
value >>= 1;
113112
}
113+
value >>= 1;
114114
}
115115
}
116116
}

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/port_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ void port_write(port_t *obj, int value)
105105
for (pin = 0; pin < 8; ++pin) {
106106
if (obj->mask & (1 << pin)) {
107107
Cy_GPIO_Write(obj->port, pin, value & 0x1);
108-
value >>= 1;
109108
}
109+
value >>= 1;
110110
}
111111
}
112112
}

0 commit comments

Comments
 (0)