CMSIS-MCP  Version 0.0.0
Embedded MCP server with serial transport
 
Loading...
Searching...
No Matches
serial_transport.h File Reference

Serial line API with a default stdio implementation. More...

#include <c_mcp_config.h>

Go to the source code of this file.

Macros

#define MCP_SERIAL_EOF   (-1)
 Read hook result: input closed or unrecoverable input error.
 
#define MCP_SERIAL_NO_DATA   (-2)
 Read hook result: no byte available yet; preserve the partial line.
 
#define MCP_SERIAL_INPUT_LOST   (-3)
 Read hook result: RX data lost; discard through the next delimiter.
 

Functions

int mcp_serial_transport_init (void)
 Initialize the transport (weak default on CMSIS boards).
 
void mcp_serial_transport_close (void)
 Release transport resources (weak default on CMSIS boards).
 
int mcp_serial_getchar (void)
 Obtain one input byte (weak default on CMSIS boards).
 
void mcp_serial_send (const char *json, int channel)
 Synchronous sender (weak default on CMSIS boards).
 
int init_serial (void)
 Reset line-buffer state and call mcp_serial_transport_init().
 
int process_serial (void)
 Consume input until one line is processed, RX is empty or EOF occurs.
 
void end_serial (void)
 Reset line-buffer state and call mcp_serial_transport_close().
 

Detailed Description

Serial line API with a default stdio implementation.