diff --git a/df_datalink_sp/src/networking/link_layer/service.c b/df_datalink_sp/src/networking/link_layer/service.c index a6277ab..297105f 100644 --- a/df_datalink_sp/src/networking/link_layer/service.c +++ b/df_datalink_sp/src/networking/link_layer/service.c @@ -134,7 +134,7 @@ static int32_t Service_Packing(L2_INST *instPtr, L2_FRAME_TYPE type, uint8_t dst } default: { - DBG_ERROR("Unexpected frame type: %d.\n", type); + DBG_ERROR("Unexpected frame type: %" PRIu8 ".\n", type); return EPARAM; break; } @@ -279,7 +279,7 @@ int32_t L2_Service_PktHandler(L2_INST *instPtr, uint8_t *msg) break; } default: - DBG_ERROR("Unsupported frame type: %d.\n", instPtr->frame.last); + DBG_ERROR("Unsupported frame type: %" PRIu8 ".\n", frameType); break; } return Status; @@ -357,7 +357,7 @@ int32_t L2_Service_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntr L2_SetupNextSlot(instPtr, torState, L2_SVC_FRAME); break; default: - DBG_ERROR("UNKNOWN slot type [%d].\n", rtneEntry->slotType); + DBG_ERROR("UNKNOWN slot type [%" PRIu8 "].\n", rtneEntry->slotType); return FAILURE; } #ifdef DATALINK_ENABLE_BERTEST diff --git a/df_datalink_sp/src/time_ctrl/time_ctrl.c b/df_datalink_sp/src/time_ctrl/time_ctrl.c index 71aa5ae..5a3789d 100644 --- a/df_datalink_sp/src/time_ctrl/time_ctrl.c +++ b/df_datalink_sp/src/time_ctrl/time_ctrl.c @@ -218,13 +218,13 @@ void TimeCtrl_TimeAdjust(TMC_INST *instPtr, const TIME_WORD *tmWord, TIMECTRL_AD ASSERT(tmWord != NULL); if (type < TM_ADJ_ADD || TM_ADJ_ADD > TM_ADJ_SET) { - DBG_ERROR("Unsupported adjustment type: %d", type); + DBG_ERROR("Unsupported adjustment type: %" PRId8 ".\n", type); return; } if (((int32_t)tmWord->frac_part) > TIME_FRAC_MAX || ((int32_t)tmWord->frac_part) < -TIME_FRAC_MAX) { - DBG_WARNING("Invalid fractional value %d (should between %d~%d)\n", - tmWord->frac_part, -TIME_FRAC_MAX, TIME_FRAC_MAX); + DBG_WARNING("Invalid fractional value %" PRIu32 " (should between %" PRIu32 "~%" PRIu32 ")\n", + tmWord->frac_part, (uint32_t)(-TIME_FRAC_MAX), (uint32_t)TIME_FRAC_MAX); return; } TMC_Write(instPtr, TIME_ADJ_FRAC, tmWord->frac_part);