Closed ghosoft closed 9 months ago
Actually, including main.h
is not a solution for different reasons.
Most probable one is that proper header file might be included in main.c
, and thus including main.h
will give nothing. Or it can be included in any other c-file in the project, if project owner wants to maintain cleanest and shortest main()
...
Anyway, DWT_Delay needs to import MCU's peripheral definitions and MCU clock rate. Problem is that include path is quite varying for different MCU vendors and hardware libs.
What and where is main.h? Are you intending the user to configure dwt_delay.c by putting the necessary includes & defines in the header file for their main.c? (or whichever file holds main(), they may not have a main.c/.h).