From 0096672d380d40d9b3d4453c056db1de322ec65b Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 14 May 2024 11:57:47 +0200 Subject: [PATCH] fix fct names and consts and bad if statement --- armsrc/i2c.c | 4 ++-- armsrc/i2c.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/armsrc/i2c.c b/armsrc/i2c.c index 2848509a1..2a4b3a648 100644 --- a/armsrc/i2c.c +++ b/armsrc/i2c.c @@ -764,7 +764,7 @@ bool sc_rx_bytes(uint8_t *dest, uint16_t *destlen, uint32_t wait) { break; } else if (len == 1) { continue; - } else if (len <= 0) { + } else { return false; } } @@ -937,7 +937,7 @@ void SmartCardUpgrade(uint64_t arg0) { bool isOK = true; uint16_t length = arg0, pos = 0; - uint8_t *fwdata = BigBuf_get_addr(); + const uint8_t *fwdata = BigBuf_get_addr(); uint8_t *verfiydata = BigBuf_malloc(I2C_BLOCK_SIZE); while (length) { diff --git a/armsrc/i2c.h b/armsrc/i2c.h index 52c96862e..3b45c6d7d 100644 --- a/armsrc/i2c.h +++ b/armsrc/i2c.h @@ -68,6 +68,6 @@ void SmartCardUpgrade(uint64_t arg0); void SmartCardSetBaud(uint64_t arg0); void SmartCardSetClock(uint64_t arg0); void I2C_print_status(void); -int I2C_get_version(uint8_t *maj, uint8_t *min); +int I2C_get_version(uint8_t *major, uint8_t *minor); #endif