diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-06-26 16:27:25 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-06-26 16:27:25 +0300 |
commit | 75ae6801b4bc5a9b83222333558230b2f462bd0f (patch) | |
tree | 3c85efc28c98a9be576024994ba254e5fd1a2121 /src/Storage | |
parent | ed4a2ed9f54d575f8ff79d7138eb6e28d1cce804 (diff) |
Improvements for 5LC
Use 32-bit WiFi SPI transfers
Increased sizes of write buffers, filename buffers etc. to match Duet 3
Diffstat (limited to 'src/Storage')
-rw-r--r-- | src/Storage/CRC32.cpp | 4 | ||||
-rw-r--r-- | src/Storage/FileInfoParser.h | 2 | ||||
-rw-r--r-- | src/Storage/FileWriteBuffer.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Storage/CRC32.cpp b/src/Storage/CRC32.cpp index ceabda87..a3760fff 100644 --- a/src/Storage/CRC32.cpp +++ b/src/Storage/CRC32.cpp @@ -48,7 +48,7 @@ constexpr uint32_t CRC_32_TAB[256] = 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -#if SAME70 +#if SAME70 || SAME5x // On SAME70 we have more flash memory available, so use 4K table instead of 1K and the faster slicing-by-4 algorithm constexpr uint32_t CRC_32_TAB1[256] = @@ -189,7 +189,7 @@ void CRC32::Update(const char *s, size_t len) noexcept locCrc = (CRC_32_TAB[(locCrc ^ *s++) & 0xFF] ^ (locCrc >> 8)); } -#if SAME70 +#if SAME70 || SAME5x const char * const endAligned = s + ((end - s) & ~7); while (s != endAligned) { diff --git a/src/Storage/FileInfoParser.h b/src/Storage/FileInfoParser.h index 330340aa..e21a7b03 100644 --- a/src/Storage/FileInfoParser.h +++ b/src/Storage/FileInfoParser.h @@ -18,7 +18,7 @@ const FilePosition GCODE_HEADER_SIZE = 20000uL; // How many bytes to read from the header - I (DC) have a Kisslicer file with a layer height comment 14Kb from the start const FilePosition GCODE_FOOTER_SIZE = 400000uL; // How many bytes to read from the footer -#if SAME70 +#if SAME70 || SAME5x const size_t GCODE_READ_SIZE = 2048; // How many bytes to read in one go in GetFileInfo() (should be a multiple of 512 for read efficiency) #else const size_t GCODE_READ_SIZE = 1024; // How many bytes to read in one go in GetFileInfo() (should be a multiple of 512 for read efficiency) diff --git a/src/Storage/FileWriteBuffer.h b/src/Storage/FileWriteBuffer.h index 15342626..bd3804db 100644 --- a/src/Storage/FileWriteBuffer.h +++ b/src/Storage/FileWriteBuffer.h @@ -10,7 +10,7 @@ #include "RepRapFirmware.h" -#if SAM4E || SAM4S || SAME70 +#if SAM4E || SAM4S || SAME70 || SAME5x const size_t NumFileWriteBuffers = 2; // Number of write buffers const size_t FileWriteBufLen = 8192; // Size of each write buffer #elif defined(__LPC17xx__) |