move dataflash code into its separate source file