CMSIS-MCP  Version 0.0.0
Embedded MCP server with serial transport
 
Loading...
Searching...
No Matches
serial_transport.h
Go to the documentation of this file.
1
5#ifndef serial_transport_h
6#define serial_transport_h
7#include <c_mcp_config.h>
8#ifdef __cplusplus
9extern "C" {
10#endif
11
51
53#define MCP_SERIAL_EOF (-1)
55#define MCP_SERIAL_NO_DATA (-2)
57#define MCP_SERIAL_INPUT_LOST (-3)
58
66
73
81
92void mcp_serial_send(const char *json, int channel);
93
94#if C_MCP_ENABLE_SERIAL_LOOP
99int init_serial(void);
100
116
121void end_serial(void);
122#endif
124#ifdef __cplusplus
125}
126#endif
127#endif
int mcp_serial_getchar(void)
Obtain one input byte (weak default on CMSIS boards).
void end_serial(void)
Reset line-buffer state and call mcp_serial_transport_close().
int mcp_serial_transport_init(void)
Initialize the transport (weak default on CMSIS boards).
int init_serial(void)
Reset line-buffer state and call mcp_serial_transport_init().
void mcp_serial_transport_close(void)
Release transport resources (weak default on CMSIS boards).
int process_serial(void)
Consume input until one line is processed, RX is empty or EOF occurs.
void mcp_serial_send(const char *json, int channel)
Synchronous sender (weak default on CMSIS boards).