Skip to content

Commit 72412f6

Browse files
committed
unusedification
1 parent 92d8322 commit 72412f6

1 file changed

Lines changed: 12 additions & 28 deletions

File tree

tock/boards/arty-e21/src/main.rs

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@
22
#![no_main]
33
#![feature(const_fn, in_band_lifetimes)]
44

5-
use capsules::virtual_alarm::{MuxAlarm, VirtualMuxAlarm};
6-
use capsules::virtual_uart::{MuxUart, UartDevice};
5+
use capsules::virtual_alarm::{VirtualMuxAlarm};
76
use kernel::capabilities;
8-
use kernel::common::ring_buffer::RingBuffer;
9-
use kernel::component::Component;
10-
use kernel::hil;
117
use kernel::Platform;
12-
use kernel::{create_capability, debug, static_init};
8+
use kernel::{create_capability, static_init};
139

1410
mod timer_test {
1511
#![allow(dead_code)]
1612

17-
use kernel::debug;
1813
use kernel::hil::time::{self, Alarm};
1914

2015
pub struct TimerTest<'a, A: Alarm<'a>> {
@@ -35,37 +30,26 @@ impl<A: Alarm<'a>> time::AlarmClient for TimerTest<'a, A> {
3530
}
3631

3732
pub mod io {
38-
use arty_e21;
3933
use core::fmt::Write;
4034
use core::panic::PanicInfo;
4135
use core::str;
42-
use kernel::debug;
43-
use kernel::hil::gpio;
44-
use kernel::hil::led;
45-
use rv32i;
46-
47-
use crate::PROCESSES;
4836

4937
struct Writer;
5038

51-
static mut WRITER: Writer = Writer {};
52-
5339
impl Write for Writer {
54-
fn write_str(&mut self, s: &str) -> ::core::fmt::Result { loop { } }
40+
fn write_str(&mut self, _: &str) -> ::core::fmt::Result { loop { } }
5541
}
5642

5743
#[cfg(not(test))]
5844
#[no_mangle]
5945
#[panic_handler]
60-
pub unsafe extern "C" fn panic_fmt(pi: &PanicInfo) -> ! { loop { } }
46+
pub unsafe extern "C" fn panic_fmt(_: &PanicInfo) -> ! { loop { } }
6147
}
6248

6349
const NUM_PROCS: usize = 4;
6450

65-
const FAULT_RESPONSE: kernel::procs::FaultResponse = kernel::procs::FaultResponse::Panic;
66-
67-
#[link_section = ".app_memory"]
68-
static mut APP_MEMORY: [u8; 8192] = [0; 8192];
51+
// #[link_section = ".app_memory"]
52+
// static mut APP_MEMORY: [u8; 8192] = [0; 8192];
6953

7054
static mut PROCESSES: [Option<&'static dyn kernel::procs::ProcessType>; NUM_PROCS] =
7155
[None, None, None, None];
@@ -75,18 +59,18 @@ static mut PROCESSES: [Option<&'static dyn kernel::procs::ProcessType>; NUM_PROC
7559
pub static mut STACK_MEMORY: [u8; 0x1000] = [0; 0x1000];
7660

7761
struct ArtyE21 {
78-
console: &'static capsules::console::Console<'static>,
79-
gpio: &'static capsules::gpio::GPIO<'static>,
80-
alarm: &'static capsules::alarm::AlarmDriver<
62+
_console: &'static capsules::console::Console<'static>,
63+
_gpio: &'static capsules::gpio::GPIO<'static>,
64+
_alarm: &'static capsules::alarm::AlarmDriver<
8165
'static,
8266
VirtualMuxAlarm<'static, rv32i::machine_timer::MachineTimer<'static>>,
8367
>,
84-
led: &'static capsules::led::LED<'static>,
85-
button: &'static capsules::button::Button<'static>,
68+
_led: &'static capsules::led::LED<'static>,
69+
_button: &'static capsules::button::Button<'static>,
8670
}
8771

8872
impl Platform for ArtyE21 {
89-
fn with_driver<F, R>(&self, driver_num: usize, f: F) -> R
73+
fn with_driver<F, R>(&self, _: usize, _: F) -> R
9074
where
9175
F: FnOnce(Option<&dyn kernel::Driver>) -> R,
9276
{ loop { } }

0 commit comments

Comments
 (0)