mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-09-02 15:02:51 +08:00
The tail of handle_post() interleaved the config and firmware upload paths behind one config_upload conditional. Give each path its own function, handle_config_fragment() and handle_firmware_fragment(), and reduce handle_post() to routing. Both handlers keep their own copy of the buffer-and-bounds-check prologue: with SDCC a shared helper costs 2 bytes of direct RAM for the fragment pointer (a spill slot when the parameter lives in xdata, a DSEG home when it does not), and direct RAM is fully allocated. The memory layout is unchanged from the pre-split code.