|
@ -44,7 +44,7 @@ xs_gpio_t m_power_led2; |
|
|
void power_light_init() { |
|
|
void power_light_init() { |
|
|
xs_gpio_init_as_output(&m_power_led0, PB6, kxs_gpio_nopull, true, false); // r
|
|
|
xs_gpio_init_as_output(&m_power_led0, PB6, kxs_gpio_nopull, true, false); // r
|
|
|
xs_gpio_init_as_output(&m_power_led1, PB7, kxs_gpio_nopull, true, false); // g
|
|
|
xs_gpio_init_as_output(&m_power_led1, PB7, kxs_gpio_nopull, true, false); // g
|
|
|
xs_gpio_init_as_output(&m_power_led2, PB8, kxs_gpio_nopull, true, false); // y
|
|
|
|
|
|
|
|
|
xs_gpio_init_as_output(&m_power_led2, PB8, kxs_gpio_nopull, true, true); // y
|
|
|
} |
|
|
} |
|
|
void power_light_ctrl(int green, int yellow) { |
|
|
void power_light_ctrl(int green, int yellow) { |
|
|
xs_gpio_write(&m_power_led0, 0); |
|
|
xs_gpio_write(&m_power_led0, 0); |
|
@ -122,6 +122,7 @@ void umain() { |
|
|
xs_gpio_init_as_output(&m_debug_led, PC_DEBUG_LIGHT_GPIO, kxs_gpio_nopull, false, false); |
|
|
xs_gpio_init_as_output(&m_debug_led, PC_DEBUG_LIGHT_GPIO, kxs_gpio_nopull, false, false); |
|
|
// xs_gpio_init_as_output(&m_power_led, POWER_LED_PIN, kxs_gpio_nopull, false, true);
|
|
|
// xs_gpio_init_as_output(&m_power_led, POWER_LED_PIN, kxs_gpio_nopull, false, true);
|
|
|
power_light_init(); |
|
|
power_light_init(); |
|
|
|
|
|
|
|
|
xs_gpio_init_as_input(&m_factory_reset_key, FACTORY_RESET_KEY, kxs_gpio_pullup, kxs_gpio_no_irq, true); |
|
|
xs_gpio_init_as_input(&m_factory_reset_key, FACTORY_RESET_KEY, kxs_gpio_pullup, kxs_gpio_no_irq, true); |
|
|
// m_power_led
|
|
|
// m_power_led
|
|
|
/**
|
|
|
/**
|
|
|