2026-04-06 17:36:41 +09:00
|
|
|
#include "dispatch.h"
|
2026-04-06 17:24:34 +09:00
|
|
|
#include "handlers.h"
|
2026-04-06 20:01:22 +09:00
|
|
|
|
2026-04-06 20:09:30 +09:00
|
|
|
std::string_view firmware_name = "picomap";
|
|
|
|
|
|
2026-04-06 17:36:41 +09:00
|
|
|
static constexpr handler_entry handlers[] = {
|
2026-04-10 22:21:31 +09:00
|
|
|
{RequestPICOBOOT::ext_id, typed_handler<RequestPICOBOOT, handle_picoboot>},
|
|
|
|
|
{RequestInfo::ext_id, typed_handler<RequestInfo, handle_info>},
|
|
|
|
|
{RequestLog::ext_id, typed_handler<RequestLog, handle_log>},
|
2026-04-11 22:26:54 +09:00
|
|
|
{RequestFlashErase::ext_id, typed_handler<RequestFlashErase, handle_flash_erase>},
|
|
|
|
|
{RequestFlashWrite::ext_id, typed_handler<RequestFlashWrite, handle_flash_write>},
|
|
|
|
|
{RequestReboot::ext_id, typed_handler<RequestReboot, handle_reboot>},
|
2026-04-06 17:36:41 +09:00
|
|
|
};
|
2026-04-05 21:04:56 +09:00
|
|
|
|
|
|
|
|
int main() {
|
2026-04-12 08:17:22 +09:00
|
|
|
handlers_init();
|
2026-04-06 20:01:22 +09:00
|
|
|
dispatch_init();
|
2026-04-07 07:04:53 +09:00
|
|
|
dispatch_run(handlers);
|
2026-04-05 21:04:56 +09:00
|
|
|
}
|