| 1 |
|
| 2 |
|
| 3 |
#include <superio/ite/common/ite.h> |
| 4 |
#include <superio/ite/common/ite_gpio.h> |
| 5 |
|
| 6 |
#include "common_defines.h" |
| 7 |
#include "led.h" |
| 8 |
|
| 9 |
void set_power_led(int state) |
| 10 |
{ |
| 11 |
|
| 12 |
ite_reg_write(GPIO_DEV, ITE_GPIO_REG_SELECT(1), 0xf3 | LED_BOTH); |
| 13 |
ite_gpio_setup(GPIO_DEV, 22, ITE_GPIO_OUTPUT, ITE_GPIO_ALT_FN_MODE, |
| 14 |
state & LED_WHITE ? ITE_GPIO_POL_INVERT : ITE_GPIO_CONTROL_DEFAULT); |
| 15 |
ite_gpio_setup(GPIO_DEV, 23, ITE_GPIO_OUTPUT, ITE_GPIO_ALT_FN_MODE, |
| 16 |
state & LED_YELLOW ? ITE_GPIO_POL_INVERT : ITE_GPIO_CONTROL_DEFAULT); |
| 17 |
} |