Skip to content

Commit

Permalink
Wrapped newly unsafe function in an unsafe block
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahbron committed Oct 23, 2019
1 parent 604414c commit bd13c70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion avr-hal-generic/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ macro_rules! impl_spi {
/// Write a byte to the data register, which begins transmission
/// automatically
fn write(&self, byte: u8) {
self.peripheral.spdr.write(|w| w.bits(byte));
self.peripheral.spdr.write(|w| unsafe { w.bits(byte) });
}

/// Loop forever, checking the transmission complete bit until it is set
Expand Down

0 comments on commit bd13c70

Please sign in to comment.