Flash saving

Momentary switches a little bit modified (depending of the function) in Function Switches
New trigger ONm in Function Switches
This commit is contained in:
bsongis
2012-07-19 19:06:55 +00:00
parent 6cc287b4eb
commit 4a8f0979fd
14 changed files with 235 additions and 195 deletions
+4 -8
View File
@@ -273,17 +273,10 @@ bool EFile::exists(uint8_t i_fileId)
*/
void EFile::swap(uint8_t i_fileId1, uint8_t i_fileId2)
{
#if ((__GNUC__ > 4 || __GNUC__ == 4) && (__GNUC_MINOR__ > 7 || __GNUC_MINOR__ == 7))
DirEnt tmp;
__builtin_memcpy(&tmp, __builtin_assume_aligned(&eeFs.files[i_fileId1], sizeof(DirEnt)), sizeof(DirEnt));
__builtin_memcpy(&eeFs.files[i_fileId1], __builtin_assume_aligned(&eeFs.files[i_fileId2], sizeof(DirEnt)), sizeof(DirEnt));
__builtin_memcpy(&eeFs.files[i_fileId2], __builtin_assume_aligned(&tmp, sizeof(DirEnt)), sizeof(DirEnt));
#else
DirEnt tmp = eeFs.files[i_fileId1];
eeFs.files[i_fileId1] = eeFs.files[i_fileId2];
eeFs.files[i_fileId2] = tmp;
#endif
s_sync_write = true;
EeFsFlushDirEnt(i_fileId1);
EeFsFlushDirEnt(i_fileId2);
@@ -870,6 +863,9 @@ void eeLoadModel(uint8_t id)
clearKeyEvents();
}
activeFunctions = 0;
activeFunctionSwitches = 0;
resetProto();
resetAll();