atl1c_main.c: add wait_for_idle routine