Firmware/src/hardware.c
void hardware_update_backup(void)
{
  uint16_t update_counter = 
    hardware_rtc_read_16_bit_backup_value(BACKUP_UPDATE_CNT_REG);
  update_counter++;
  if (update_counter >= MAX_UPDATE_COUNTER)
    update_counter = 0;
  BKP_WriteBackupRegister(BACKUP_UPDATE_CNT_REG, update_counter);
}
//Update value of the counter in backup
Update value of the counter in backup
Update value of the counter in backup
void hardware_update_backup(void)
{
  uint16_t update_counter = 
    hardware_rtc_read_16_bit_backup_value(BACKUP_UPDATE_CNT_REG);
  update_counter++;
  if (update_counter >= MAX_UPDATE_COUNTER)
    update_counter = 0;
  BKP_WriteBackupRegister(BACKUP_UPDATE_CNT_REG, update_counter);
}
void hardware_update_backup ( void ) { uint16_t update_counter = hardware_rtc_read_16_bit_backup_value ( BACKUP_UPDATE_CNT_REG ) ; update_counter ++ ; if ( update_counter >= MAX_UPDATE_COUNTER ) update_counter = 0 ; BKP_WriteBackupRegister ( BACKUP_UPDATE_CNT_REG , update_counter ) ; }
Update value of the counter in backup
Update value of the counter in backup