#include "pico/stdlib.h" #include "hardware/gpio.h" #include "dispatch.h" #include "handlers.h" #include "test_handlers.h" static constexpr uint8_t LED_PIN = 25; static void led_toggle() { gpio_xor_mask(1 << LED_PIN); dispatch_schedule_ms(1000, led_toggle); } std::string_view firmware_name = "picomap_test"; static constexpr handler_entry handlers[] = { {RequestInfo::ext_id, typed_handler}, {RequestLog::ext_id, typed_handler}, {RequestFlashErase::ext_id, typed_handler}, {RequestFlashWrite::ext_id, typed_handler}, {RequestReboot::ext_id, typed_handler}, {RequestFlashStatus::ext_id, typed_handler}, {RequestListTests::ext_id, typed_handler}, {RequestTest::ext_id, typed_handler}, }; int main() { handlers_init(); dispatch_init(); handlers_start(); gpio_init(LED_PIN); gpio_set_dir(LED_PIN, GPIO_OUT); dispatch_schedule_ms(1000, led_toggle); dispatch_run(handlers); }