diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-07-31 14:36:31 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-07-31 15:04:49 -0400 |
commit | 925446023aa23c2141d711c6e42cd2f75ce70a93 (patch) | |
tree | a1b515b456a1c568f37c807d99a3b7e999a96c85 /libmaple/include | |
parent | 723ae6fd39fae696540c32643fabcb7e790b45b7 (diff) | |
download | librambutan-925446023aa23c2141d711c6e42cd2f75ce70a93.tar.gz librambutan-925446023aa23c2141d711c6e42cd2f75ce70a93.zip |
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.h | 1 |
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); |