Rahix / avr-hal

embedded-hal abstractions for AVR microcontrollers
Apache License 2.0
1.23k stars 216 forks source link

generic: spi: Add escape hatch for the ChipSelectPin #529

Closed Rahix closed 1 month ago

Rahix commented 3 months ago

There are situations where the ChipSelectPin abstraction is not enough - for example when a user wants to use the ChipSelectPin as a PWM pin.

To enable such usecases anyway, add an escape hatch for getting back the original Pin<> type that's hidden in the ChipSelectPin. This is unsafe, for obvious reasons.

Related to #442.

Rahix commented 1 month ago

Merging this anyway even though #442 should get some more attention.