aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-05-03 15:32:46 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-05-03 15:32:46 -0400
commit2e8c42e85f0966b9be28490be80fa1266ef109bc (patch)
treee24407b8eedcdba7e7bbba9fe63ea9672786ca10
parent376ea4797ad88378dfae607beb7bba88634561f6 (diff)
downloadlibrambutan-2e8c42e85f0966b9be28490be80fa1266ef109bc.tar.gz
librambutan-2e8c42e85f0966b9be28490be80fa1266ef109bc.zip
libmaple/adc.h: Cosmetics.
Add "extern" to mark portable interface routines that are implemented individually by each series. Move some code around. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r--libmaple/include/libmaple/adc.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/libmaple/include/libmaple/adc.h b/libmaple/include/libmaple/adc.h
index be29676..3cd3eb2 100644
--- a/libmaple/include/libmaple/adc.h
+++ b/libmaple/include/libmaple/adc.h
@@ -241,23 +241,23 @@ typedef struct adc_dev {
* Routines
*/
+void adc_init(const adc_dev *dev);
+void adc_set_extsel(const adc_dev *dev, adc_extsel_event event);
+void adc_set_sample_rate(const adc_dev *dev, adc_smp_rate smp_rate);
+uint16 adc_read(const adc_dev *dev, uint8 channel);
+
/**
* @brief Set the ADC prescaler.
*
* This determines the ADC clock for all devices.
*/
-void adc_set_prescaler(adc_prescaler pre);
-
-void adc_init(const adc_dev *dev);
-void adc_set_extsel(const adc_dev *dev, adc_extsel_event event);
-void adc_set_sample_rate(const adc_dev *dev, adc_smp_rate smp_rate);
-uint16 adc_read(const adc_dev *dev, uint8 channel);
+extern void adc_set_prescaler(adc_prescaler pre);
/**
* @brief Call a function on all ADC devices.
* @param fn Function to call on each ADC device.
*/
-void adc_foreach(void (*fn)(const adc_dev*));
+extern void adc_foreach(void (*fn)(const adc_dev*));
/**
* @brief Configure a GPIO pin for ADC conversion.
@@ -265,7 +265,7 @@ void adc_foreach(void (*fn)(const adc_dev*));
* @param bit Bit on gdev to configure for ADC conversion.
*/
struct gpio_dev;
-void adc_gpio_cfg(struct gpio_dev *gdev, uint8 bit);
+extern void adc_gpio_cfg(struct gpio_dev *gdev, uint8 bit);
/**
* @brief Enable an ADC and configure it for single conversion mode.
@@ -277,7 +277,7 @@ void adc_gpio_cfg(struct gpio_dev *gdev, uint8 bit);
* @param dev Device to enable.
* @see adc_read()
*/
-void adc_enable_single_swstart(const adc_dev* dev);
+extern void adc_enable_single_swstart(const adc_dev* dev);
/**
* @brief Set the regular channel sequence length.