@@ -250,7 +250,7 @@ uint16_t EEPROM_Init(void) {
250
250
}
251
251
wvalue = ~* log_addr ;
252
252
if (!wvalue ) {
253
- eeprom_printf ("Incomplete write at log_addr: 0x%04x ;\n" , (uint32_t )log_addr );
253
+ eeprom_printf ("Incomplete write at log_addr: 0x%04lx ;\n" , (uint32_t )log_addr );
254
254
/* Possibly incomplete write. Ignore and continue */
255
255
continue ;
256
256
}
@@ -261,7 +261,7 @@ uint16_t EEPROM_Init(void) {
261
261
} else {
262
262
/* Reserved for future use */
263
263
if (address & FEE_VALUE_RESERVED ) {
264
- eeprom_printf ("Reserved encoded value at log_addr: 0x%04x ;\n" , (uint32_t )log_addr );
264
+ eeprom_printf ("Reserved encoded value at log_addr: 0x%04lx ;\n" , (uint32_t )log_addr );
265
265
continue ;
266
266
}
267
267
/* Optimization for 0 or 1 values. */
@@ -273,7 +273,7 @@ uint16_t EEPROM_Init(void) {
273
273
eeprom_printf ("DataBuf[0x%04x] = 0x%04x;\n" , address , wvalue );
274
274
* (uint16_t * )(& DataBuf [address ]) = wvalue ;
275
275
} else {
276
- eeprom_printf ("DataBuf[0x%04x] cannot be set to 0x%04x [BAD ADDRESS]\n" , address , wvalue );
276
+ eeprom_printf ("DataBuf[0x%04x] cannot be set to 0x%04lx [BAD ADDRESS]\n" , address , wvalue );
277
277
}
278
278
}
279
279
}
@@ -293,14 +293,14 @@ static void eeprom_clear(void) {
293
293
FLASH_Unlock ();
294
294
295
295
for (uint16_t page_num = 0 ; page_num < FEE_PAGE_COUNT ; ++ page_num ) {
296
- eeprom_printf ("FLASH_ErasePage(0x%04x )\n" , (uint32_t )(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE )));
296
+ eeprom_printf ("FLASH_ErasePage(0x%04lx )\n" , (uint32_t )(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE )));
297
297
FLASH_ErasePage (FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE ));
298
298
}
299
299
300
300
FLASH_Lock ();
301
301
302
302
empty_slot = (uint16_t * )FEE_WRITE_LOG_BASE_ADDRESS ;
303
- eeprom_printf ("eeprom_clear empty_slot: 0x%08x \n" , (uint32_t )empty_slot );
303
+ eeprom_printf ("eeprom_clear empty_slot: 0x%08lx \n" , (uint32_t )empty_slot );
304
304
}
305
305
306
306
/* Erase emulated eeprom */
@@ -328,7 +328,7 @@ static uint8_t eeprom_compact(void) {
328
328
for (; dest < FEE_COMPACTED_LAST_ADDRESS ; ++ src , dest += 2 ) {
329
329
value = * src ;
330
330
if (value ) {
331
- eeprom_printf ("FLASH_ProgramHalfWord(0x%04x , 0x%04x)\n" , (uint32_t )dest , ~value );
331
+ eeprom_printf ("FLASH_ProgramHalfWord(0x%04lx , 0x%04x)\n" , (uint32_t )dest , ~value );
332
332
FLASH_Status status = FLASH_ProgramHalfWord (dest , ~value );
333
333
if (status != FLASH_COMPLETE ) final_status = status ;
334
334
}
@@ -355,7 +355,7 @@ static uint8_t eeprom_write_direct_entry(uint16_t Address) {
355
355
356
356
FLASH_Unlock ();
357
357
358
- eeprom_printf ("FLASH_ProgramHalfWord(0x%08x , 0x%04x) [DIRECT]\n" , (uint32_t )directAddress , value );
358
+ eeprom_printf ("FLASH_ProgramHalfWord(0x%08lx , 0x%04x) [DIRECT]\n" , (uint32_t )directAddress , value );
359
359
FLASH_Status status = FLASH_ProgramHalfWord (directAddress , value );
360
360
361
361
FLASH_Lock ();
@@ -397,12 +397,12 @@ static uint8_t eeprom_write_log_word_entry(uint16_t Address) {
397
397
FLASH_Unlock ();
398
398
399
399
/* address */
400
- eeprom_printf ("FLASH_ProgramHalfWord(0x%08x , 0x%04x)\n" , (uint32_t )empty_slot , Address );
400
+ eeprom_printf ("FLASH_ProgramHalfWord(0x%08lx , 0x%04x)\n" , (uint32_t )empty_slot , Address );
401
401
final_status = FLASH_ProgramHalfWord ((uintptr_t )empty_slot ++ , Address );
402
402
403
403
/* value */
404
404
if (encoding == (FEE_WORD_ENCODING | FEE_VALUE_NEXT )) {
405
- eeprom_printf ("FLASH_ProgramHalfWord(0x%08x , 0x%04x)\n" , (uint32_t )empty_slot , ~value );
405
+ eeprom_printf ("FLASH_ProgramHalfWord(0x%08lx , 0x%04x)\n" , (uint32_t )empty_slot , ~value );
406
406
FLASH_Status status = FLASH_ProgramHalfWord ((uintptr_t )empty_slot ++ , ~value );
407
407
if (status != FLASH_COMPLETE ) final_status = status ;
408
408
}
@@ -428,7 +428,7 @@ static uint8_t eeprom_write_log_byte_entry(uint16_t Address) {
428
428
uint16_t value = (Address << 8 ) | DataBuf [Address ];
429
429
430
430
/* write to flash */
431
- eeprom_printf ("FLASH_ProgramHalfWord(0x%08x , 0x%04x)\n" , (uint32_t )empty_slot , value );
431
+ eeprom_printf ("FLASH_ProgramHalfWord(0x%08lx , 0x%04x)\n" , (uint32_t )empty_slot , value );
432
432
FLASH_Status status = FLASH_ProgramHalfWord ((uintptr_t )empty_slot ++ , value );
433
433
434
434
FLASH_Lock ();
0 commit comments