cnlohr / rv003usb

CH32V003 RISC-V Pure Software USB Controller
MIT License
436 stars 43 forks source link

made USB_DPU optional #38

Closed xsrf closed 7 months ago

xsrf commented 8 months ago

made USB_DPU optional. Just comment out USB_DPU if not needed / tied to 3V3 via 1.5K

xsrf commented 8 months ago

actually, separating the DPU pin configuration creates extra code that bring the bootloader really close to its 2k limit. I might rework that to be more efficient (but also more ugly). I will need the saved space for the next feature 🙈

xsrf commented 8 months ago

Well #ifdefs within the same "line" don't look nice, but in the end it saved 20 bytes 🤷‍♂️ It's at 1980 Bytes with DPU used, 1972 without DPU. (including bss, sorry for that)