Replace #define types with typedefs. Rename all typedefs to have a _t extension. Add #defines to automatically convert old FreeRTOS specific types to their new names (with the _t).
Move DSB instructions to before WFI instructions in line with ARM recommendations.