Closed kbeckmann closed 6 years ago
This is obviously not 100% done because it will conflict soooo much with your usb stuff artur. But what do you think of the general idea?
Yeah I did this on the plane cause I was a bit bored so I just brainstormed a bit.
My reasoning was that the implementation of gpio, i2c, adc etc is highly platform specific (stm32f0, stm32l4, efm?? etc). And separating targets from platforms seemed like the way to go. The names target and platform are perhaps not correct but felt like good names at the time.
The USB code between f0 and l4 seems to differ a bit too. The usb_ll_whatever.c doesn't live in the SDK folder and there are probably some other differences elsewhere. My goal here was to be able to run the UART bridge on the Thumbinator with this one codebase, but then I'll need to change quite a bit in the USB code too.
Any objections to the general structure? Should I continue and try to make this patch pr mergable?
I think I've decoupled enough in order to create a decent baseline now to continue from. I haven't touched the USB stuff because I know it will lead to an insane amount of conflicts in your code. However, I need to change it sooner or later so we can port it to thumbinator...
Aside from the tiny details, is the structure good?
btw fixed your comments
can haz 👍? or feedback? anything goes :P want to move forward.
:(
Would be cool to use the codebase and build for Thumbinator which is running on stm32f0xx, so need another sdk/hal.
We already know we want to support multiple targets, i.e. different boards with different features and/or pin configurations