From 44ee3d7e5ab82a5ab63a7c5180c758e94bd6e50b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 13 Aug 2014 20:32:02 +0200 Subject: mds-kkbd: announce new keyboard when starting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kkbd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mds-kkbd.c b/src/mds-kkbd.c index 9444f7d..ef4f756 100644 --- a/src/mds-kkbd.c +++ b/src/mds-kkbd.c @@ -63,6 +63,7 @@ * The name of the keyboard for which its server implements control */ #define KEYBOARD_ID "kernel" +/* NOTE: length hardcoded in `initialise_server` */ /** * LED:s that we believe are pressent on the keyboard @@ -95,7 +96,7 @@ server_characteristics_t server_characteristics = /** * Value of the ‘Message ID’ header for the next message */ -static int32_t message_id = 2; +static int32_t message_id = 3; /** * Buffer for received messages @@ -220,7 +221,13 @@ int initialise_server(void) "Length: 59\n" "\n" "Command: enumerate-keyboards\n" - "Command: keyboard-enumeration\n"; + "Command: keyboard-enumeration\n" + /* NEXT MESSAGE */ + "Command: new-keyboard\n" + "Message ID: 2\n" + "Length: 7\n" + "\n" + KEYBOARD_ID "\n"; fail_if (open_leds() < 0); stage = 1; -- cgit v1.2.3-70-g09d2