/**
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "pico/stdlib.h"
#define UART_TX_PIN 0
#define UART_RX_PIN 1
int main() {
uart_init(uart0, 4800);
// Set the TX and RX pins by using the function select on the GPIO
// Set datasheet for more information on function select
gpio_set_function(UART_TX_PIN, GPIO_FUNC_UART);
gpio_set_function(UART_RX_PIN, GPIO_FUNC_UART);
// Use some the various UART functions to send out data
// In a default system, printf will also output via the default UART
// Send out a character without any conversions
uart_putc_raw(uart0, 'A');
// Send out a character but do CR/LF conversions
uart_putc(uart0, 'B');
// Send out a string, with CR/LF conversions
uart_puts(uart0, "Hej");
}