14#if PC_ENABLE_PARTITION_MONITOR
21struct PartitionRoutesCtx
25static PartitionRoutesCtx s_partr;
27static void partition_handler(uint8_t slot_id,
HttpReq *req)
33 pc_partition_json(parts, n, buf,
sizeof(buf));
36 s_partr.srv->send(slot_id, 200, PC_MIME_JSON, buf);
40void pc_partition_monitor_begin(
PC &server,
const char *path)
42 s_partr.srv = &server;
Single-port HTTP server with deterministic, zero-allocation execution.
void on(const char *path, HttpMethod method, Handler callback)
Register a route handler.
Shared HTTP Content-Type ("MIME") string constants (one source of truth).
Flash partition-map monitor (PC_ENABLE_PARTITION_MONITOR).
Layer 7 (Application) - public HTTP routing API.
HttpMethod
HTTP request methods supported by the router.
@ HTTP_GET
Safe, idempotent read.
#define PC_PARTITION_MAX
Maximum partitions the monitor reports (BSS table).
#define PC_PARTITION_JSON_BUF
Stack buffer for the partition-map JSON (bytes).
Fully-parsed HTTP/1.1 request.