stm32/rfcore: Refactor some helper funcs, and remove some magic numbers.
stm32/rfcore: Refactor some helper funcs, and remove some magic numbers.

Also explain what the payload fixup code is doing.

pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython