Correct the F3 examples hardfaults in rare cases, correct style

kuldeepdhaka adressed an issue when F3 examples sometimes crashes to hard fault. -Wstrict-prototypes reveals that there are some undeclared prototypes, so the linker may select other variant with single int parameter instead of void functions.

My solution is to declare these functions as static.

There was a plenty style bugs, so I was corrected it too.