aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/usb/usb.h
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-09-23 17:56:24 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-10-18 13:30:18 -0400
commitbbcbf65fd7d074268f4e25ae014965bceb995b79 (patch)
treed027563c1d4b860d3e77119ee26f75943ced80a2 /libmaple/usb/usb.h
parent2e392bbf59c4c746714d71c99757f02da4c57179 (diff)
downloadlibrambutan-bbcbf65fd7d074268f4e25ae014965bceb995b79.tar.gz
librambutan-bbcbf65fd7d074268f4e25ae014965bceb995b79.zip
usb: Disentangle CDC ACM functionality.
Add new usb_cdcacm.h, which provides the virtual serial port API. This file (and new usb_cdcacm.c) consolidate the VCOM support, which was previously distributed through descriptors.[hc], usb.[hc], usb_callbacks.[hc], and usb_config.h. Add usb_init_usblib() to usb.h, as a way of initializing the USB peripheral in terms of the data structures required by usb_lib. This is used by the new usb_cdcacm_enable(). Create new usb_lib_globals.h, with declarations for the usb_lib global state which is most used throughout the rest of the libmaple USB stack. Remove descriptors.c and usb_callbacks.[hc]; they are no longer necessary. Update the USB README accordingly. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/usb/usb.h')
-rw-r--r--[-rwxr-xr-x]libmaple/usb/usb.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/libmaple/usb/usb.h b/libmaple/usb/usb.h
index 853300b..da6fa55 100755..100644
--- a/libmaple/usb/usb.h
+++ b/libmaple/usb/usb.h
@@ -60,8 +60,11 @@ typedef enum {
extern volatile uint32 bDeviceState;
-void usb_cdcacm_enable(gpio_dev*, uint8);
-void usb_cdcacm_disable(gpio_dev*, uint8);
+struct _DEVICE_PROP;
+struct _USER_STANDARD_REQUESTS;
+void usb_init_usblib(struct _DEVICE_PROP*,
+ struct _USER_STANDARD_REQUESTS*);
+
void usbSuspend(void);
void usbResumeInit(void);
void usbResume(RESUME_STATE);
@@ -70,16 +73,8 @@ void usbResume(RESUME_STATE);
void __irq_usb_lp_can_rx0(void);
void usbWaitReset(void);
-/* blocking functions for send/receive */
-void usbBlockingSendByte(char ch);
-uint32 usbSendBytes(const uint8* sendBuf,uint32 len);
-uint32 usbBytesAvailable(void);
-uint32 usbReceiveBytes(uint8* recvBuf, uint32 len);
-uint8 usbGetDTR(void);
-uint8 usbGetRTS(void);
uint8 usbIsConnected(void);
uint8 usbIsConfigured(void);
-uint16 usbGetPending(void);
#ifdef __cplusplus
} // extern "C"