summaryrefslogtreecommitdiffstats
path: root/hidd/main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-09-29 16:15:41 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-09-29 16:15:41 +0000
commit6d2c7e465e4a8e3e6bb9595ccfd0f471070eda69 (patch)
treea7e13644ff92608e32c9e77661b68467dd12dd10 /hidd/main.c
parent2f867d62c154c7746b97480fee121a5feb308a94 (diff)
Add framework for Celluon keyboard
Diffstat (limited to 'hidd/main.c')
-rw-r--r--hidd/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hidd/main.c b/hidd/main.c
index 89c79509..a825f0de 100644
--- a/hidd/main.c
+++ b/hidd/main.c
@@ -470,6 +470,13 @@ static void do_connect(int ctl, bdaddr_t *src, bdaddr_t *dst, uint8_t subclass,
}
break;
}
+ if (subclass == 0x02 || !strcmp(name, "Serial Port")) {
+ if (celluon_keyboard(src, dst, channel) < 0) {
+ close(ctl);
+ exit(1);
+ }
+ break;
+ }
break;
case HEADSET_SVCLASS_ID:
@@ -551,8 +558,9 @@ static void do_search(int ctl, bdaddr_t *bdaddr, uint8_t subclass, int fakehid,
for (i = 0; i < num_rsp; i++) {
memcpy(class, (info+i)->dev_class, 3);
- if (class[0] == 0x00 && class[2] == 0x00 &&
- (class[1] == 0x40 || class[1] == 0x1f)) {
+ if ((class[0] == 0x00 && class[2] == 0x00 &&
+ (class[1] == 0x40 || class[1] == 0x1f)) ||
+ (class[0] == 0x10 && class[1] == 0x02 && class[2] == 0x40)) {
bacpy(&dst, &(info+i)->bdaddr);
ba2str(&dst, addr);