#include <stm32c031xx.h>
#include "uart_driver.h"
void setup()
{
// Initialize our own UART driver
UART2_Init(115200);
// Print startup message
UART2_Transmit_String("\r\nSTM32 UART Echo Started!\r\n");
UART2_Transmit_String("Type something: ");
}
void loop()
{
// Receive one character from Serial Monitor
uint8_t received_char = UART2_Receive();
// Send the same character back to Serial Monitor
UART2_Transmit(received_char);
}Loading
st-nucleo-c031c6
st-nucleo-c031c6