summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuong Hoang <chuongh@google.com>2021-04-27 19:24:49 +0000
committerAndrew Evans <andrewevans@google.com>2022-04-19 10:16:03 -0700
commit644dd23bd8dda1cdbfa395c3ac4e04e3adeb2df4 (patch)
tree7d33253ed93d715cc5b7a5be49af86e8935c2977
parenta728a5643e9a9ce815335b9f09abaf72853bd424 (diff)
downloadnanohub-644dd23bd8dda1cdbfa395c3ac4e04e3adeb2df4.tar.gz
nanohub: Add brightness channel
This is for sending brightness configuration between AP and MCU via nanohub Bug: 186032882 Test: Manual Change-Id: I05fcdd7069549c90721ab16c4bf87a1799921e04
-rw-r--r--main.c3
-rw-r--r--main.h3
-rw-r--r--nanohub_exports.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index bacf8d8..3522dca 100644
--- a/main.c
+++ b/main.c
@@ -1160,9 +1160,10 @@ static int nanohub_create_devices(struct nanohub_data *data)
"nanohub_console",
"nanohub_rpc0",
"nanohub_rpc1"
+ "nanohub_brightness"
};
const uint8_t ids[] = {
- 1, ID_NANOHUB_CLIENT_NUM_IDS, 1, 1, 1, 1, 1, 1, 1, 1
+ 1, ID_NANOHUB_CLIENT_NUM_IDS, 1, 1, 1, 1, 1, 1, 1, 1, 1
};
for (i = 0, j = 0; j < ID_NANOHUB_MAX - ID_NANOHUB_CLIENT_NUM_IDS + 1; ++j) {
diff --git a/main.h b/main.h
index 69f6167..19372ef 100644
--- a/main.h
+++ b/main.h
@@ -57,7 +57,8 @@ struct nanohub_data {
#define ID_NANOHUB_CONSOLE 21
#define ID_NANOHUB_RPC0 22
#define ID_NANOHUB_RPC1 23
- #define ID_NANOHUB_MAX 24
+ #define ID_NANOHUB_BRIGHTNESS 24
+ #define ID_NANOHUB_MAX 25
struct iio_dev *iio_dev;
struct nanohub_io io[ID_NANOHUB_MAX];
diff --git a/nanohub_exports.h b/nanohub_exports.h
index 95377f3..8967724 100644
--- a/nanohub_exports.h
+++ b/nanohub_exports.h
@@ -18,6 +18,7 @@
#define NANOHUB_CONSOLE_CHANNEL_ID 21
#define NANOHUB_RPC0_CHANNEL_ID 22
#define NANOHUB_RPC1_CHANNEL_ID 23
+#define NANOHUB_BRIGHTNESS_CHANNEL_ID 24
/**
* Sends a message over a nanohub channel.