summaryrefslogtreecommitdiffstats
path: root/project.h
diff options
context:
space:
mode:
authorJames <git@panaceas.org>2014-05-05 17:50:20 +0100
committerJames <git@panaceas.org>2014-05-05 17:50:20 +0100
commit470457e22a1b5537013603d5e367c51e47bb61bf (patch)
tree6b72d32bfd9eaec31c8c520d18782ccaebc01759 /project.h
downloadkmd_usb-470457e22a1b5537013603d5e367c51e47bb61bf.tar.gz
kmd_usb-470457e22a1b5537013603d5e367c51e47bb61bf.tar.bz2
kmd_usb-470457e22a1b5537013603d5e367c51e47bb61bf.zip
fish
Diffstat (limited to 'project.h')
-rw-r--r--project.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/project.h b/project.h
new file mode 100644
index 0000000..eba3de8
--- /dev/null
+++ b/project.h
@@ -0,0 +1,57 @@
+#include <stdio.h>
+#include <linux/input.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <malloc.h>
+#include <usb.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#ifdef BROMIUM
+#define APPLE_KEYBOARD
+#define N_COMPUTER 4
+#define N_CONSOLE 1
+#define MAP_NULL
+#define LAYOUT_NULL
+#endif
+
+#ifdef HOME
+#define N_COMPUTER 7
+#define N_CONSOLE 3
+#define MAP_HOME
+#define LAYOUT_HOME
+#endif
+
+typedef struct MM_struct MM;
+
+typedef struct input_dev
+{
+ struct input_dev *next;
+ int id; /* /dev/input/event%d */
+ int present; /* !0 if the device file exists */
+ int fd; /* fd if the device is open, -1 otherwise */
+ int blacklistid; /* !0 if the device is a km link */
+} input_dev_t;
+
+#define OUTPUT_KEY_LIST_LEN 10
+
+typedef struct output_dev
+{
+ struct output_dev *next;
+
+ char filename[PATH_MAX + 1];
+ int present;
+
+ struct usb_dev_handle *devh;
+ uint32_t seq;
+
+ uint8_t keys[OUTPUT_KEY_LIST_LEN];
+
+} output_dev_t;
+
+
+
+#include "prototypes.h"