Closed brycedjohnson closed 6 years ago
Ok, not sure I like the use of include.h
as a catch-all. This seems to me to be pretty much an antipattern, and a slippery slope to drift into poor layering of code.
What do others think about this?
I did that because it looked like it was already headed that way for the LL drivers. I was guessing it was to separate STM32F0 from other future ones, but I'm sure that could all be done on the C files themselves with some #ifdefs. Doesn't matter to me, just don't really like the mix of the two.
As for the the non-LL stuff. like
#include "drivers/drv_system.h"
#include "drivers/drv_uart.h"
#include "drivers/drv_led.h"
#include "drivers/drv_watchdog.h"
#include "drivers/drv_ws2812.h"
I would rather see those included correct C files when needed.
Sorry, this wasn't meant as criticism on your pull request. It's just the first time that I noticed include.h
, and I wanted to bring this up for discussion. I agree with improving consistency, but at the same time it's important to be careful about the use of antipatterns.
No offense taken. I didn't even really see that all/most h files were in there until you mentioned it... Yeah I'm not a big fan of a catch all include either.
@mikeller I agree, we need to move them to the relevant C files where they are used.
Okay.That's my fault.Maybe need to move them to the relevant C files.
a little cleanup