int main(int argc, char **argv) { tests_init(argc, argv); static const char *expected = "Watchdog is active\r\n" "Waiting for Watchdog to kick\r\n" "Watchdog kicked us!\r\n"; tests_assert_uart_receive("atmega48_watchdog_test.axf", 1000000, expected, '0'); tests_success(); return 0; }
int main(int argc, char **argv) { tests_init(argc, argv); static const char *expected = "Read 8 ADC channels to test interrupts\r\n" "All done. Now reading the 1.1V value in pooling mode\r\n" "Read ADC value 0155 = 1098 mvolts -- ought to be 1098\r\n"; tests_assert_uart_receive("atmega644_adc_test.axf", 100000, expected, '0'); tests_success(); return 0; }
int main(int argc, char **argv) { tests_init(argc, argv); switch(tests_init_and_run_test("atmega48_disabled_timer.axf", 100000000)) { case LJR_CYCLE_TIMER: // the cycle timer fired break; case LJR_SPECIAL_DEINIT: // sleep with interrupts off or some other such reason fail("AVR woke up from sleep while it shouldn't have (after %" PRI_avr_cycle_count " cycles)", tests_cycle_count); default: fail("Error in test case: Should never reach this."); } tests_success(); return 0; }