aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32f1/stm32-h103/usart_printf/usart_printf.c')
-rw-r--r--examples/stm32f1/stm32-h103/usart_printf/usart_printf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c
index 26fcee6..1eb067f 100644
--- a/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c
+++ b/examples/stm32f1/stm32-h103/usart_printf/usart_printf.c
@@ -18,8 +18,8 @@
* 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/usart.h>
#include <libopencm3/stm32/nvic.h>
@@ -46,7 +46,7 @@ void usart_setup(void)
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
/* Setup UART parameters. */
- usart_set_baudrate(USART1, 230400);
+ usart_set_baudrate(USART1, 230400, rcc_ppre2_frequency);
usart_set_databits(USART1, 8);
usart_set_stopbits(USART1, USART_STOPBITS_1);
usart_set_parity(USART1, USART_PARITY_NONE);