Skip to content

Commit cbfa87b

Browse files
committed
generic: spi: Use new names for SPI clock rates
With avr-device the names for the SPI clock rates were updated. Reflect this update in the HAL as well to make it compile with the new version.
1 parent a26f6b4 commit cbfa87b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

avr-hal-generic/src/spi.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,13 @@ macro_rules! impl_spi {
278278
};
279279
// set up clock rate control bit
280280
match self.settings.clock {
281-
SerialClockRate::OscfOver2 => w.spr().val_0x00(),
282-
SerialClockRate::OscfOver4 => w.spr().val_0x00(),
283-
SerialClockRate::OscfOver8 => w.spr().val_0x01(),
284-
SerialClockRate::OscfOver16 => w.spr().val_0x01(),
285-
SerialClockRate::OscfOver32 => w.spr().val_0x02(),
286-
SerialClockRate::OscfOver64 => w.spr().val_0x02(),
287-
SerialClockRate::OscfOver128 => w.spr().val_0x03(),
281+
SerialClockRate::OscfOver2 => w.spr().fosc_4_2(),
282+
SerialClockRate::OscfOver4 => w.spr().fosc_4_2(),
283+
SerialClockRate::OscfOver8 => w.spr().fosc_16_8(),
284+
SerialClockRate::OscfOver16 => w.spr().fosc_16_8(),
285+
SerialClockRate::OscfOver32 => w.spr().fosc_64_32(),
286+
SerialClockRate::OscfOver64 => w.spr().fosc_64_32(),
287+
SerialClockRate::OscfOver128 => w.spr().fosc_128_64(),
288288
}
289289
});
290290
// set up 2x clock rate status bit

0 commit comments

Comments
 (0)