Skip to content

Commit bcdc671

Browse files
committed
Delay
1 parent b00758f commit bcdc671

16 files changed

+37
-37
lines changed

examples/analog-stopwatch-with-spi-ssd1306.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn main() -> ! {
117117

118118
let dc = gpioe.pe3.into_push_pull_output();
119119
let mut ss = gpioe.pe4.into_push_pull_output();
120-
let mut delay = hal::delay::Delay::new(cp.SYST, clocks);
120+
let mut delay = hal::delay::Delay::new(cp.SYST, &clocks);
121121

122122
ss.set_high();
123123
delay.delay_ms(100_u32);

examples/delay-syst-blinky.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() -> ! {
2828
let clocks = rcc.cfgr.sysclk(48.mhz()).freeze();
2929

3030
// Create a delay abstraction based on SysTick
31-
let mut delay = hal::delay::Delay::new(cp.SYST, clocks);
31+
let mut delay = hal::delay::Delay::new(cp.SYST, &clocks);
3232

3333
loop {
3434
// On for 1s, off for 1s.

examples/delay-timer-blinky.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() -> ! {
2828
let clocks = rcc.cfgr.sysclk(48.mhz()).freeze();
2929

3030
// Create a delay abstraction based on general-pupose 32-bit timer TIM5
31-
let mut delay = hal::delay::Delay::tim5(dp.TIM5, clocks);
31+
let mut delay = hal::delay::Delay::tim5(dp.TIM5, &clocks);
3232

3333
loop {
3434
// On for 1s, off for 1s.

examples/f413disco_lcd_ferris.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ fn main() -> ! {
746746
gpioe.pe5.into_push_pull_output().set_high();
747747

748748
// Get delay provider
749-
let mut delay = Delay::new(cp.SYST, clocks);
749+
let mut delay = Delay::new(cp.SYST, &clocks);
750750

751751
// Set up timing
752752
let write_timing = Timing::default().data(3).address_setup(3).bus_turnaround(0);

examples/i2s-audio-out-dma.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn main() -> ! {
103103
let gpioc = dp.GPIOC.split();
104104
let gpiod = dp.GPIOD.split();
105105

106-
let mut delay = Delay::new(cp.SYST, clocks);
106+
let mut delay = Delay::new(cp.SYST, &clocks);
107107

108108
let i2c = I2c::new(
109109
dp.I2C1,

examples/i2s-audio-out.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn main() -> ! {
100100
// The 86 MHz frequency can be divided to get a sample rate very close to 48 kHz.
101101
let clocks = rcc.cfgr.use_hse(8.mhz()).i2s_clk(86.mhz()).freeze();
102102

103-
let mut delay = Delay::new(cp.SYST, clocks);
103+
let mut delay = Delay::new(cp.SYST, &clocks);
104104

105105
let i2c = I2c::new(
106106
dp.I2C1,

examples/qei.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn main() -> ! {
3232
let clocks = rcc.cfgr.freeze();
3333

3434
// Create a delay abstraction based on SysTick.
35-
let mut delay = Delay::new(cp.SYST, clocks);
35+
let mut delay = Delay::new(cp.SYST, &clocks);
3636

3737
let gpioa = dp.GPIOA.split();
3838

examples/rng-display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn main() -> ! {
6161
.sysclk(128.mhz())
6262
.freeze();
6363

64-
let mut delay_source = hal::delay::Delay::new(cp.SYST, clocks);
64+
let mut delay_source = hal::delay::Delay::new(cp.SYST, &clocks);
6565

6666
// Set up I2C1: SCL is PB8 and SDA is PB9; they are set to Alternate Function 4
6767
// as per the STM32F407 datasheet. Pin assignment as per the

examples/sd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() -> ! {
3030

3131
assert!(clocks.is_pll48clk_valid());
3232

33-
let mut delay = delay::Delay::new(core.SYST, clocks);
33+
let mut delay = delay::Delay::new(core.SYST, &clocks);
3434

3535
let gpioc = device.GPIOC.split();
3636
let gpiod = device.GPIOD.split();

examples/serial-9bit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn main() -> ! {
5555

5656
let clocks = rcc.cfgr.use_hse(8.mhz()).freeze();
5757

58-
let mut delay = hal::delay::Delay::new(cp.SYST, clocks);
58+
let mut delay = hal::delay::Delay::new(cp.SYST, &clocks);
5959

6060
// define RX/TX pins
6161
let tx_pin = gpioa.pa2.into_alternate();

0 commit comments

Comments
 (0)