Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
419:c2264ce139cb | 430:30580cf5ee77 |
---|---|
57 * 016x for firmware ( 1 MB) | 57 * 016x for firmware ( 1 MB) |
58 * 032x for firmware2 ( 2 MB) | 58 * 032x for firmware2 ( 2 MB) |
59 */ | 59 */ |
60 #define SETTINGSSTART 0x00010000 | 60 #define SETTINGSSTART 0x00010000 |
61 #define SETTINGSSTOP 0x0001FFFF | 61 #define SETTINGSSTOP 0x0001FFFF |
62 #define VPMSTART 0x00020000 | 62 #define VPMSTART 0x00020000 |
63 #define VPMSTOP 0x0002FFFF | 63 #define VPMSTOP 0x0002FFFF |
64 #define unused3START 0x00030000 | 64 #define unused3START 0x00030000 |
65 #define unused3STOP 0x0007FFFF | 65 #define unused3STOP 0x0007FFFF |
66 #define HEADERSTART 0x00080000 | 66 #define HEADERSTART 0x00080000 |
67 #define HEADERSTOP 0x000FFFFF | 67 #define HEADERSTOP 0x000FFFFF |
68 #define SAMPLESTART 0x00100000 | 68 #define SAMPLESTART 0x00100000 |
69 #define SAMPLESTOP 0x00CFFFFF | 69 #define SAMPLESTOP 0x00CFFFFF |
70 #define FWSTART 0x00D00000 | 70 #define FWSTART 0x00D00000 |
71 #define FWSTOP 0x00DFFFFF | 71 #define FWSTOP 0x00DFFFFF |
72 #define FWSTART2 0x00E00000 | 72 #define FWSTART2 0x00E00000 |
73 #define FWSTOP2 0x00FFFFFF | 73 #define FWSTOP2 0x00FFFFFF |
74 /* 16 MB with 4 Byte addressing */ | 74 /* 16 MB with 4 Byte addressing */ |
75 #define unused4START 0x01000000 | 75 #define unused4START 0x01000000 |
76 #define unused4STOP 0x01FFFFFF | 76 #define unused4STOP 0x01FFFFFF |
77 | 77 |
78 #define HEADERSIZE sizeof(SLogbookHeader) | 78 #define HEADERSIZE sizeof(SLogbookHeader) |
79 #define HEADERSIZEOSTC3 sizeof(SLogbookHeaderOSTC3) | 79 #define HEADERSIZEOSTC3 sizeof(SLogbookHeaderOSTC3) |
80 | |
81 /* Sample ring buffer sector states derived from the usage at begin and end of a sector */ | |
82 #define SECTOR_CLOSED (0) | |
83 #define SECTOR_NOTUSED (1) | |
84 #define SECTOR_INUSE (4) | |
85 #define SECTOR_EMPTY (5) | |
80 | 86 |
81 /* Exported types ------------------------------------------------------------*/ | 87 /* Exported types ------------------------------------------------------------*/ |
82 typedef struct{ | 88 typedef struct{ |
83 uint8_t byteLow; | 89 uint8_t byteLow; |
84 uint8_t byteMidLow; | 90 uint8_t byteMidLow; |
100 WordToByte_t u8bit; | 106 WordToByte_t u8bit; |
101 uint16_t u16bit; | 107 uint16_t u16bit; |
102 } convert16_Type; | 108 } convert16_Type; |
103 | 109 |
104 /* Exported functions --------------------------------------------------------*/ | 110 /* Exported functions --------------------------------------------------------*/ |
105 void ext_flash_write_settings(void); | 111 void ext_flash_write_settings(uint8_t resetRing); |
106 uint8_t ext_flash_read_settings(void); | 112 uint8_t ext_flash_read_settings(void); |
107 | 113 |
108 void ext_flash_write_devicedata(void); | 114 void ext_flash_write_devicedata(uint8_t resetRing); |
109 uint16_t ext_flash_read_devicedata(uint8_t *buffer, uint16_t max_length); | 115 uint16_t ext_flash_read_devicedata(uint8_t *buffer, uint16_t max_length); |
110 void ext_flash_read_fixed_16_devicedata_blocks_formated_128byte_total(uint8_t *buffer); | 116 void ext_flash_read_fixed_16_devicedata_blocks_formated_128byte_total(uint8_t *buffer); |
111 | 117 |
112 #ifndef BOOTLOADER_STANDALONE | 118 #ifndef BOOTLOADER_STANDALONE |
113 void ext_flash_write_vpm(SVpm *vpmInput); | 119 void ext_flash_write_vpm(SVpm *vpmInput); |
155 void ext_flash_write_firmware2(uint32_t offset, uint8_t *pSample1, uint32_t length1,uint8_t *pSample2, uint32_t length2); | 161 void ext_flash_write_firmware2(uint32_t offset, uint8_t *pSample1, uint32_t length1,uint8_t *pSample2, uint32_t length2); |
156 uint32_t ext_flash_read_firmware2(uint32_t *offset, uint8_t *pSample1, uint32_t max_length1, uint8_t *pSample2, uint32_t max_length2); | 162 uint32_t ext_flash_read_firmware2(uint32_t *offset, uint8_t *pSample1, uint32_t max_length1, uint8_t *pSample2, uint32_t max_length2); |
157 | 163 |
158 uint16_t ext_flash_repair_SPECIAL_dive_numbers_starting_count_with(uint16_t startCount); | 164 uint16_t ext_flash_repair_SPECIAL_dive_numbers_starting_count_with(uint16_t startCount); |
159 | 165 |
166 uint32_t ext_flash_AnalyseSampleBuffer(char *pstrResult); | |
167 void ext_flash_CloseSector(void); | |
168 | |
160 #endif /* EXTERN_LOGBOOK_FLASH_H */ | 169 #endif /* EXTERN_LOGBOOK_FLASH_H */ |