From 91572bbf2031f1e1a1188cb1f4ee0d2d1dcf1457 Mon Sep 17 00:00:00 2001 From: Conor Date: Sun, 31 Jan 2016 01:23:13 -0500 Subject: [PATCH] readme update --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 900177a..ab3326a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,21 @@ the [U2F protocol](https://fidoalliance.org/specifications/overview/). Firmware ======== +### Code overview + +The HID layer for U2F is implemented in `u2f_hid.c`. The USB +boilerplate is in `callback.c`. + +Firmware generally works as follows: + +* Main loop adds a request for USB to read a 64 byte packet +* `USBD_XferCompleteCb` gets called with packet when it comes +* USB HID layer gets called +* USB HID layer will call U2F layer when appropriate + +[U2F HID layer spec](https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-hid-protocol.html) + +[U2F layer spec](https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-raw-message-formats.html) ### Using Simplicity Studio