Date:2011-06-26 11:59:13 (8 years 2 months ago)
Author:Werner Almesberger
Commit:8f949842dbe78f6e0dada5de50b55757f06a7293
Message: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
Files: atusb/fw/board.h (1 diff)
atusb/fw/usb/atu2.c (3 diffs)

Change Details

atusb/fw/board.h
6464
6565#define BOARD_MAX_mA 40
6666
67#ifdef BOOT_LOADER
68#define NUM_EPS 1
69#else
70#define NUM_EPS 2
71#endif
72
6773#define HAS_BOARD_SERNUM
6874
6975extern uint8_t board_sernum[42];
atusb/fw/usb/atu2.c
4040#endif
4141
4242
43#define NUM_EPS 2
44
45
4643struct ep_descr eps[NUM_EPS];
4744
4845
...... 
199196    eps[0].state = EP_IDLE;
200197    eps[0].size = 64;
201198
199#ifndef BOOT_LOADER
200
202201    UENUM = 1;
203202    UECONX = (1 << RSTDT) | (1 << EPEN); /* enable */
204203    UECFG0X = (1 << EPTYPE1) | (1 << EPDIR); /* bulk IN */
...... 
211210
212211    eps[1].state = EP_IDLE;
213212    eps[1].size = 64;
213
214#endif
214215}
215216
216217

Archive Download the corresponding diff file



interactive