Skip to content

Commit 0e8ee75

Browse files
committed
All the code is in, ready to run it.
1 parent 3908faa commit 0e8ee75

File tree

3 files changed

+100
-133
lines changed

3 files changed

+100
-133
lines changed

include/zephyr/ipc/icmsg.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ enum icmsg_state {
3232
ICMSG_STATE_INITIALIZING_SID_DISABLED, /**< Instance is initializing - waiting for remote to acknowledge. Sending will fail. Opening allowed, session will change and remote may or may not get unbound() callback. */
3333
ICMSG_STATE_INITIALIZING_SID_ENABLED, /**< Instance is initializing - waiting for remote to acknowledge. Sending will fail. Opening allowed, session will change and remote may or may not get unbound() callback. */
3434
ICMSG_STATE_INITIALIZING_SID_COMPAT, /**< Instance is initializing - waiting for remote to acknowledge. Sending will fail. Opening allowed, session will change and remote may or may not get unbound() callback. */
35+
ICMSG_STATE_DISCONNECTED, /**< Instance was connected, but get disconnected. Sending will be silently discarded, because it there may be old sends. Opening allowed. */
36+
// Connected states must be at the end
3537
ICMSG_STATE_CONNECTED_SID_DISABLED, /**< Instance is connected. Sending will be successful. Opening allowed, session will change and remote will get unbound() callback. */
3638
ICMSG_STATE_CONNECTED_SID_ENABLED, /**< Instance is connected. Sending will be successful. Opening allowed, session will change and remote will get unbound() callback. */
37-
ICMSG_STATE_DISCONNECTED_SID_ENABLED, /**< Instance was connected, but get disconnected. Sending will be silently discarded, because it there may be old sends. Opening allowed. */
38-
// TODO: ICMSG_STATE_COMPATIBILITY
3939
};
4040

4141
enum icmsg_unbound_mode {
42-
ICMSG_UNBOUND_MODE_DISABLE,
43-
ICMSG_UNBOUND_MODE_ENABLE,
44-
ICMSG_UNBOUND_MODE_COMPATIBILITY,
42+
ICMSG_UNBOUND_MODE_DISABLE = ICMSG_STATE_INITIALIZING_SID_DISABLED,
43+
ICMSG_UNBOUND_MODE_ENABLE = ICMSG_STATE_INITIALIZING_SID_ENABLED,
44+
ICMSG_UNBOUND_MODE_COMPATIBILITY = ICMSG_STATE_INITIALIZING_SID_COMPAT,
4545
};
4646

4747
struct icmsg_config_t {
@@ -65,7 +65,7 @@ struct icmsg_data_t {
6565
/* General */
6666
const struct icmsg_config_t *cfg;
6767
#ifdef CONFIG_MULTITHREADING
68-
struct k_work_delayable notify_work;
68+
struct k_work_delayable notify_work; // TODO: Not needed if no compatibility needed
6969
struct k_work mbox_work;
7070
#endif
7171
uint16_t remote_session;

0 commit comments

Comments
 (0)