/* Program a Data Block to FLASH. 
This programs an arbitrary length data block to FLASH memory. The program error flag should be checked separately for the event that memory was not properly erased. */
void flash_program(uint32_t address, uint8_t *data, uint32_t len)
/* Program a Data Block to FLASH. 
This programs an arbitrary length data block to FLASH memory. The program error flag should be checked separately for the event that memory was not properly erased. */
void flash_program(uint32_t address, uint8_t *data, uint32_t len)
{
	for (uint32_t i = 0; i < len; i += 8) {
		flash_program_double_word(address+i, *(uint64_t*)(data + i));
	}
}