From 34ba3ad739a3e4359efbb92b8a7693c17d6b1201 Mon Sep 17 00:00:00 2001 From: OscarKro Date: Fri, 8 Jan 2021 15:51:12 +0100 Subject: [PATCH] accepted wovo's change, I've changed the way adc pin waits for the COCO bit --- library/targets/hwlib-teensy-40.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/library/targets/hwlib-teensy-40.hpp b/library/targets/hwlib-teensy-40.hpp index 0eb00fa..443859f 100644 --- a/library/targets/hwlib-teensy-40.hpp +++ b/library/targets/hwlib-teensy-40.hpp @@ -273,13 +273,7 @@ namespace teensy_40 return 0xFFFFFFFF; } ADC1->HC[0] = myCorePin.ad_channel; // write channel in hc to start reading the pin and start the conversion process -<<<<<<< HEAD:library/targets/hwlib-teensy_40.hpp - //while(ADC1->HS & 0b1){} //wait till the conversion complete (ADACT p. 3368) - while((ADC1->HS & 0b1) == 0){} //wait till the coco conversion bit is complete (p.3359 ) - //hwlib::wait_ms(50); -======= while((ADC1->HS & 0b1) == 0 ){} //wait till the conversion complete (ADACT p. 3368) ->>>>>>> ed53470805443a48d42aa89b0146c2b5b1de484a:library/targets/hwlib-teensy-40.hpp return (adc_value_type)ADC1->R[0]; //read from the ADC1 -> R0 register }