dwt_delay icon indicating copy to clipboard operation
dwt_delay copied to clipboard

use any mcu, no need to change code.

Open ghosoft opened this issue 4 years ago • 1 comments

ghosoft avatar Oct 09 '20 05:10 ghosoft

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).

mickjc750 avatar Oct 18 '22 07:10 mickjc750

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.

keatis avatar Nov 21 '23 19:11 keatis