aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--TODO.org6
-rw-r--r--src/lib.rs7
3 files changed, 12 insertions, 8 deletions
diff --git a/README.md b/README.md
index 6fda223..11b5b64 100644
--- a/README.md
+++ b/README.md
@@ -6,5 +6,8 @@ library.
# Hardware
-Tested on a Logitech G105 keyboard, but any other low-end keyboard
-should probably work.
+This has been tested on the following keyboards:
+
+ * Logitech G105
+ * Niz Plum 85EC
+ * Keyboard.io Model 01
diff --git a/TODO.org b/TODO.org
index b210915..4ed5b70 100644
--- a/TODO.org
+++ b/TODO.org
@@ -1,9 +1,3 @@
* Documentation
- README.md
- Literally every trait and method.
-
-* Parse HID descriptors.
-This driver currently assumes a fair amount of behavior on the part of
-the keyboard, which, for simple keyboards like the Logitech G105 I'm
-testing with, works. More complicated keyboards will probably require
-more in-depth probing and feature selection.
diff --git a/src/lib.rs b/src/lib.rs
index b068451..4028980 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -26,6 +26,7 @@ const MAX_ENDPOINTS: usize = 2;
// The maximum size configuration descriptor we can handle.
const CONFIG_BUFFER_LEN: usize = 128;
+/// Boot protocol keyboard driver for USB hosts.
pub struct BootKeyboard<F> {
devices: [Option<Device>; MAX_DEVICES],
callback: F,
@@ -40,6 +41,12 @@ impl<F> BootKeyboard<F>
where
F: FnMut(u8, &[u8]),
{
+ /// Create a new driver instance which will call
+ /// `callback(address: u8, buffer: &[u8])` when a new keyboard
+ /// report is received.
+ ///
+ /// `address` is the address of the USB device which received the
+ /// report and `buffer` is the contents of the report itself.
pub fn new(callback: F) -> Self {
Self {
devices: [None; MAX_DEVICES],