|
25 | 25 | #include <nuttx/config.h>
|
26 | 26 | #include <nuttx/arch.h>
|
27 | 27 |
|
| 28 | +#include <inttypes.h> |
28 | 29 | #include <stdint.h>
|
29 | 30 | #include <assert.h>
|
30 | 31 | #include <errno.h>
|
@@ -411,9 +412,9 @@ static int sam_getstatus(struct watchdog_lowerhalf_s *lower,
|
411 | 412 | status->timeleft = 0;
|
412 | 413 |
|
413 | 414 | wdinfo("Status :\n");
|
414 |
| - wdinfo(" flags : %08x\n", status->flags); |
415 |
| - wdinfo(" timeout : %d\n", status->timeout); |
416 |
| - wdinfo(" timeleft : %d\n", status->timeleft); |
| 415 | + wdinfo(" flags : %08" PRIx32 "\n", status->flags); |
| 416 | + wdinfo(" timeout : %" PRIu32 "\n", status->timeout); |
| 417 | + wdinfo(" timeleft : %" PRIu32 "\n", status->timeleft); |
417 | 418 | return OK;
|
418 | 419 | }
|
419 | 420 |
|
@@ -441,13 +442,13 @@ static int sam_settimeout(struct watchdog_lowerhalf_s *lower,
|
441 | 442 | uint32_t regval;
|
442 | 443 |
|
443 | 444 | DEBUGASSERT(priv);
|
444 |
| - wdinfo("Entry: timeout=%d\n", timeout); |
| 445 | + wdinfo("Entry: timeout=%" PRIu32 "\n", timeout); |
445 | 446 |
|
446 | 447 | /* Can this timeout be represented? */
|
447 | 448 |
|
448 | 449 | if (timeout < RSWDT_MINTIMEOUT || timeout >= RSWDT_MAXTIMEOUT)
|
449 | 450 | {
|
450 |
| - wderr("ERROR: Cannot represent timeout: %d < %d > %d\n", |
| 451 | + wderr("ERROR: Cannot represent timeout: %d < %" PRIu32 " > %d\n", |
451 | 452 | RSWDT_MINTIMEOUT, timeout, RSWDT_MAXTIMEOUT);
|
452 | 453 | return -ERANGE;
|
453 | 454 | }
|
@@ -480,7 +481,7 @@ static int sam_settimeout(struct watchdog_lowerhalf_s *lower,
|
480 | 481 |
|
481 | 482 | priv->reload = reload;
|
482 | 483 |
|
483 |
| - wdinfo("reload=%d timeout: %d->%d\n", |
| 484 | + wdinfo("reload=%" PRIu32 " timeout: %" PRIu32 "->%" PRIu32 "\n", |
484 | 485 | reload, timeout, priv->timeout);
|
485 | 486 |
|
486 | 487 | /* Set the RSWDT_MR according to calculated value
|
@@ -525,7 +526,7 @@ static int sam_settimeout(struct watchdog_lowerhalf_s *lower,
|
525 | 526 |
|
526 | 527 | priv->started = true;
|
527 | 528 |
|
528 |
| - wdinfo("Setup: CR: %08x MR: %08x SR: %08x\n", |
| 529 | + wdinfo("Setup: CR: %08" PRIx32 " MR: %08" PRIx32 " SR: %08" PRIx32 "\n", |
529 | 530 | sam_getreg(SAM_RSWDT_CR), sam_getreg(SAM_RSWDT_MR),
|
530 | 531 | sam_getreg(SAM_RSWDT_SR));
|
531 | 532 |
|
@@ -651,7 +652,7 @@ int sam_rswdt_initialize(void)
|
651 | 652 | {
|
652 | 653 | struct sam_lowerhalf_s *priv = &g_wdtdev;
|
653 | 654 |
|
654 |
| - wdinfo("Entry: CR: %08x MR: %08x SR: %08x\n", |
| 655 | + wdinfo("Entry: CR: %08" PRIx32 " MR: %08" PRIx32 " SR: %08" PRIx32 "\n", |
655 | 656 | sam_getreg(SAM_RSWDT_CR), sam_getreg(SAM_RSWDT_MR),
|
656 | 657 | sam_getreg(SAM_RSWDT_SR));
|
657 | 658 |
|
|
0 commit comments