int main (int argc, char **argv) { /* Disable watchdog if enabled by bootloader/fuses */ MCUSR &= ~(1 << WDRF); wdt_disable(); // Assert pshold to stay powered on OUTPUT(pshold); HIGH(pshold); // En fast batt charging OUTPUT(usb_i_sel); LOW(usb_i_sel); // Init UI ui_setup(); // do nothing while(1) { // Usb processing //ser.process(); done on timer // Update ui ui_process(); } }
int main (int argc, char *argv[]) { int c; #ifdef HAVE_GETOPT_LONG int i; #endif bindtextdomain (PACKAGE, LOCALEDIR); bind_textdomain_codeset (PACKAGE, "UTF-8"); textdomain (PACKAGE); #ifdef HAVE_GETOPT_LONG while ((c = getopt_long (argc, argv, shortopts, longopts, &i)) != -1) { #else while ((c = getopt (argc, argv, shortopts)) != -1) { #endif switch (c) { case 'h': print_usage (); exit (0); case 'v': puts ("omed "VERSION); exit (0); } } gtk_init (&argc, &argv); ui_setup (); if (optind < argc) { if (strcmp (argv[optind], "moo") == 0) { /* 8') */ puts (_("I don't have any easter eggs... or do I?")); exit (0); } else { ui_open (argv[optind], NULL); } } gtk_main (); return 0; }