static void on_uart_rx_data(void *user_data, uint8_t byte) {
// `byte` is the byte received on the "RX" pin
}
static uint8_t on_uart_write_done(void *user_data) {
// You can write the chunk of data to transmit here (by calling uart_write).
}
// ...
const uart_config_t uart1 = {
.tx = pin_init("TX", INPUT_PULLUP),
.rx = pin_init("RX", INPUT),
.baud_rate = 115200,
.rx_data = on_uart_rx_data,
.write_done = on_uart_write_done,
.user_data = chip,
};