Commit 62a125d2 authored by Maciej Lipinski's avatar Maciej Lipinski Committed by Jean-Claude BAU

[HAL] cleaned up debug/warning message printing

- phase value was printed too often, should be done only if debugging
- printf() should be avoided, changed to proper macros
parent d1a89f3e
......@@ -226,8 +226,8 @@ static int _hal_port_state_link_up(void *vpfg, int eventMsk, int isNewState) {
struct channel *ch=&getRtsState().channels[ps->hw_index];
ps->phase_val = ch->phase_loopback;
ps->phase_val_valid =ch->flags & CHAN_PMEAS_READY ? 1 : 0;
if (ps->hw_index==0 ) //JCB
printf("Phase=%d valid=%d\n",ps->phase_val,ps->phase_val_valid);
pr_debug("wri%d: phase=%d valid=%d\n",ps->hw_index+1,
ps->phase_val,ps->phase_val_valid);
}
// Run PLL state machine
......
......@@ -30,7 +30,7 @@ int hal_port_generic_fsm( halPortFsmGen_t *pfg) {
while (pt->state!=-1 ) {
if (pt->state==_getState(pfg) ) {
if ( FSM_GEN_DEBUG && pt->fctName!=NULL)
printf("%s.%s: Calling %s (newState=%d, evts=%s),\n",
pr_debug("%s.%s: Calling %s (newState=%d, evts=%s),\n",
pfg->ps->name,pfg->fsm_name,
pt->fctName, isNewState,evtStr);
ret=(*pt->fct)(pfg,portEventMask,isNewState);
......
......@@ -297,7 +297,7 @@ int hal_port_poll_rts_state(void)
setRtsStateValidity( rts_get_state(hs) < 0 ? 0 : 1);
if (! isRtsStateValid() )
printf("rts_get_state failure, weird...\n");
pr_warning("rts_get_state failure, weird...\n");
return isRtsStateValid();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment