You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CMSIS-DSP/cmsisdsp/cg/static/scheduler/templates/codeSwitch.cpp

46 lines
968 B
C++

{% extends "commonc.cpp" %}
{% block schedArray %}
/*
Description of the scheduling. It is a list of nodes to call.
The values are indexes in the previous array.
*/
static unsigned int schedule[{{schedLen}}]=
{
{{schedDescription}}
};
{% endblock %}
{% block scheduleLoop %}
{% if config.debug %}
while((cgStaticError==0) && (debugCounter > 0))
{% else %}
while(cgStaticError==0)
{% endif %}
{
/* Run a schedule iteration */
for(unsigned long id=0 ; id < {{schedLen}}; id++)
{
switch(schedule[id])
{
{% for nodeID in range(nbNodes) -%}
case {{nodeID}}:
{
{{nodes[nodeID].cRun()}}
CHECKERROR;
}
break;
{% endfor %}default:
break;
}
}
{% if config.debug %}
debugCounter--;
{% endif %}
nbSchedule++;
}
{% endblock %}