diff Discovery/Inc/externLogbookFlash.h @ 430:30580cf5ee77

Merged in Ideenmodellierer/ostc4/ImprovmentNVM_2 (pull request #39) ImprovmentNVM 2
author heinrichsweikamp <bitbucket@heinrichsweikamp.com>
date Tue, 18 Feb 2020 07:20:29 +0000
parents 0e5341951079
children 1c0b911c367f
line wrap: on
line diff
--- a/Discovery/Inc/externLogbookFlash.h	Mon Feb 10 08:23:15 2020 +0000
+++ b/Discovery/Inc/externLogbookFlash.h	Tue Feb 18 07:20:29 2020 +0000
@@ -59,18 +59,18 @@
  */
 #define SETTINGSSTART	0x00010000
 #define SETTINGSSTOP 	0x0001FFFF
-#define VPMSTART			0x00020000
-#define VPMSTOP				0x0002FFFF
+#define VPMSTART		0x00020000
+#define VPMSTOP			0x0002FFFF
 #define unused3START	0x00030000
 #define unused3STOP		0x0007FFFF
 #define HEADERSTART		0x00080000
 #define HEADERSTOP		0x000FFFFF
 #define SAMPLESTART		0x00100000
 #define SAMPLESTOP		0x00CFFFFF
-#define FWSTART				0x00D00000
-#define FWSTOP				0x00DFFFFF
-#define FWSTART2			0x00E00000
-#define FWSTOP2				0x00FFFFFF
+#define FWSTART			0x00D00000
+#define FWSTOP			0x00DFFFFF
+#define FWSTART2		0x00E00000
+#define FWSTOP2			0x00FFFFFF
 /* 16 MB with 4 Byte addressing */
 #define unused4START	0x01000000
 #define unused4STOP		0x01FFFFFF
@@ -78,6 +78,12 @@
 #define HEADERSIZE sizeof(SLogbookHeader)
 #define HEADERSIZEOSTC3 sizeof(SLogbookHeaderOSTC3)
 
+/* Sample ring buffer sector states derived from the usage at begin and end of a sector */
+#define SECTOR_CLOSED		(0)
+#define SECTOR_NOTUSED		(1)
+#define SECTOR_INUSE		(4)
+#define SECTOR_EMPTY		(5)
+
 /* Exported types ------------------------------------------------------------*/
 typedef struct{
 uint8_t byteLow;
@@ -102,10 +108,10 @@
 } convert16_Type;
 
 /* Exported functions --------------------------------------------------------*/
-void ext_flash_write_settings(void);
+void ext_flash_write_settings(uint8_t resetRing);
 uint8_t ext_flash_read_settings(void);
 
-void ext_flash_write_devicedata(void);
+void ext_flash_write_devicedata(uint8_t resetRing);
 uint16_t ext_flash_read_devicedata(uint8_t *buffer, uint16_t max_length);
 void ext_flash_read_fixed_16_devicedata_blocks_formated_128byte_total(uint8_t *buffer);
 
@@ -157,4 +163,7 @@
 
 uint16_t ext_flash_repair_SPECIAL_dive_numbers_starting_count_with(uint16_t startCount);
 
+uint32_t ext_flash_AnalyseSampleBuffer(char *pstrResult);
+void ext_flash_CloseSector(void);
+
 #endif /* EXTERN_LOGBOOK_FLASH_H */