-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmod.rs
More file actions
65 lines (59 loc) · 2.1 KB
/
mod.rs
File metadata and controls
65 lines (59 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright 2025 The Axvisor Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Local Vector Table
mod cmci;
mod error;
mod lint0;
mod lint1;
mod perfmon;
mod thermal;
mod timer;
pub use cmci::*;
pub use error::*;
pub use lint0::*;
pub use lint1::*;
pub use perfmon::*;
pub use thermal::*;
pub use timer::*;
pub use crate::consts::RESET_LVT_REG;
/// A read-write copy of LVT registers.
pub struct LocalVectorTable {
/// LVT CMCI Register (FEE0 02F0H)
pub lvt_cmci: LvtCmciRegisterLocal,
/// LVT Timer Register (FEE0 0320H)
pub lvt_timer: LvtTimerRegisterLocal,
/// LVT Thermal Monitor Register (FEE0 0330H)
pub lvt_thermal: LvtThermalMonitorRegisterLocal,
/// LVT Performance Counter Register (FEE0 0340H)
pub lvt_perf_count: LvtPerformanceCounterRegisterLocal,
/// LVT LINT0 Register (FEE0 0350H)
pub lvt_lint0: LvtLint0RegisterLocal,
/// LVT LINT1 Register (FEE0 0360H)
pub lvt_lint1: LvtLint1RegisterLocal,
/// LVT Error register 0x37.
pub lvt_err: LvtErrorRegisterLocal,
}
impl Default for LocalVectorTable {
fn default() -> Self {
LocalVectorTable {
lvt_cmci: LvtCmciRegisterLocal::new(RESET_LVT_REG),
lvt_timer: LvtTimerRegisterLocal::new(RESET_LVT_REG),
lvt_thermal: LvtThermalMonitorRegisterLocal::new(RESET_LVT_REG),
lvt_perf_count: LvtPerformanceCounterRegisterLocal::new(RESET_LVT_REG),
lvt_lint0: LvtLint0RegisterLocal::new(RESET_LVT_REG),
lvt_lint1: LvtLint1RegisterLocal::new(RESET_LVT_REG),
lvt_err: LvtErrorRegisterLocal::new(RESET_LVT_REG),
}
}
}