aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/usb/usb.c19
-rw-r--r--libmaple/usb/usb.h6
2 files changed, 4 insertions, 21 deletions
diff --git a/libmaple/usb/usb.c b/libmaple/usb/usb.c
index 9b70b6b..5c4c35a 100644
--- a/libmaple/usb/usb.c
+++ b/libmaple/usb/usb.c
@@ -99,7 +99,7 @@ struct {
volatile uint8 bESOFcnt;
} ResumeS;
-void setupUSB (gpio_dev *disc_dev, uint8 disc_bit) {
+void usb_cdcacm_enable(gpio_dev *disc_dev, uint8 disc_bit) {
gpio_set_mode(disc_dev, disc_bit, GPIO_OUTPUT_PP);
/* setup the apb1 clock for USB */
@@ -110,7 +110,7 @@ void setupUSB (gpio_dev *disc_dev, uint8 disc_bit) {
USB_Init(); // low level init routine provided by the ST library
}
-void disableUSB (gpio_dev *disc_dev, uint8 disc_bit) {
+void usb_cdcacm_disable(gpio_dev *disc_dev, uint8 disc_bit) {
// These are just guesses about how to do this
// TODO: real disable function
usbDsbISR();
@@ -400,21 +400,6 @@ uint32 usbReceiveBytes(uint8* recvBuf, uint32 len) {
return len;
}
-void usbSendHello(void) {
- uint8 bufin = 48 + recvBufIn;;
- uint8 bufout = 48 + recvBufOut;
- uint8 avail = 48 + usbBytesAvailable();
-
- char *line = "\r\n";
- while(usbSendBytes(&bufin,1) == 0);
- while(usbSendBytes(&bufout,1) == 0);
- while(usbSendBytes(&avail,1) == 0);
- while(usbSendBytes((uint8*)line,2) == 0);
-
- uint8 recv[64];
- usbReceiveBytes(&recv[0],1);
-}
-
uint8 usbGetDTR() {
return ((line_dtr_rts & CONTROL_LINE_DTR) != 0);
}
diff --git a/libmaple/usb/usb.h b/libmaple/usb/usb.h
index 0df3c8d..c3d587d 100644
--- a/libmaple/usb/usb.h
+++ b/libmaple/usb/usb.h
@@ -57,8 +57,8 @@ typedef enum {
extern volatile uint32 bDeviceState;
-void setupUSB(gpio_dev*, uint8);
-void disableUSB(gpio_dev*, uint8);
+void usb_cdcacm_enable(gpio_dev*, uint8);
+void usb_cdcacm_disable(gpio_dev*, uint8);
void usbSuspend(void);
void usbResumeInit(void);
void usbResume(RESUME_STATE);
@@ -84,8 +84,6 @@ uint8 usbIsConnected(void);
uint8 usbIsConfigured(void);
uint16 usbGetPending(void);
-void usbSendHello(void);
-
#ifdef __cplusplus
} // extern "C"
#endif