18 lines
486 B
C
18 lines
486 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
typedef void (*usb_api_line_handler_t)(const char *line);
|
|
|
|
// Initialize USB Serial/JTAG line reader; pass handler for complete lines.
|
|
void usb_api_init(usb_api_line_handler_t handler);
|
|
|
|
// Non-blocking poll; call from main loop/task.
|
|
void usb_api_tick(void);
|
|
|
|
// Send a line to host (no automatic newline added).
|
|
void usb_api_send_line(const char *line);
|
|
|
|
// Return true when host is connected over USB Serial/JTAG.
|
|
bool usb_api_is_connected(void);
|