In the example you showed, one more thing can be done.
Suppose that there is a function that must be run for some operation with the device. In a simple way, you can write all function calls to another main function and call this master function.
Another way to do this is to write all the function names in curly braces and call them using the function pointer and loop. It looks smart. I'm not sure how this will help you better, but I saw this in the Linux kernel code.
I agree with all the answers here. Other than that, I have some of my own judgments for using a function pointer.
Let's look at an example of complex mathematical calculation (for example, Fibonacci printing, integration, Fourier Xform, etc.).
You have an FX function (which does this complex mathematical calculation or something else) that you use many times in your program. This function is used in many different tasks.
After using your program for several months, you will find out that for some work you can improve the function, and for some - the best. What will you do? Write a new function, go and change the name of the function in all places.
Every time you find something better, you will do the same.
Instead, use a different function pointer for another job. At the initial stage, all pointers can point to one function. When you find the best function for any job, just open the pointer and you're done.
Take another scenario. Here you have a real big code, such as a mobile phone OS. (not fully open, but compiled). You need to add a bluetooth driver to it for certain equipment.
Now you can add or you can leave the option available in the OS.
You may need to turn on / off Bluetooth from many places.
So, what is the OS, it makes a pointer to a function that includes bluetooth, and uses it wherever it is needed. This code has already been compiled, so you cannot add your code to it. But what can be done, you can write a function and indicate that the pointer points to your function.
This is what I have already seen in Android OS. (not really, but closer)