Commit 40d30f43 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

dev/softpll_ng.c: added spll_get_dac() function

parent 65e7dd68
...@@ -536,8 +536,9 @@ int spll_update_aux_clocks() ...@@ -536,8 +536,9 @@ int spll_update_aux_clocks()
break; break;
case AUX_READY: case AUX_READY:
if(!softpll.mpll.ld.locked) if(!softpll.mpll.ld.locked || !softpll.aux[i].ld.locked)
{ {
TRACE("[aux] aux channel or mpll lost lock\n");
SPLL->OCCR &= ~ (SPLL_OCCR_OUT_LOCK_W((1<<(i+1)))); SPLL->OCCR &= ~ (SPLL_OCCR_OUT_LOCK_W((1<<(i+1))));
s->state = AUX_DISABLED; s->state = AUX_DISABLED;
} }
...@@ -557,4 +558,15 @@ int spll_get_aux_status(int channel) ...@@ -557,4 +558,15 @@ int spll_get_aux_status(int channel)
rval |= SPLL_AUX_LOCKED; rval |= SPLL_AUX_LOCKED;
return rval; return rval;
}
int spll_get_dac(int index)
{
if(index < 0)
return softpll.helper.pi.y;
else if (index == 0)
return softpll.mpll.pi.y;
else if (index > 0)
return softpll.aux[index-1].pi.y;
return 0;
} }
\ No newline at end of file
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