From 34fd228bf9158b0df47b4ec04b20db682963d5b0 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 29 Dec 2010 17:02:36 +0100 Subject: Move generic USB stuff to a subdir, dedupe .h files. Adapt examples and the lib code accordingly. --- lib/usb/usb.c | 3 +-- lib/usb/usb_control.c | 3 +-- lib/usb/usb_f103.c | 5 +---- lib/usb/usb_private.h | 2 -- lib/usb/usb_standard.c | 4 +--- 5 files changed, 4 insertions(+), 13 deletions(-) (limited to 'lib/usb') diff --git a/lib/usb/usb.c b/lib/usb/usb.c index dd9d00c..c201b3e 100644 --- a/lib/usb/usb.c +++ b/lib/usb/usb.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include #include +#include #include "usb_private.h" struct _usbd_device _usbd_device; @@ -92,4 +92,3 @@ void _usbd_reset(void) if(_usbd_device.user_callback_reset) _usbd_device.user_callback_reset(); } - diff --git a/lib/usb/usb_control.c b/lib/usb/usb_control.c index 73e8372..d1796d9 100644 --- a/lib/usb/usb_control.c +++ b/lib/usb/usb_control.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include #include +#include #include "usb_private.h" static struct usb_control_state { @@ -251,4 +251,3 @@ void _usbd_control_in(uint8_t ea) usbd_ep_stall_set(0, 1); } } - diff --git a/lib/usb/usb_f103.c b/lib/usb/usb_f103.c index 381ee79..a23a8e3 100644 --- a/lib/usb/usb_f103.c +++ b/lib/usb/usb_f103.c @@ -20,9 +20,7 @@ #include #include #include - -#include - +#include #include "usb_private.h" /** Initialize USB Device Controller. @@ -250,4 +248,3 @@ void usbd_poll(void) if(istr & USB_ISTR_SOF) USB_CLR_ISTR_SOF(); } - diff --git a/lib/usb/usb_private.h b/lib/usb/usb_private.h index 894771a..453ed77 100644 --- a/lib/usb/usb_private.h +++ b/lib/usb/usb_private.h @@ -17,7 +17,6 @@ * along with this program. If not, see . */ - #ifndef __USB_PRIVATE_H #define __USB_PRIVATE_H @@ -77,4 +76,3 @@ void _usbd_hw_set_address(uint8_t addr); void _usbd_hw_endpoints_reset(void); #endif - diff --git a/lib/usb/usb_standard.c b/lib/usb/usb_standard.c index e6d0727..3e1ff99 100644 --- a/lib/usb/usb_standard.c +++ b/lib/usb/usb_standard.c @@ -18,8 +18,7 @@ */ #include - -#include +#include #include "usb_private.h" void usbd_register_set_config_callback(void (*callback)(uint16_t wValue)) @@ -370,4 +369,3 @@ int _usbd_standard_request(struct usb_setup_data *req, uint8_t **buf, return 0; } } - -- cgit v1.2.3