- usb/usb.h (USB_LANGID_ENGLISH_US): added USB LANGID for US-English
- board.h (board_sernum), board.c (board_sernum, hex, get_sernum,
board_init): provide the board's serial number in "board_sernum"
(UTF-encoded)
- sernum.h (sernum_get_descr), sernum.c (sernum_get_descr): return
string descriptors for the serial number
- descr.c (device_descriptor), usb/dfu.c (device_descriptor):
set iSerialNumber if serial number is available
- atusb.c (main), usb/dfu.c (my_descr): call sernum_get_descr for
unknown descriptors
- Makefile (OBJS, BOOT_OBJS): added sernum.o
What caused the error that looked like a problem with the functional
descriptor was in fact the boot loader resetting between the bus scan
and retrieval of the descriptor.
- board.c (board_init): disable the watchdog timer (tricky !)
- board.h (reset_cpu), board.c: enable the watchdog timer to cause a
CPU reset
- ep0.c (my_setup): uncommented and updated ATUSB_RESET handler
We currently don't provide the DFU Functional Descriptor, which modern
versions of dfu-util request to determine the transfer size. Luckily,
they don't do this if the transfer size is given on the command line.
- usb/atu2.c (ep_init): moved before usb_poll
- usb/atu2.c (usb_poll): register bit was used as mask, not as shift
- usb/atu2.c (usb_poll): call ep_init on USB bus reset
- usb/atu2.c (usb_reset): don't make USB bus reset force a hardware reset
- Makefile (.PHONY, dfu): new target to upload the application with DFU
- usb/usb.h, usb/atu2.c (usb_reset): reset the USB bus by detaching and
re-attaching the device
- boot.c (main): force a USB reset before running the payload
- usb/atu2.c (usb_poll): test for USB reset from the host (in progress)
- usb/dfu.c (my_reset, dfu_init): register user USB reset handler
- 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
- flash.c (flash_write): we don't use eeprom_busy_wait, removed it
- flash.c (flash_write): write the page only at one place
- flash.c (flash_write): corrected the address of the page write
- flash.c (flash_write): value being added to word wasn't shifted
- Makefile (BOOT_ADDR, boot.elf): use variable instead of hiding the
address in a command
- Makefile (CFLAGS): pass BOOT_ADDR as a macro
- Makefile: removed commented-out application flashing code
- boot.c: basic boot loader that runs DFU for 2 s, then starts the payload
- board.h (DFU_USB_VENDOR, DFU_USB_PRODUCT): added USB IDs for DFU
- flash.c: stubs for board-specific Flash functions
- Makefile: build boot.hex for the boot loader
- Makefile (prog): load the boot loader at its rightful place
- Makefile (prog): also set hfuse and the lock fuse
- 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 ?
- Makefile, atusb.pro, atusb.sch, atrf.sch, usb.sch, atusb.cmp, atusb.brd:
resurrected from git history (commit
14b00823b0)
- fw/: moved all C8051F326-specific files over from atusb/fw/
- fw/include/: copied MCU-independent files over from atusb/fw/include/
- fw/include/atusb/ep0.h (HW_TYPE_110131): defined hardware type 2 for
ATmega32U2-based boards
- fw/ep0.c: define HW_TYPE as HW_TYPE_110131, not directly as 2
- fw2/atusb.c: include atusb/ep0.h instead of declaring ep0_init locally
- at86rf230.h (REG_BATMON): address is 0x11, not 0x10
- at86rf230.h (TRX_CMD_MASK): width is 5 bits, not 3
- at86rf230.h (CLKM_CTRL_MASK): width is 3 bits, not 2
- at86rf230.h (PA_EXT_EN, IRQ_2_EXT_EN, TX_AUTO_CRC_ON_231): shifted by one
bit
- at86rf230.h (RX_BL_CTRL, AACK_DIS_ACK): added missing field
- at86rf230.h: added fields PA_BUF_LT and PA_LT
- at86rf230.h (ANT_DIV): added fields of this register
- at86rf230.h (NATMON_VTH_SHIFT, NATMON_VTH_MASK): corrected typo
- fw/Makefile: replaced "make" with $(MAKE) (just for style)
- common/Makefile.common: Makefile settings shared within project. For now,
this contains only the board version, which defaults to 2010-12-16.
- fw/common/Makefile, fw/boot/Makefile, fw/atusb/Makefile: include
common/Makefile.common
- fw/common/Makefile, fw/boot/Makefile, fw/atusb/Makefile: pass board
version to cpp and gcc
- fw/atusb/atusb.c (init_io): individually set IRQ_RF to one, LED and TST
to zero
- fw/atusb/atusb.c (init_io): added macros to set all unused pins to zero
in a way that doesn't need updating if a signal moves from one pin to
another
- include/atusb/ep0.h: added hardware type 1 (2010-12-16 design)
- common/config.h: set hardware type depending on board version
- common/io.h: assign pins depending on board version
- atusb/fw/boot/Makefile: still referred to the project as ATSPI (not ATRF)
in title comment
- atusb/fw/include/atusb/usb-ids.h: still had old atspi path in title comment
- common/io.h: TST is connected to P0_7
- include/at86rf230.h: added test mode registers REG_CONT_TX_0 (0x36) and
REG_CONT_TX_1 (0x3d), with their values
- atspi/atspi.c (set_test_mode): set or reset TST and the LED
- atspi/atspi.c (reset_rf): leave test mode
- atspi/atspi.c (test_mode): enter test mode
- atspi/atspi.c (main): flash the LED when in test mode
- include/atspi/ep0.h (enum atspi_requests), atspi/ep0.c (my_setup): new
command ATSPI_TEST to enter test mode
- include/atspi/ep0.h (EP0ATSPI_MINOR): bumped protocol to version 0.1
- include/at86rf230.h: corrected comment before TRX_CMD field to indicate
that the register is called TRX_STATE
- atrf/: rename to atusb/
- atrf/wpan-atrf.pro, atrf/wpan-atrf.sch, atrf/wpan-atrf.brd,
atrf/wpan-atrf.cmp: rename to atusb.*
- atrf/Makefile: change ben-wpan to atusb
- atrf/atusb.pro (LastNetListRead): update for name change
- tools/Makefile.common (CFLAGS): change fw/ include location from atrf/
to atusb/