Device: Add readCoreminiHeader()

- Fixes NeoMemoryDiskDriver::readLogicalDiskAligned() for flash
- Adds FlashMemoryMessage
This commit is contained in:
Kyle Schwarz
2024-08-21 10:42:04 -04:00
parent cac8d760b0
commit 564933cb41
7 changed files with 163 additions and 9 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef __COREMINI_H_
#define __COREMINI_H_
#ifdef __cplusplus
#include <cstdint>
#include <array>
#include <chrono>
namespace icsneo {
struct CoreminiHeader {
uint16_t coreminiVersion;
uint32_t storedFileSize;
// 32-bit word checksum on the entire (decompressed) binary, with the checksum and hash fields set to 0
uint32_t fileChecksum;
// SHA256 hash of the entire (decompressed) binary, with the checksum, hash, and create time fields set to 0
bool skipDecompression;
bool encryptedMode;
std::array<uint8_t, 32> fileHash;
std::chrono::time_point<std::chrono::system_clock> timestamp;
};
}
#endif // __cplusplus
#endif