Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Maple Bootloader with modifications to run on the LeafLabs Audio Board,
which runs off of an stm32f103RET6 instead of an RBT6. The changes between
the regular bootloader and this one are:
config.h -
added a FLASH_PAGE_SIZE parameter, which is used in flash_erase_pages
moved the LED/BUT pins to their proper places
usb.h
changed wMaxTransferSize to FLASH_PAGE_SIZE
moved the DISC pin to its proper place
hardware.c
flash_erase_pages now depends on FLASH_PAGE_SIZE
FILES -------------------------------------------------------------------------
stm32lib/*
- all the (possibly consolidated) stm32 lib and usb example code
usb.c
- USB-specific hardware setup. Interrupts, clocks, etc. handling USB when
not "Attached". some low-level callbacks (low power mode, init, reset,
resume, etc).
usb_callbacks.c
- aka endpoints: handling data transfer when "Configured". calls out to
application specific callbacks (eg DFU or serial shit)
usb_descriptor.c
- aka application descriptor; big static struct and callbacks for sending
the descriptor.
main.c
- main loop and calling any hardware init stuff. timing hacks for EEPROM
writes not to block usb interrupts. logic to handle 2 second timeout then
jump to user code.
hardware.c
- init routines to setup clocks, interrupts, also destructor functions.
does not include USB stuff. EEPROM read/write functions.
dfu.c
- mostly the giant FSM case switch, also some USB endpoint callbacks
TODO --------------------------------------------------------------------------
* use sizeof() for usb application descriptor