user23860: 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.
stm32/timer header file
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 ?

user4143: bb_perip is a function that returns a pointer to a bit from a register that is related to a specific timer peripheral (there's more than one).  That pointer is then dereferenced with the * operator to make *bb_perip(...). 
What bb_perip returns is dependent on what timer you are using and what value you are interested in.
bb_perip is not a pointer to a function, it is a normal function that happens to return a pointer.

23860: <p>I'm reading a library file <code>timer.h</code> for STM core library that I just installed in Arduino hardware folder.</p>

<p>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.</p>

<p>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.</p>

<hr>

<p>Edit: I deleted the code and posted a link for it in github.</p>

<p><a href="https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/master/STM32F1/system/libmaple/include/libmaple/timer.h#L595" rel="nofollow noreferrer">stm32/timer header file</a></p>

<p>OK, the part that I started to think about starts from line 595.</p>

<p>It's functions declarations.</p>

<p>In line 598, it's a declaration for a function that receiver a pointer to a function.</p>

<p>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 ?</p>

<p>Why they didn't just put that line directly instead of putting it inside function ?</p>
 4143: <p><code>bb_perip</code> is a function that returns a pointer to a bit from a register that is related to a specific timer peripheral (there's more than one).  That pointer is then dereferenced with the <code>*</code> operator to make <code>*bb_perip(...)</code>. </p>

<p>What <code>bb_perip</code> returns is dependent on what timer you are using and what value you are interested in.</p>

<p><code>bb_perip</code> is not a pointer to a function, it is a normal function that happens to return a pointer.</p>
