extracted embedded_execute_once() for better

This commit is contained in:
matthias.ringwald 2013-07-15 20:37:14 +00:00
parent f51adbed2c
commit 0a1bad9b3c

View File

@ -138,13 +138,11 @@ void embedded_dump_timer(void){
}
/**
* Execute run_loop
* Execute run_loop once
*/
void embedded_execute(void) {
void embedded_execute_once(void) {
data_source_t *ds;
while (1) {
// process data sources
data_source_t *next;
for (ds = (data_source_t *) data_sources; ds != NULL ; ds = next){
@ -167,12 +165,20 @@ void embedded_execute(void) {
if (trigger_event_received){
trigger_event_received = 0;
hal_cpu_enable_irqs();
continue;
}
} else {
hal_cpu_enable_irqs_and_sleep();
}
}
/**
* Execute run_loop
*/
void embedded_execute(void) {
while (1) {
embedded_execute_once();
}
}
#ifdef HAVE_TICK
static void embedded_tick_handler(void){
system_ticks++;