mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 14:58:25 +02:00
atusb/fw/: remove unused items when building the USB driver for the boot loader
- usb/atu2.c (NUM_EPS), board.h (NUM_EPS): moved definition to board.h - board.h (NUM_EPS): use one EP for the boot loader, two for the application - usb/atu2.c (ep_init): initialize EP 1 only in an application build
This commit is contained in:
parent
6909fc232a
commit
8f949842db
@ -64,6 +64,12 @@
|
||||
|
||||
#define BOARD_MAX_mA 40
|
||||
|
||||
#ifdef BOOT_LOADER
|
||||
#define NUM_EPS 1
|
||||
#else
|
||||
#define NUM_EPS 2
|
||||
#endif
|
||||
|
||||
#define HAS_BOARD_SERNUM
|
||||
|
||||
extern uint8_t board_sernum[42];
|
||||
|
@ -40,9 +40,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#define NUM_EPS 2
|
||||
|
||||
|
||||
struct ep_descr eps[NUM_EPS];
|
||||
|
||||
|
||||
@ -199,6 +196,8 @@ static void ep_init(void)
|
||||
eps[0].state = EP_IDLE;
|
||||
eps[0].size = 64;
|
||||
|
||||
#ifndef BOOT_LOADER
|
||||
|
||||
UENUM = 1;
|
||||
UECONX = (1 << RSTDT) | (1 << EPEN); /* enable */
|
||||
UECFG0X = (1 << EPTYPE1) | (1 << EPDIR); /* bulk IN */
|
||||
@ -211,6 +210,8 @@ static void ep_init(void)
|
||||
|
||||
eps[1].state = EP_IDLE;
|
||||
eps[1].size = 64;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user