From ce7d530e5cc44094629335b9fa990bbbccb419d9 Mon Sep 17 00:00:00 2001
From: Michael Dryden <mdryden@chem.utoronto.ca>
Date: Wed, 4 Feb 2015 18:01:17 -0500
Subject: [PATCH] main: added delay before USB init to try and increase
 connection reliability

---
 DSTAT-temp/src/main.c |   6 ++----
 DSTAT1.atsuo          | Bin 51712 -> 56832 bytes
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/DSTAT-temp/src/main.c b/DSTAT-temp/src/main.c
index fd11c7b..af0043a 100644
--- a/DSTAT-temp/src/main.c
+++ b/DSTAT-temp/src/main.c
@@ -132,22 +132,20 @@ int main(void){
 	
 	pmic_set_scheduling(PMIC_SCH_ROUND_ROBIN);
 	
+	delay_ms(500);
+	
 	stdio_usb_init();
 	stdio_usb_enable();
 	
 	ads1255_init_pins();
 	ads1255_init_module();
-	ads1255_setup(ADS_BUFF_ON,ADS_DR_60,ADS_PGA_2);
 
 	PORTD.INT0MASK = PIN5_bm;
 	PORTD.INT1MASK = PIN5_bm;
 	PORTD.INTCTRL = PORT_INT0LVL_OFF_gc | PORT_INT1LVL_OFF_gc;
 	
-	dma_enable();
-	
 	max5443_init_pins();
 	max5443_init_module();
-	delay_ms(300);
 	
 	ads1255_wakeup();
 	ads1255_rdatac();
diff --git a/DSTAT1.atsuo b/DSTAT1.atsuo
index 4d502164b15ef896773355c66b2977e4db83774e..27e605a947380e8b305f257e7b61f155ff94837d 100644
GIT binary patch
delta 2224
zcmaJ?3rv((7QXkNpK*YJodE@;iXbQhBJ!}JsoH;V2FD6A7$AZ?ruYC?gaN19)<<{T
zj&2`Y3-h(X7z@+U+Je<mu1!s=o1wP5bu}qfQ~SvFVba#5iD?OGD^b|<4`9dbX7A+7
zIrp4%&pqedbN+F^pmCqo^ml0HZDEXUB{UM62-^sMBy1-%6Lt{BI?L92<z}rjb9C=T
z1?_SfR_Sw*Bg^<zF4m`ziH0yv3r1ZU+=;SyEX=GmwpVrD_$>bX%}P95@j?8RFC=uX
zj}`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