feat: disable pico led real time
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "utils.h"
|
||||
#include "hardware/flash.h"
|
||||
#include "hardware/sync.h"
|
||||
#include "pico/cyw43_arch.h"
|
||||
|
||||
constexpr uint32_t CONFIG_MAGIC = 0x66ccff00;
|
||||
constexpr uint16_t CONFIG_VERSION = 1;
|
||||
@@ -115,4 +116,9 @@ void set_config(const uint8_t *new_config, const uint16_t len) {
|
||||
const auto copy_len = len < sizeof(Config_body) ? len : sizeof(Config_body);
|
||||
memcpy(&config.body, new_config, copy_len);
|
||||
config_valid();
|
||||
if (config.body.disable_pico_led) {
|
||||
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, false);
|
||||
}else {
|
||||
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user