blob: 15bd94d22e4bd7ee28ac0941431148001e1e5c48 [file]
// Copyright 2026 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 <phys/output/uart.h>
#include <ktl/enforce.h>
namespace {
constinit UartDriver gUart;
} // namespace
UartDriver& GetUartDriver() { return gUart; }
UartDriver& SetUartDriver(const uart::all::Config<>& uart_config) {
gUart = uart::all::MakeDriver(uart_config);
gUart.Visit([](auto& driver) { driver.Init(); });
return gUart;
}