extern int Desk, Mode; extern unsigned int test_start, test_stop, test_permission, test_tick; extern unsigned int test_starts, test_last_stop_tick, test_last_start_tick; extern int test_bad_order; static void clear_START_DPTB(void) { test_start = 0; } static void set_START_DPTB(void) { if (test_stop || (test_starts && test_tick-test_last_stop_tick < 1000)) test_bad_order = 1; test_start = 1; test_last_start_tick = test_tick; test_starts++; } static void set_STOP_DPTB(void) { test_stop = 1; test_last_stop_tick = test_tick; } static void clear_STOP_DPTB(void) { test_stop = 0; } static void clear_RES_OUT_2(void) { test_permission = 0; } static void set_RES_OUT_2(void) { if (!test_start || test_stop) test_bad_order = 1; test_permission = 1; } static void toggle_RES_OUT_1(void) {}