- board.c (board_init), board_app.h (timer_init), board_app.c
(timer_init): moved timer initialization from board_init to
new function timer_init
- atusb.c (main): call timer_init
reset_rf now resets all GPIOs to their default state. This way, we
can easily recover from an incomplete or incorrect use of ATUSB_GPIO.
- atusb.c (main), board.c (reset_rf): moved call to spi_init into
reset_rf
- board.c (reset_rf, board_init): moved GPIO setup to reset_rf
- board.c (reset_rf): set GPIOs to reset defaults
- board.h (gpio), board.c: read/modify/write all settings of GPIO
ports
- include/atusb/ep0.h (enum atspi_requests): added new request
ATUSB_GPIO
- ep0.c (my_setup): ATUSB_GPIO reads/reconfigures a GPIO port
- atusb.c (main): poll the 16 bit timer for overflows
- board.h (timer_poll, timer_read), (board.c (timer_h, timer_poll,
timer_read, board_init): added support for a free-running 48 bit timer
(16 bits in hardware, 32 bits in software)
- include/atusb/ep0.h (ATUSB_TIMER), ep0.c (my_setup): new request
ATUSB_TIMER to retrieve the value of the 8 MHz counter
- include/atusb/ep0.h (enum atspi_requests): describe what the groups
of requests do
- 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
- 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