aboutsummaryrefslogtreecommitdiff
path: root/src/crc32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crc32.c')
-rw-r--r--src/crc32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crc32.c b/src/crc32.c
index fffc04c..e8a046d 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -100,7 +100,7 @@ uint32_t generic_crc32(struct target_s *target, uint32_t base, int len)
uint8_t byte;
while (len--) {
- target_mem_read(target, &byte, base, 1);
+ byte = target_mem_read8(target, base);
crc = crc32_calc(crc, byte);
base++;
@@ -118,7 +118,7 @@ uint32_t generic_crc32(struct target_s *target, uint32_t base, int len)
CRC_CR |= CRC_CR_RESET;
while (len > 3) {
- target_mem_read(target, &data, base, 4);
+ data = target_mem_read32(target, base);
CRC_DR = __builtin_bswap32(data);
base += 4;
@@ -128,7 +128,7 @@ uint32_t generic_crc32(struct target_s *target, uint32_t base, int len)
crc = CRC_DR;
while (len--) {
- target_mem_read(target, &data, base++, 1);
+ data = target_mem_read8(target, base++);
crc ^= data << 24;
for (i = 0; i < 8; i++) {