blob: fa0a932cf2ac6aae73b018ee0efb50f3e68c0486 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <stdint.h>
#include "debug.h"
static volatile uint32_t* uart_fifo_dr = (uint32_t*)0x09000000;
static volatile uint32_t* uart_fifo_fr = (uint32_t*)0x09000018;
void uart_pputc(char c) {
/* spin while fifo is full */
while (*uart_fifo_fr & (1 << 5))
;
*uart_fifo_dr = c;
}