From 02d955e9fecda610e9cb7f5317262b907614bf31 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 17 Nov 2010 16:06:20 +0900 Subject: add audio controls from consumer page(HID) --- usb_extra.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 usb_extra.c (limited to 'usb_extra.c') diff --git a/usb_extra.c b/usb_extra.c new file mode 100644 index 0000000000..94c317d981 --- /dev/null +++ b/usb_extra.c @@ -0,0 +1,33 @@ +#include +#include "usb_extra.h" + +int8_t usb_extra_send(uint8_t bits) +{ + uint8_t intr_state, timeout; + + if (!usb_configured()) return -1; + intr_state = SREG; + cli(); + UENUM = EXTRA_ENDPOINT; + timeout = UDFNUML + 50; + while (1) { + // are we ready to transmit? + if (UEINTX & (1<