mirror of https://github.com/rusefi/rusefi.git
only:few dead lines
This commit is contained in:
parent
4043929288
commit
08019344ba
|
@ -26,8 +26,6 @@ typedef enum {
|
|||
*/
|
||||
BACKUP_IGNITION_SWITCH_COUNTER,
|
||||
|
||||
DFU_JUMP_REQUESTED,
|
||||
|
||||
/* The number of stored backup variables */
|
||||
BACKUP_RAM_NUM,
|
||||
} backup_ram_e;
|
||||
|
|
|
@ -13,11 +13,6 @@ uint32_t backupRamLoad(backup_ram_e idx) {
|
|||
return RTCD1.rtc->BKP0R & 0xffff;
|
||||
case BACKUP_IGNITION_SWITCH_COUNTER:
|
||||
return (RTCD1.rtc->BKP0R >> 16) & 0xff;
|
||||
// return RTCD1.rtc->BKP1R & 0xffff;
|
||||
// return (RTCD1.rtc->BKP1R >> 16) & 0xffff;
|
||||
// it is assembly code which reads this value
|
||||
// case DFU_JUMP_REQUESTED:
|
||||
// return RTCD1.rtc->BKP4R;
|
||||
default:
|
||||
criticalError("Invalid backup ram idx %d", idx);
|
||||
return 0;
|
||||
|
@ -36,12 +31,6 @@ void backupRamSave(backup_ram_e idx, uint32_t value) {
|
|||
case BACKUP_IGNITION_SWITCH_COUNTER:
|
||||
RTCD1.rtc->BKP0R = (RTCD1.rtc->BKP0R & ~0x00ff0000) | ((value & 0xff) << 16);
|
||||
break;
|
||||
// RTCD1.rtc->BKP1R = (RTCD1.rtc->BKP1R & ~0x0000ffff) | (value & 0xffff);
|
||||
// RTCD1.rtc->BKP1R = (RTCD1.rtc->BKP1R & ~0xffff0000) | ((value & 0xffff) << 16);
|
||||
// todo: start using this code
|
||||
case DFU_JUMP_REQUESTED:
|
||||
RTCD1.rtc->BKP4R = value;
|
||||
break;
|
||||
default:
|
||||
criticalError("Invalid backup ram idx %d, value 0x08x", idx, value);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue