/usr/bin/avos:AC MainLoop()

From ArchosDocs

Jump to: navigation, search

Description

Do some more initializing, add utility timers to the gui_timers list and then enters the main loop of the application.

References To

The Code

function AC_MainLoop() {
power_restart_poweroff_and_hdd();
miscdev_reset_alarm_reached();
input_devices_get();
input_devices_init();
input_devices_get();
 
input_devices_open(); // open mouse and keyboard devices
message_handler_init();
init_global_message_handlers(); // add message handlers such as key press, mouse press, low power, module connect, headphones plug/unplug
mainloop_init();
module_check(0);
sound_apply_settings();
Equalizer_init();
Batt_StartThread();
 
__Timers_Add(&gui_timers, &backlight_control, 500, 0); // Activate backlight after a while
__Timers_DelayedAdd(&gui_timers, &Batt_display, 500, 0xC8); // Update battery OSD
__Timers_Add(&gui_timers, &power_control, 1000, 0); // check power status and standby after a while
__Timers_Add(&gui_timers, &check_dc, 100, 0); // change battery charged led when charged
__Timers_Add(&gui_timers, &Scheduler_HandleTimer, 1000, 0); // schedule next recording on video/dvbt capable modules
__Timers_Add(&gui_timers, &AC_UpdateClock, 200, 0); // Update OSD clock
__Timers_Add(&gui_timers, &AcgUtil_handle_downloads, 1000, 0); // Handle Acg(?) downloads, with special case if it's a purchase
__Timers_Add(&gui_timers, &epg_silent_update_service, 1000, 0); // silently update the epg database from wifi, whenever available
__Timers_Add(&gui_timers, &AlarmClock_HandleTimer, 1000, 0); // display the alarm clock screen as needed
__Timers_DelayedAdd(&gui_timers, &do_housekeeping, 3600000, 0x927C0); // monitor the data partition mount state and save settings to it when mounted
 
StartupSequenceColdboot_Launch();
 
__Timers_Add(&gui_timers, &_start_USB2D_PollAttachState, 500, 1);
 
mainloop_enter();
}
Personal tools