Files
system76-embedded-controller/src/ec/it8587e/gpio.c
Tim Crawford 5fd9df0ed0 Add SPDX license identifiers
Add license information to files. Mostly automated with:

    find src/ -name '*.[c,h]' | xargs sed -i '1s,^,// SPDX-License-Identifier: GPL-3.0-only\n\n,'
    find src/ -name '*.mk' | xargs sed -i '1s,^,# SPDX-License-Identifier: GPL-3.0-only\n\n,'
2020-09-17 09:17:08 -06:00

20 lines
369 B
C

// SPDX-License-Identifier: GPL-3.0-only
#include <ec/gpio.h>
bool gpio_get(struct Gpio * gpio) {
if (*(gpio->data) & gpio->value) {
return true;
} else {
return false;
}
}
void gpio_set(struct Gpio * gpio, bool value) {
if (value) {
*(gpio->data) |= gpio->value;
} else {
*(gpio->data) &= ~(gpio->value);
}
}