void burnin_gi_thread (void) { for (;;) { U8 gi; for (gi = (1 << 0); gi <= (1 << 4); gi <<= 1) { gi_enable (gi); task_sleep (TIME_500MS); gi_disable (gi); } } }
CALLSET_ENTRY (tilt, sw_tilt) { extern U8 in_tilt; /* Ignore tilt switch activity while already in tilt state. * But restart the timer that tells us that the tilt is still * moving, so we can delay endball. */ if (in_tilt) { free_timer_restart (TIM_IGNORE_TILT, TIME_2S); return; } /* IDEA : Disable tilt while a ball search is in progress? */ else if (++tilt_warnings == system_config.tilt_warnings) { /* Warnings exceeded... tilt the current ball */ sound_reset (); #ifdef CONFIG_GI gi_disable (PINIO_GI_STRINGS); #endif deff_start (DEFF_TILT); leff_start (LEFF_TILT); free_timer_restart (TIM_IGNORE_TILT, TIME_2S); in_tilt = TRUE; task_remove_duration (TASK_DURATION_LIVE); task_duration_expire (TASK_DURATION_LIVE); flipper_disable (); set_valid_playfield (); audit_increment (&system_audits.tilts); audit_increment (&system_audits.plumb_bob_tilts); callset_invoke (tilt); } else { /* Give a warning this time */ deff_start (DEFF_TILT_WARNING); leff_start (LEFF_TILT_WARNING); callset_invoke (tilt_warning); } }