@@ -38,7 +38,7 @@ use smoltcp::{
38
38
time:: Instant ,
39
39
wire:: { EthernetAddress , IpAddress , IpEndpoint , Ipv4Address } ,
40
40
} ;
41
- use stm32f7:: stm32f7x6:: { self , CorePeripherals , Interrupt , Peripherals , SAI2 } ;
41
+ use stm32f7:: stm32f7x6:: { CorePeripherals , Interrupt , Peripherals , SAI2 } ;
42
42
use stm32f7_discovery:: {
43
43
ethernet,
44
44
gpio:: { GpioPort , InputPin , OutputPin } ,
@@ -53,15 +53,9 @@ use stm32f7_discovery::{
53
53
future_mutex:: FutureMutex ,
54
54
i2c:: I2C ,
55
55
} ;
56
- use core:: ops:: { Generator , GeneratorState } ;
57
- use core:: future:: Future ;
58
56
use futures:: { Stream , StreamExt } ;
59
57
use pin_utils:: pin_mut;
60
- use spin:: Mutex ;
61
58
use alloc:: sync:: Arc ;
62
- use alloc:: collections:: VecDeque ;
63
- use core:: task:: { Poll , LocalWaker } ;
64
- use core:: pin:: Pin ;
65
59
66
60
#[ global_allocator]
67
61
static ALLOCATOR : CortexMHeap = CortexMHeap :: empty ( ) ;
@@ -94,7 +88,7 @@ fn run() -> ! {
94
88
let mut ethernet_dma = peripherals. ETHERNET_DMA ;
95
89
let mut nvic_stir = peripherals. NVIC_STIR ;
96
90
let mut tim6 = peripherals. TIM6 ;
97
- let mut exti = peripherals. EXTI ;
91
+ let exti = peripherals. EXTI ;
98
92
99
93
init:: init_system_clock_216mhz ( & mut rcc, & mut pwr, & mut flash) ;
100
94
init:: enable_gpio_ports ( & mut rcc) ;
@@ -128,7 +122,7 @@ fn run() -> ! {
128
122
unsafe { ALLOCATOR . init ( rt:: heap_start ( ) as usize , HEAP_SIZE ) }
129
123
130
124
lcd. set_background_color ( Color :: from_hex ( 0x006600 ) ) ;
131
- let mut layer_1 = lcd. layer_1 ( ) . unwrap ( ) ;
125
+ let layer_1 = lcd. layer_1 ( ) . unwrap ( ) ;
132
126
let mut layer_2 = lcd. layer_2 ( ) . unwrap ( ) ;
133
127
134
128
layer_2. clear ( ) ;
@@ -137,7 +131,7 @@ fn run() -> ! {
137
131
println ! ( "Hello World" ) ;
138
132
139
133
140
- let xs = vec ! [ 1 , 2 , 3 ] ;
134
+ let _xs = vec ! [ 1 , 2 , 3 ] ;
141
135
142
136
let mut i2c_3 = init:: init_i2c_3 ( Box :: leak ( Box :: new ( peripherals. I2C3 ) ) , & mut rcc) ;
143
137
i2c_3. test_1 ( ) ;
@@ -192,9 +186,9 @@ fn run() -> ! {
192
186
} ;
193
187
194
188
let ( idle_waker_sink, mut idle_waker_stream) = mpsc:: unbounded ( ) ;
195
- let ( tim6_sink, mut tim6_stream) = mpsc:: unbounded ( ) ;
196
- let ( button_sink, mut button_stream) = mpsc:: unbounded ( ) ;
197
- let ( touch_int_sink, mut touch_int_stream) = mpsc:: unbounded ( ) ;
189
+ let ( tim6_sink, tim6_stream) = mpsc:: unbounded ( ) ;
190
+ let ( button_sink, button_stream) = mpsc:: unbounded ( ) ;
191
+ let ( touch_int_sink, touch_int_stream) = mpsc:: unbounded ( ) ;
198
192
199
193
interrupt_table. register ( InterruptRequest :: TIM6_DAC , Priority :: P1 , move || {
200
194
tim6_sink. unbounded_send ( ( ) ) . expect ( "sending on tim6 channel failed" ) ;
@@ -252,7 +246,7 @@ fn run() -> ! {
252
246
253
247
// ethernet
254
248
let mut ethernet_task_idle_stream = task_runtime:: IdleStream :: new ( idle_waker_sink. clone ( ) ) ;
255
- let ethernet_task = async move || {
249
+ let _ethernet_task = async move || {
256
250
let mut ethernet_interface = ethernet:: EthernetDevice :: new (
257
251
Default :: default ( ) ,
258
252
Default :: default ( ) ,
@@ -328,7 +322,7 @@ fn run() -> ! {
328
322
//executor.spawn_local(ethernet_task).unwrap();
329
323
//executor.spawn_local(print_x);
330
324
331
- let mut idle = async move {
325
+ let idle = async move {
332
326
loop {
333
327
let next_waker = await ! ( idle_waker_stream. next( ) ) . expect ( "idle channel closed" ) ;
334
328
next_waker. wake ( ) ;
0 commit comments