comparison Discovery/Src/externLogbookFlash.c @ 460:2effe85f1a9b minor_improvments

merged default into minor_improvments
author Ideenmodellierer
date Sun, 29 Mar 2020 21:55:00 +0200
parents 7ac0e76dbd6a 9a9e4908ce2e
children e4f6afd9c96b
comparison
equal deleted inserted replaced
459:7ac0e76dbd6a 460:2effe85f1a9b
1441 convert_Type dataStart, dataEnd; 1441 convert_Type dataStart, dataEnd;
1442 1442
1443 /* TODO Cleanup_Ref_1: cleanup logFlashNextSampleStartAddress and lastDiveLogId */ 1443 /* TODO Cleanup_Ref_1: cleanup logFlashNextSampleStartAddress and lastDiveLogId */
1444 /* The implementation below would cause problems in case more then 254 dives would be done. */ 1444 /* The implementation below would cause problems in case more then 254 dives would be done. */
1445 /* This is avoided by Cleanup_Ref2 */ 1445 /* This is avoided by Cleanup_Ref2 */
1446 for(id = 0; id < 255;id++) 1446 for(id = 0; id <= 255;id++)
1447 { 1447 {
1448 actualAddress = HEADERSTART + (0x800 * id) + HEADER2OFFSET; 1448 actualAddress = HEADERSTART + (0x800 * id) + HEADER2OFFSET;
1449 ext_flash_read_block_start(); 1449 ext_flash_read_block_start();
1450 ext_flash_read_block(&header1, EF_HEADER); 1450 ext_flash_read_block(&header1, EF_HEADER);
1451 ext_flash_read_block(&header2, EF_HEADER); 1451 ext_flash_read_block(&header2, EF_HEADER);