CARME-M4 BSP  V1.5
usart.c

Explains how to send a string over the stdout to the CARME UART0.

/*
* This example shows how to send a string over the stdout to the CARME UART0.
*/
#include <stdio.h>
#include <stm32f4xx.h>
#include <carme.h>
#include <uart.h>
int main(void) {
USART_InitTypeDef USART_InitStruct;
USART_StructInit(&USART_InitStruct);
USART_InitStruct.USART_BaudRate = 115200;
CARME_UART_Init(CARME_UART0, &USART_InitStruct);
printf("\033c"); /* Reset to initial state */
printf("\033[2J"); /* Clear screen */
printf("\033[?25l"); /* Cursor off */
printf("The quick brown fox\r\n");
printf("jumps over the lazy dog\r\n");
for (;;) {
}
return 0;
}