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 ?