aboutsummaryrefslogtreecommitdiff
path: root/libmaple/include
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-07-31 14:36:31 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-07-31 15:04:49 -0400
commitef1cc46487b9dfdff34634ced9f6c44ebfb7b4e2 (patch)
treea1b515b456a1c568f37c807d99a3b7e999a96c85 /libmaple/include
parent572633d61ef1ea8fd4b9332bf260a5143f1dd58a (diff)
usb_cdcacm: Add usb_cdcacm_peek().
We need this so the bootloader reset signal detector can look ahead in the byte stream without stealing bytes from the user when "1EAF" isn't received. While we're doing this, take the time to fix a bunch of RX-related code (dead code removal, adding volatile, etc.) Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/include')
-rw-r--r--libmaple/include/libmaple/usb_cdcacm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmaple/include/libmaple/usb_cdcacm.h b/libmaple/include/libmaple/usb_cdcacm.h
index 3b15d48..1e2ed59 100644
--- a/libmaple/include/libmaple/usb_cdcacm.h
+++ b/libmaple/include/libmaple/usb_cdcacm.h
@@ -87,6 +87,7 @@ void usb_cdcacm_disable(gpio_dev*, uint8);
void usb_cdcacm_putc(char ch);
uint32 usb_cdcacm_tx(const uint8* buf, uint32 len);
uint32 usb_cdcacm_rx(uint8* buf, uint32 len);
+uint32 usb_cdcacm_peek(uint8* buf, uint32 len);
uint32 usb_cdcacm_data_available(void); /* in RX buffer */
uint16 usb_cdcacm_get_pending(void);