comparison main.c @ 4:fd28c7358ce8

more additions, set ports
author Matt Johnston <matt@ucc.asn.au>
date Tue, 04 Jun 2013 22:12:01 +0800
parents 0a6cbbb8c2b7
children 87c8d0a11906
comparison
equal deleted inserted replaced
3:ca3a006e292c 4:fd28c7358ce8
33 #define UBRR ((F_CPU)/8/(BAUD)-1) 33 #define UBRR ((F_CPU)/8/(BAUD)-1)
34 34
35 // XXX 35 // XXX
36 #define PORT_PI_BOOT PORTD 36 #define PORT_PI_BOOT PORTD
37 #define DDR_PI_BOOT DDRD 37 #define DDR_PI_BOOT DDRD
38 #define PIN_PI_BOOT PD7 38 #define PIN_PI_BOOT PD5
39 39
40 // XXX 40 // XXX
41 #define PORT_PI_RESET PORTD 41 #define PORT_PI_RESET PORTD
42 #define DDR_PI_RESET DDRD 42 #define DDR_PI_RESET DDRD
43 #define PIN_PI_RESET PD6 43 #define PIN_PI_RESET PD6
44 44
45 45
46 #define PORT_LED PORTC 46 #define PORT_LED PORTD
47 #define DDR_LED DDRC 47 #define DDR_LED DDRD
48 #define PIN_LED PC4 48 #define PIN_LED PD7
49 49
50 // #define HAVE_UART_ECHO 50 // #define HAVE_UART_ECHO
51 51
52 // stores a value of clock_epoch combined with the remainder of TCNT2, 52 // stores a value of clock_epoch combined with the remainder of TCNT2,
53 // for 1/32 second accuracy 53 // for 1/32 second accuracy
488 } 488 }
489 else if (strcmp_P(readbuf, PSTR("reset")) == 0) 489 else if (strcmp_P(readbuf, PSTR("reset")) == 0)
490 { 490 {
491 cmd_reset(); 491 cmd_reset();
492 } 492 }
493 else if (strcmp_P(readbuf, PSTR("newboot")) == 0)
494 {
495 cmd_newboot();
496 }
493 else 497 else
494 { 498 {
495 printf_P(PSTR("Bad command '%s'\n"), readbuf); 499 printf_P(PSTR("Bad command '%s'\n"), readbuf);
496 } 500 }
497 } 501 }
573 { 577 {
574 oneshot_hit = 1; 578 oneshot_hit = 1;
575 oneshot_count = 0; 579 oneshot_count = 0;
576 } 580 }
577 } 581 }
578
579
580 } 582 }
581 583
582 static void 584 static void
583 idle_sleep() 585 idle_sleep()
584 { 586 {