diff options
Diffstat (limited to 'platforms/test')
| -rw-r--r-- | platforms/test/eeprom.c | 6 | ||||
| -rw-r--r-- | platforms/test/eeprom_legacy_emulated_flash_tests.cpp | 2 | ||||
| -rw-r--r-- | platforms/test/legacy_flash_ops_mock.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/platforms/test/eeprom.c b/platforms/test/eeprom.c index d501745e55..193a3bb4ce 100644 --- a/platforms/test/eeprom.c +++ b/platforms/test/eeprom.c @@ -40,7 +40,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *p = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; + uint8_t *dest = (uint8_t *)buf; while (len--) { *dest++ = eeprom_read_byte(p++); } @@ -61,7 +61,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { } void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; + uint8_t *p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); @@ -87,7 +87,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { } void eeprom_update_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; + uint8_t *p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); diff --git a/platforms/test/eeprom_legacy_emulated_flash_tests.cpp b/platforms/test/eeprom_legacy_emulated_flash_tests.cpp index d2c41fb77d..41b27b621d 100644 --- a/platforms/test/eeprom_legacy_emulated_flash_tests.cpp +++ b/platforms/test/eeprom_legacy_emulated_flash_tests.cpp @@ -52,7 +52,7 @@ extern "C" { #define BYTE_VALUE(addr, value) (((addr) << 8) | (value)) #define WORD_ZERO(addr) (0x8000 | ((addr) >> 1)) #define WORD_ONE(addr) (0xA000 | ((addr) >> 1)) -#define WORD_NEXT(addr) (0xE000 | (((addr)-0x80) >> 1)) +#define WORD_NEXT(addr) (0xE000 | (((addr) - 0x80) >> 1)) class EepromStm32Test : public testing::Test { public: diff --git a/platforms/test/legacy_flash_ops_mock.c b/platforms/test/legacy_flash_ops_mock.c index b9d805cb47..355cdf2b4c 100644 --- a/platforms/test/legacy_flash_ops_mock.c +++ b/platforms/test/legacy_flash_ops_mock.c @@ -35,9 +35,9 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { if (flash_locked) return FLASH_ERROR_WRP; Address -= (uintptr_t)FlashBuf; if (Address >= MOCK_FLASH_SIZE) return FLASH_BAD_ADDRESS; - uint16_t oldData = *(uint16_t*)&FlashBuf[Address]; + uint16_t oldData = *(uint16_t *)&FlashBuf[Address]; if (oldData == 0xFFFF || Data == 0) { - *(uint16_t*)&FlashBuf[Address] = Data; + *(uint16_t *)&FlashBuf[Address] = Data; return FLASH_COMPLETE; } else { return FLASH_ERROR_PG; |