Skip to content

Commit 2f2f123

Browse files
authored
Merge pull request #32 from bombela/patch-1
Add missing turbofix to examples
2 parents 48faff1 + aa77b48 commit 2f2f123

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ cargo build -Z build-std=core --target avr-atmega328p.json --release
1919
## API
2020

2121
```rust
22-
delay_cycles<const CYCLES: u64>()
23-
delay_us<const US: u64>()
24-
delay_ms<const MS: u64>()
25-
delay_sec<const SEC: u64>()
22+
delay_cycles::<const CYCLES: u64>()
23+
delay_us::<const US: u64>()
24+
delay_ms::<const MS: u64>()
25+
delay_sec::<const SEC: u64>()
2626
```
2727

2828
`delay_cycles` accepts 0 to 25_769_803_784 cycles (almost 18 minutes at 24Mhz).
2929

3030
The other functions convert time to cycles by using CPU_FREQUENCY_HZ.
3131

3232
```rust
33-
delay_ms<42>(); // delay by 42ms (exactly 1_008_000 cycles at 24Mhz).
33+
delay_ms::<42>(); // delay by 42ms (exactly 1_008_000 cycles at 24Mhz).
3434
```
3535

3636
## Example
@@ -72,7 +72,7 @@ pub extern fn main() {
7272
loop {
7373
out = out ^ 0xff;
7474
unsafe { write_volatile(PORTB, out) }
75-
delay_ms<1000000>();
75+
delay_ms::<1000000>();
7676
}
7777
}
7878

0 commit comments

Comments
 (0)