Files
edgetx-gx12/src/eeprom_common.h
T

73 lines
2.0 KiB
C

/*
* Authors (alphabetical order)
* - Andre Bernet <bernet.andre@gmail.com>
* - Andreas Weitl
* - Bertrand Songis <bsongis@gmail.com>
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
* - Cameron Weeks <th9xer@gmail.com>
* - Erez Raviv
* - Gabriel Birkus
* - Jean-Pierre Parisy
* - Karl Szmutny
* - Michael Blandford
* - Michal Hlavinka
* - Pat Mackenzie
* - Philip Moss
* - Rob Thomson
* - Romolo Manfredini <romolo.manfredini@gmail.com>
* - Thomas Husterer
*
* open9x is based on code named
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
* and the original (and ongoing) project by
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#if defined(SIMU)
#define WRITE_DELAY_10MS 200
#elif defined(PCBX9D)
#define WRITE_DELAY_10MS 500
#elif defined(PCBSKY9X) && !defined(REV0)
#define WRITE_DELAY_10MS 500
#elif defined(PCBGRUVIN9X) && !defined(REV0)
#define WRITE_DELAY_10MS 500
#else
#define WRITE_DELAY_10MS 200
#endif
extern uint8_t s_eeDirtyMsk;
extern tmr10ms_t s_eeDirtyTime10ms;
void eeDirty(uint8_t msk);
void eeCheck(bool immediately=false);
void eeReadAll();
bool eeModelExists(uint8_t id);
void eeLoadModelName(uint8_t id, char *name);
void eeLoadModel(uint8_t id);
#if defined(CPUARM)
extern char modelNames[MAX_MODELS][sizeof(g_model.name)];
void eeLoadModelNames();
#if defined(PXX)
extern uint8_t modelIds[MAX_MODELS];
#endif
#else // defined(CPUARM)
#define eeLoadModelNames()
#endif