aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f1/other/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32f1/other/rtc')
-rw-r--r--examples/stm32f1/other/rtc/rtc.c8
-rw-r--r--examples/stm32f1/other/rtc/rtc.ld2
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32f1/other/rtc/rtc.c b/examples/stm32f1/other/rtc/rtc.c
index c447534..28ae24c 100644
--- a/examples/stm32f1/other/rtc/rtc.c
+++ b/examples/stm32f1/other/rtc/rtc.c
@@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <libopencm3/stm32/rcc.h>
-#include <libopencm3/stm32/gpio.h>
+#include <libopencm3/stm32/f1/rcc.h>
+#include <libopencm3/stm32/f1/gpio.h>
+#include <libopencm3/stm32/f1/rtc.h>
#include <libopencm3/stm32/usart.h>
-#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/pwr.h>
#include <libopencm3/stm32/nvic.h>
@@ -43,7 +43,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 38400);
+ usart_set_baudrate(USART1, 38400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_mode(USART1, USART_MODE_TX);
diff --git a/examples/stm32f1/other/rtc/rtc.ld b/examples/stm32f1/other/rtc/rtc.ld
index 7ea2b92..3409b98 100644
--- a/examples/stm32f1/other/rtc/rtc.ld
+++ b/examples/stm32f1/other/rtc/rtc.ld
@@ -27,5 +27,5 @@ MEMORY
}
/* Include the common ld script. */
-INCLUDE libopencm3_stm32.ld
+INCLUDE libopencm3_stm32f1.ld