changeset 19:f1016b151689

Merge
author Matt Johnston <matt@ucc.asn.au>
date Tue, 22 May 2012 21:32:52 +0800
parents a5e3b363675d (current diff) bf733e8e8cf0 (diff)
children 878be5e353a0
files main.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Tue May 22 21:24:04 2012 +0800
+++ b/main.c	Tue May 22 21:32:52 2012 +0800
@@ -108,8 +108,14 @@
     CLKPR = _BV(CLKPS1);
     sei();
 
+    // 3.3v power for bluetooth and SD
     DDR_LED |= _BV(PIN_LED);
     DDR_SHDN |= _BV(PIN_SHDN);
+
+	// INT0 setup
+	EIMSK = _BV(INT0);
+	// set pullup
+	PORTD |= _BV(PD2);
 }
 
 static void
@@ -442,6 +448,12 @@
     }
 }
 
+ISR(INT0_vwct)
+{
+	need_comms = 1;
+}
+
+
 ISR(USART_RX_vect)
 {
     char c = UDR0;