aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/f1/other
diff options
context:
space:
mode:
authorchrysn2012-10-18 18:43:38 +0200
committerchrysn2012-10-18 18:43:44 +0200
commit47c69695ce03614f2279e3ee4d83ca07034af6c7 (patch)
treee0baaea999a68b7b9d62e988c3116322fa40a793 /examples/stm32/f1/other
parentb5de267b0671493d138f940c25f21f834f7275c4 (diff)
parent771f504757e0ac5553c95308ce66412b417fa8d1 (diff)
Merge branch 'generalizations' into efm32
Conflicts: Makefile
Diffstat (limited to 'examples/stm32/f1/other')
-rw-r--r--examples/stm32/f1/other/adc_temperature_sensor/adc.c10
-rw-r--r--examples/stm32/f1/other/dogm128/main.c2
-rw-r--r--examples/stm32/f1/other/rtc/rtc.c2
-rw-r--r--examples/stm32/f1/other/systick/systick.c2
-rw-r--r--examples/stm32/f1/other/timer_interrupt/timer.c2
5 files changed, 8 insertions, 10 deletions
diff --git a/examples/stm32/f1/other/adc_temperature_sensor/adc.c b/examples/stm32/f1/other/adc_temperature_sensor/adc.c
index dea6a7c..70cc5da 100644
--- a/examples/stm32/f1/other/adc_temperature_sensor/adc.c
+++ b/examples/stm32/f1/other/adc_temperature_sensor/adc.c
@@ -69,14 +69,13 @@ void adc_setup(void)
/* We configure everything for one single conversion. */
adc_disable_scan_mode(ADC1);
adc_set_single_conversion_mode(ADC1);
- adc_enable_discontinous_mode_regular(ADC1);
adc_disable_external_trigger_regular(ADC1);
adc_set_right_aligned(ADC1);
/* We want to read the temperature sensor, so we have to enable it. */
adc_enable_temperature_sensor(ADC1);
- adc_set_conversion_time_on_all_channels(ADC1, ADC_SMPR_SMP_28DOT5CYC);
+ adc_set_sample_time_on_all_channels(ADC1, ADC_SMPR_SMP_28DOT5CYC);
- adc_on(ADC1);
+ adc_power_on(ADC1);
/* Wait for ADC starting up. */
for (i = 0; i < 800000; i++) /* Wait a bit. */
@@ -131,10 +130,9 @@ int main(void)
adc_set_regular_sequence(ADC1, 1, channel_array);
/*
- * If the ADC_CR2_ON bit is already set -> setting it another time
- * starts the conversion.
+ * Start the conversion directly (not trigger mode).
*/
- adc_on(ADC1);
+ adc_start_conversion_direct(ADC1);
/* Wait for end of conversion. */
while (!(ADC_SR(ADC1) & ADC_SR_EOC));
diff --git a/examples/stm32/f1/other/dogm128/main.c b/examples/stm32/f1/other/dogm128/main.c
index 5838af4..7889794 100644
--- a/examples/stm32/f1/other/dogm128/main.c
+++ b/examples/stm32/f1/other/dogm128/main.c
@@ -22,7 +22,7 @@
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/timer.h>
-#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/spi.h>
#include "./dogm128.h"
diff --git a/examples/stm32/f1/other/rtc/rtc.c b/examples/stm32/f1/other/rtc/rtc.c
index ee2a427..41c5d89 100644
--- a/examples/stm32/f1/other/rtc/rtc.c
+++ b/examples/stm32/f1/other/rtc/rtc.c
@@ -22,7 +22,7 @@
#include <libopencm3/stm32/f1/rtc.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/pwr.h>
-#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/cm3/nvic.h>
void clock_setup(void)
{
diff --git a/examples/stm32/f1/other/systick/systick.c b/examples/stm32/f1/other/systick/systick.c
index b2df171..9aa2e94 100644
--- a/examples/stm32/f1/other/systick/systick.c
+++ b/examples/stm32/f1/other/systick/systick.c
@@ -20,7 +20,7 @@
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
-#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/systick.h>
u32 temp32;
diff --git a/examples/stm32/f1/other/timer_interrupt/timer.c b/examples/stm32/f1/other/timer_interrupt/timer.c
index 21a0caa..9450548 100644
--- a/examples/stm32/f1/other/timer_interrupt/timer.c
+++ b/examples/stm32/f1/other/timer_interrupt/timer.c
@@ -21,7 +21,7 @@
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/timer.h>
-#include <libopencm3/stm32/nvic.h>
+#include <libopencm3/cm3/nvic.h>
void gpio_setup(void)
{