From c4092f07f055ac914155930d6a0acba299f96082 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 23 Sep 2011 17:42:07 -0400 Subject: usb: Remove usbPowerOff(), move usbPowerOn() to usb_callbacks.c. Remove usbPowerOn(), usbPowerOff() prototypes from usb.h. These aren't used outside of the USB subsystem, so they don't belong here. Move usbPowerOn() from usb.c to usb_callbacks.c. This is the only place where it's used. Remove the unused usbPowerOff() (from usb.c) altogether. Signed-off-by: Marti Bolivar --- libmaple/usb/usb.c | 28 ---------------------------- 1 file changed, 28 deletions(-) mode change 100644 => 100755 libmaple/usb/usb.c (limited to 'libmaple/usb/usb.c') diff --git a/libmaple/usb/usb.c b/libmaple/usb/usb.c old mode 100644 new mode 100755 index 1754360..4f31c33 --- a/libmaple/usb/usb.c +++ b/libmaple/usb/usb.c @@ -191,34 +191,6 @@ void usbResume(RESUME_STATE eResumeSetVal) { } } -RESULT usbPowerOn(void) { - u16 wRegVal; - - wRegVal = CNTR_FRES; - _SetCNTR(wRegVal); - - wInterrupt_Mask = 0; - _SetCNTR(wInterrupt_Mask); - _SetISTR(0); - wInterrupt_Mask = CNTR_RESETM | CNTR_SUSPM | CNTR_WKUPM; // the bare minimum - _SetCNTR(wInterrupt_Mask); - - return USB_SUCCESS; -} - -RESULT usbPowerOff(void) { - _SetCNTR(CNTR_FRES); - _SetISTR(0); - _SetCNTR(CNTR_FRES + CNTR_PDWN); - - /* note that all weve done here is powerdown the - usb peripheral. we have no disabled the clocks, - pulled the usb_disc pin back up, or reset the - application state machines */ - - return USB_SUCCESS; -} - /* overloaded ISR routine, this is the main usb ISR */ void __irq_usb_lp_can_rx0(void) { wIstr = _GetISTR(); -- cgit v1.2.3