Ejemplo n.º 1
0
void writeEEPROM(void)
{
    suspendRxSignal();

    writeConfigToEEPROM();

    resumeRxSignal();
}
Ejemplo n.º 2
0
void configStart() {
	// Load the config from EEPROM
	readConfigFromEEPROM();

	// Check for config file on SD card
	FRESULT fr = f_stat("config.txt", NULL);
	switch (fr) {
	case FR_OK:
		// Config file exists
		break;
	case FR_NO_FILE:
		// Config file does not exist, create default
		readConfigDefault();
		writeConfigToFile();
		break;
	default:
		// Unknown file read error
		error(ERROR_READ_CONFIG);
	}

	fr = f_stat(converterFn, NULL);
	switch (fr) {
	case FR_OK:
		// Converter file exists
		break;
	case FR_NO_FILE:
		// Create exe file from binary
		writeConverterToFile();
		break;
	default:
		// Unknown file read error
		f_unlink(converterFn);
		error(ERROR_READ_CONFIG);
	}

	fr = f_stat(userGuideFn, NULL);
	switch (fr) {
	case FR_OK:
		// User Guide file exists
		break;
	case FR_NO_FILE:
		writeUserGuideToFile();
		break;
	default:
		// Unknown file read error
		f_unlink(userGuideFn);
		error(ERROR_READ_CONFIG);
	}

	// Read config file from card
	readConfigFromFile();

	// Write config back to card
	writeConfigToFile();

	// Update the config back to EEPROM
	writeConfigToEEPROM();
}
Ejemplo n.º 3
0
void writeEEPROM(void)
{
#ifndef USE_OSD_SLAVE
    suspendRxSignal();
#endif

    writeConfigToEEPROM();

#ifndef USE_OSD_SLAVE
    resumeRxSignal();
#endif
}