Move generic USB stuff to a subdir, dedupe .h files.

Adapt examples and the lib code accordingly.
This commit is contained in:
Uwe Hermann
2010-12-29 17:02:36 +01:00
parent f062777930
commit 34fd228bf9
24 changed files with 38 additions and 429 deletions

View File

@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <usbd.h>
#include <string.h>
#include <usb/usbd.h>
#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();
}

View File

@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <usbd.h>
#include <stdlib.h>
#include <usb/usbd.h>
#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);
}
}

View File

@@ -20,9 +20,7 @@
#include <libopenstm32/common.h>
#include <libopenstm32/tools.h>
#include <libopenstm32/usb.h>
#include <usbd.h>
#include <usb/usbd.h>
#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();
}

View File

@@ -17,7 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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

View File

@@ -18,8 +18,7 @@
*/
#include <string.h>
#include <usbd.h>
#include <usb/usbd.h>
#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;
}
}