diff options
author | Mark Rawling <mwr@google.com> | 2021-03-23 09:01:03 -0700 |
---|---|---|
committer | Andrew Evans <andrewevans@google.com> | 2022-04-19 10:16:03 -0700 |
commit | 8d31c2236e0d124334ce0ea7c4d4381c5d73aa56 (patch) | |
tree | e7a8c1fdc75a3df39d5021e8cd44a2762dd2d320 | |
parent | a9d3e59bea22294c38e3ddb4a3479afafffcf31e (diff) | |
download | nanohub-8d31c2236e0d124334ce0ea7c4d4381c5d73aa56.tar.gz |
Add Nanohub MCU console channel
The console channel is connected to the MCU RPC handler. It works when
the MCU is in deep sleep unlike the UART channel at /dev/ttySAC4.
Bug:181963193
Change-Id: I47cc453b618d1e377f487aba8915b1aa6b3d3f15
-rw-r--r-- | main.c | 5 | ||||
-rw-r--r-- | main.h | 3 | ||||
-rw-r--r-- | nanohub_exports.h | 1 |
3 files changed, 6 insertions, 3 deletions
@@ -1153,10 +1153,11 @@ static int nanohub_create_devices(struct nanohub_data *data) "nanohub_display", "nanohub_render", "nanohub_debug_log", - "nanohub_metrics" + "nanohub_metrics", + "nanohub_console" }; const uint8_t ids[] = { - 1, ID_NANOHUB_CLIENT_NUM_IDS, 1, 1, 1, 1, 1 + 1, ID_NANOHUB_CLIENT_NUM_IDS, 1, 1, 1, 1, 1, 1 }; for (i = 0, j = 0; j < ID_NANOHUB_MAX - ID_NANOHUB_CLIENT_NUM_IDS + 1; ++j) { @@ -54,7 +54,8 @@ struct nanohub_data { #define ID_NANOHUB_RENDER 18 #define ID_NANOHUB_DEBUG_LOG 19 #define ID_NANOHUB_METRICS 20 - #define ID_NANOHUB_MAX 21 + #define ID_NANOHUB_CONSOLE 21 + #define ID_NANOHUB_MAX 22 struct iio_dev *iio_dev; struct nanohub_io io[ID_NANOHUB_MAX]; diff --git a/nanohub_exports.h b/nanohub_exports.h index 16b2964..add7019 100644 --- a/nanohub_exports.h +++ b/nanohub_exports.h @@ -15,6 +15,7 @@ #define NANOHUB_RENDER_CHANNEL_ID 18 #define NANOHUB_DEBUG_LOG_CHANNEL_ID 19 #define NANOHUB_METRICS_CHANNEL_ID 20 +#define NANOHUB_CONSOLE_CHANNEL_ID 21 /** * Sends a message over a nanohub channel. |