earlgrey/
spi_host.rs

1// Licensed under the Apache License, Version 2.0 or the MIT License.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Copyright Tock Contributors 2022.
4
5use crate::registers::top_earlgrey::{SPI_HOST0_BASE_ADDR, SPI_HOST1_BASE_ADDR};
6use kernel::utilities::StaticRef;
7use lowrisc::spi_host::SpiHostRegisters;
8
9pub const SPIHOST0_BASE: StaticRef<SpiHostRegisters> =
10    unsafe { StaticRef::new(SPI_HOST0_BASE_ADDR as *const SpiHostRegisters) };
11
12pub const SPIHOST1_BASE: StaticRef<SpiHostRegisters> =
13    unsafe { StaticRef::new(SPI_HOST1_BASE_ADDR as *const SpiHostRegisters) };