Sansa Fuze & e200v2 : do not enable USBSTACK in the bootloader

Don't implement usb_enable() is HAVE_USBSTACK is not defined

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23185 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2009-10-15 10:23:18 +00:00
parent 8bd8d06842
commit 19d70fce20
3 changed files with 14 additions and 0 deletions

View file

@ -185,6 +185,8 @@
#define HAVE_HOTSWAP
#endif
#ifndef BOOTLOADER
#define USB_HANDLED_BY_OF
/* USB On-the-go */
@ -195,6 +197,8 @@
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x7423
#endif /* !BOOTLOADER */
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ

View file

@ -183,6 +183,8 @@
#define HAVE_HOTSWAP
#endif
#ifndef BOOTLOADER
#define USB_HANDLED_BY_OF
/* USB On-the-go */
@ -193,6 +195,8 @@
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x7423
#endif /* !BOOTLOADER */
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ

View file

@ -22,7 +22,9 @@
#include <stdbool.h>
#include "config.h"
#include "usb.h"
#ifdef HAVE_USBSTACK
#include "usb_core.h"
#endif
#include "usb-target.h"
#include "power.h"
#include "as3525.h"
@ -39,10 +41,14 @@
void usb_enable(bool on)
{
#ifdef HAVE_USBSTACK
if (on)
usb_core_init();
else
usb_core_exit();
#else
(void)on;
#endif
}
void usb_init_device(void)