1// Copyright 2018 The Fuchsia Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#include <stdint.h> 6#include "debug.h" 7 8static volatile uint32_t* uart_fifo_dr = (uint32_t *)0x09000000; 9static volatile uint32_t* uart_fifo_fr = (uint32_t *)0x09000018; 10 11void uart_pputc(char c) 12{ 13 /* spin while fifo is full */ 14 while (*uart_fifo_fr & (1<<5)) 15 ; 16 *uart_fifo_dr = c; 17} 18