diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-08-04 12:49:51 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-08-04 18:43:40 -0400 |
commit | 88f81ac8622507de75b9c4a6b504d472c4844bac (patch) | |
tree | 41c62078a652e7291101501f53fabed72e85d27c /libmaple | |
parent | c7eeac87ba20fbb7ffd96706c8ff521fe54321c9 (diff) | |
download | librambutan-88f81ac8622507de75b9c4a6b504d472c4844bac.tar.gz librambutan-88f81ac8622507de75b9c4a6b504d472c4844bac.zip |
usb_cdcacm: Remove unused/redundant variables.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple')
-rw-r--r-- | libmaple/usb/stm32f1/usb_cdcacm.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libmaple/usb/stm32f1/usb_cdcacm.c b/libmaple/usb/stm32f1/usb_cdcacm.c index f425cb8..ca63b19 100644 --- a/libmaple/usb/stm32f1/usb_cdcacm.c +++ b/libmaple/usb/stm32f1/usb_cdcacm.c @@ -316,10 +316,6 @@ static volatile usb_cdcacm_line_coding line_coding = { .bDataBits = 8, }; -/* Which of USB_CDCACM_GET_LINE_CODING and USB_CDCACM_SET_LINE_CODING - * we've most recently received. */ -static volatile uint8 last_request = 0; - /* DTR in bit 0, RTS in bit 1. */ static volatile uint8 line_dtr_rts = 0; @@ -642,11 +638,9 @@ static RESULT usbDataSetup(uint8 request) { switch (request) { case USB_CDCACM_GET_LINE_CODING: CopyRoutine = vcomGetSetLineCoding; - last_request = USB_CDCACM_GET_LINE_CODING; break; case USB_CDCACM_SET_LINE_CODING: CopyRoutine = vcomGetSetLineCoding; - last_request = USB_CDCACM_SET_LINE_CODING; break; default: break; @@ -671,7 +665,6 @@ static RESULT usbDataSetup(uint8 request) { static RESULT usbNoDataSetup(uint8 request) { RESULT ret = USB_UNSUPPORT; - uint8 new_signal; if (Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT)) { switch (request) { @@ -681,10 +674,9 @@ static RESULT usbNoDataSetup(uint8 request) { break; case USB_CDCACM_SET_CONTROL_LINE_STATE: /* Track changes to DTR and RTS. */ - new_signal = (pInformation->USBwValues.bw.bb0 & - (USB_CDCACM_CONTROL_LINE_DTR | - USB_CDCACM_CONTROL_LINE_RTS)); - line_dtr_rts = new_signal & 0x03; + line_dtr_rts = (pInformation->USBwValues.bw.bb0 & + (USB_CDCACM_CONTROL_LINE_DTR | + USB_CDCACM_CONTROL_LINE_RTS)); ret = USB_SUCCESS; break; } |