e310x/
pwm.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
5//! PWM instantiation.
6
7use kernel::utilities::StaticRef;
8use sifive::pwm::PwmRegisters;
9
10pub const PWM0_BASE: StaticRef<PwmRegisters> =
11    unsafe { StaticRef::new(0x10015000 as *const PwmRegisters) };
12pub const PWM1_BASE: StaticRef<PwmRegisters> =
13    unsafe { StaticRef::new(0x10025000 as *const PwmRegisters) };
14pub const PWM2_BASE: StaticRef<PwmRegisters> =
15    unsafe { StaticRef::new(0x10035000 as *const PwmRegisters) };