Adds support for Adafruit's Trinket M0#1172
Conversation
hw/bsp/samd21/family.c
Outdated
| //--------------------------------------------------------------------+ | ||
| // UART support | ||
| //--------------------------------------------------------------------+ | ||
| TU_ATTR_WEAK void uart_init(void); |
There was a problem hiding this comment.
since we always defined uart_init(), why would we use weak function here. Are you planning to allow application to overwrite this ? Otherwise I think we could just simply remove the weak attribute
There was a problem hiding this comment.
Yes, exactly. The Trinket M0 only has very few pins / pads available for external hardware components.
In fact, I would argue it would make sense to make board_init() a weak function so users can easily replace it if need to.
There was a problem hiding this comment.
it only makes sense if this repo providing board abstraction for application. Unfortunately, I have no intention to do so. The whole bsp and examples in this repo is only used to demonstrate how tinyusb API is used, and prove and test that it works on hardware. These can be changed completely without any notices.
Sum up application and user should write their own bsp init code for their own board. Therefore please remove the weak attribute in the function.
78f1d09 to
ba34f42
Compare
hathach
left a comment
There was a problem hiding this comment.
superb! Thank you very much for the PR.
Adds support for Adafruit's Trinket M0 board.
Also adds initial support for UART for the board family.