For context, what I do for Esp-Hosted, via a standalone lib: - Pass a Fn pointer of how to write, e.g. UART or SPI depending on how it's wired, and the raw buf, or higher level structs that repr the message - In the Uart or SPI etc ISR, pass the read buf to a fn that decodes it So, it will work on any MCU, firmware architecture etc