I'm reading a library file timer.h
for STM core library that I just installed in Arduino hardware folder.
Of course, there has to be a lot of questions for me as a beginner about many approaches/stratgegies that programmers rule in writing the code.
One thing is that calling a function with a function pointer that only call one function, but the difference is that the function pointer is declared/defined as an inline function.
Edit: I deleted the code and posted a link for it in github.
OK, the part that I started to think about starts from line 595.
It's functions declarations.
In line 598, it's a declaration for a function that receiver a pointer to a function.
In later lines, starting from line 634, these functions have only one line to execute. So my question is why to develop a function to only execute one line ?
Why they didn't just put that line directly instead of putting it inside function ?
bb_perip
is not a function pointer, I think, but a function, that returns a pointer to a variable. Though I cannot be sure from this snippet of code alone – chrisl Mar 10 '20 at 8:55...\Program_Files\Arduino\hardware\Arduino_STM32-master\STM32F1\system\libmaple\include\libmaple
for example depending on the root file location on my computer. – R1S8K Mar 10 '20 at 10:17