Skip to content

Commit a44379a

Browse files
kalkyljamesmunns
authored andcommitted
Add Pins struct owning pins, add try_acquire, add docs, cleanup
1 parent 736db40 commit a44379a

File tree

3 files changed

+91
-64
lines changed

3 files changed

+91
-64
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- TWIS module ([#196]).
1212
- PWM module ([#200]).
1313
- I2S module ([#201]).
14+
- SPIS module ([#226]).
1415

1516
### Fixes
1617

@@ -95,6 +96,5 @@ None
9596
[#168]: https://github.com/nrf-rs/nrf-hal/pull/168
9697
[#167]: https://github.com/nrf-rs/nrf-hal/pull/167
9798
[#172]: https://github.com/nrf-rs/nrf-hal/pull/172
98-
9999
[0.11.0]: https://github.com/nrf-rs/nrf-hal/releases/tag/v0.11.0
100100
[0.11.1]: https://github.com/nrf-rs/nrf-hal/releases/tag/v0.11.1

examples/spis-demo/src/main.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ const APP: () = {
3838

3939
let spis = Spis::new(
4040
ctx.device.SPIS0,
41-
&sck_pin,
42-
&cs_pin,
43-
Some(&copi_pin),
44-
Some(&cipo_pin),
41+
Pins {
42+
sck: sck_pin,
43+
cs: cs_pin,
44+
copi: Some(copi_pin),
45+
cipo: Some(cipo_pin),
46+
},
4547
);
4648
spis.enable_interrupt(SpisEvent::End);
4749

0 commit comments

Comments
 (0)