From 6c956a383834b66c29591294f0926ced22f3e3b7 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 22 Oct 2010 21:13:02 -0400 Subject: maple mini runs blinky now. still need usb descriptors to improve, and also nothing else is tested. --- libmaple/adc.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libmaple/adc.h') diff --git a/libmaple/adc.h b/libmaple/adc.h index 9b61821..ce67116 100644 --- a/libmaple/adc.h +++ b/libmaple/adc.h @@ -43,7 +43,8 @@ extern "C"{ * * Need to up the sample time if otherwise... see datasheet */ -/* TODO: We'll only use ADC1 for now... */ +/* TODO: We'll only use ADC1 for now. See page 41 of the manual for + ADC2 and ADC3's real addresses. */ #define ADC1_BASE 0x40012400 #define ADC2_BASE 0x40012400 #define ADC3_BASE 0x40012400 @@ -73,17 +74,17 @@ extern "C"{ void adc_init(void); void adc_disable(void); -/* Perform a single conversion on ADC[0-16], +/* Perform a single conversion on ADC[0-15], * PRECONDITIONS: * adc initialized */ static inline int adc_read(int channel) { - /* Set channel */ + /* Set channel */ ADC_SQR3 = channel; - /* Start the conversion */ + /* Start the conversion */ CR2_SWSTART_BIT = 1; - /* Wait for it to finish */ + /* Wait for it to finish */ while(SR_EOC_BIT == 0) ; -- cgit v1.2.3