firmware: Add functions to set SPI bit order
firmware: Add flash programming module