Organize into arch, board, and ec modules

This commit is contained in:
Jeremy Soller
2019-09-29 20:13:03 -06:00
parent 9d056547e6
commit ded5181926
47 changed files with 518 additions and 486 deletions

17
src/ec/it8587e/gpio.c Normal file
View File

@ -0,0 +1,17 @@
#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);
}
}