We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24991a4 commit 278f05bCopy full SHA for 278f05b
targets/TARGET_Cypress/TARGET_PSOC6/cy_port_api.c
@@ -64,13 +64,10 @@ void port_dir(port_t *obj, PinDirection dir)
64
void port_write(port_t *obj, int value)
65
{
66
GPIO_PRT_Type *port_type = Cy_GPIO_PortToAddr(obj->port);
67
- if (obj->mask == 0xff)
68
- {
+ if (obj->mask == 0xff) {
69
// Optimization for when all pins on the port is used.
70
port_type->OUT = value;
71
- }
72
- else
73
+ } else {
74
port_type->OUT_SET = value & obj->mask;
75
port_type->OUT_CLR = (~value) & obj->mask;
76
}
0 commit comments