1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-19 22:07:10 +02:00
Commit Graph

7 Commits

Author SHA1 Message Date
Stefan Schmidt
a48c6dcb30 usb/dfu.h: Include usb.h to avoid gcc warning
With warnings treated as errors I get this:
In file included from flash.c:19:0:
usb/dfu.h:107:35: error: 'struct setup_request' declared inside parameter list
usb/dfu.h:107:35: error: its scope is only this definition or declaration, which
 is probably not what you want
make: *** [flash.o] Error 1

Struct setup_request is declared in usb.h so include it.

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
2011-06-17 12:01:38 -03:00
Werner Almesberger
5f50611735 atusb/fw/usb/: DFU_ITF_DESCR also needs a protocol argument
- dfu.h (enum dfu_itf_proto): bInterfaceProtocol values for DFU
  functional descriptor
- dfu.h (DFU_ITF_DESCR): added protocol argument
- dfu.c (config_descriptor): pass protocol to DFU_ITF_DESCR
2011-06-10 23:15:51 -03:00
Werner Almesberger
2544004a86 atusb/fw/: moved common elements of DFU processing to dfu_common.c
- dfu.c (functional_descriptor, dfu, my_descr), dfu.h (dfu_my_descr):
  moved to dfu_common.c
- dfu.c (my_setup), dfu.h (dfu_setup_common), dfu_common.c
  (dfu_setup_common): moved handling of DFU_GETSTATUS, DFU_CLRSTATUS,
  and DFU_GETSTATE from my_setup to dfu_setup_common
- dfu_common.c (my_descr), dfu.c (dfu_init): renamed my_descr to
  dfu_my_descr
- Makefile (BOOT_OBJS): added dfu_common.o
2011-06-10 22:04:12 -03:00
Werner Almesberger
7a2c785e29 atusb/fw/usb/dfu.h: define DFU interface descriptor, for later sharing
- dfu.h (DFU_ITF_DESCR): define DFU interface descriptor
- dfu.c (config_descriptor): use DFU_ITF_DESCR instead of open-coding
  the descriptor
2011-06-10 19:33:24 -03:00
Werner Almesberger
c265151d2b atusb/fw: introduced function flash_end_write to properly finish flashing
- dfu.h (flash_end_write), flash.c (flash_end_write): write any incomplete
  buffer
- flash.c (flash_write, flash_end_write): call boot_rww_enable only at the
  very end, it won't erase our buffer in mid-page
- usb/dfu.c (my_setup): call flash_end_write at the end of a download
2011-03-11 17:56:41 -03:00
Werner Almesberger
f91738c306 atusb/fw/usb/: adapted DFU engine to current stack and abstracted Flash ops
- dfu.c: updated includes
- dfu.c (device_descriptor): renamed USB IDs from USB_VENDOR/PRODUCT to
  DFU_USB_VENDOR/PRODUCT to allow differentiation
- dfu.c: changed all __bit to "int"
- dfu.c: removed all __xdata and __reentrant
- dfu.c: changed "ep0" to "eps[0]"
- dfu.c (payload, flash_erase_page, flash_write_byte, block_write,
  block_receive, block_transmit, my_setup): abstracted Flash interface
  and removed target-specific operations
- dfu.h: added prototypes for target-specific Flash operations
- dfu,c (my_setup, my_descr): removed SDCC-specific hacks
- dfu.c (my_reset): commented out - did we actually use this ?
2011-03-08 19:10:58 -03:00
Werner Almesberger
fb2204ad84 usb/: added DFU implementation from f386base/fw/boot/ (unported) 2011-03-08 19:05:26 -03:00