BSB Developer Docs
Loading...
Searching...
No Matches
cli_intercom.h
Go to the documentation of this file.
1
6#pragma once
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <containers/pipe.h>
13
14#define RECORD_CLI_INTERCOM "cli_intercom"
15
16typedef struct CliIntercom CliIntercom;
17
18typedef enum {
19 CliIntercomSpawnStatusOk,
20 CliIntercomSpawnStatusChannelTaken, //<! Shell is already spawned and hasn't exited yet
21 CliIntercomSpawnStatusTimeout,
22} CliIntercomSpawnStatus;
23
24#if defined(STM32U595xx)
25#define CLI_INTERCOM_MASTER
26#elif defined(SI917)
27#define CLI_INTERCOM_SLAVE
28#else
29#error "Unsupported MCU"
30#endif
31
32// This service has no public API on f64.
33#ifdef CLI_INTERCOM_MASTER
34
49CliIntercomSpawnStatus
50 cli_intercom_spawn(CliIntercom* cli_intercom, PipeSide* pipe, bool close_pipe_on_detach);
51
57void cli_intercom_join(CliIntercom* cli_intercom);
58
59#endif
60
61#ifdef __cplusplus
62}
63#endif
Pipe convenience module.
Definition cli_intercom.c:27
There are two PipeSides per pipe.
Definition pipe.c:22