Replaced Hertz by impl Into<Hertz> completely
This commit is contained in:
@ -114,12 +114,8 @@ fn main() -> ! {
|
||||
match SPI_BUS_SEL {
|
||||
SpiBusSelect::SpiAPortA | SpiBusSelect::SpiAPortB => {
|
||||
if let Some(ref mut spi) = *spia_ref.borrow_mut() {
|
||||
let transfer_cfg = TransferConfig::new_no_hw_cs(
|
||||
SPI_SPEED_KHZ.khz().into(),
|
||||
SPI_MODE,
|
||||
BLOCKMODE,
|
||||
false,
|
||||
);
|
||||
let transfer_cfg =
|
||||
TransferConfig::new_no_hw_cs(SPI_SPEED_KHZ.khz(), SPI_MODE, BLOCKMODE, false);
|
||||
spi.cfg_transfer(&transfer_cfg);
|
||||
}
|
||||
}
|
||||
@ -127,7 +123,7 @@ fn main() -> ! {
|
||||
if let Some(ref mut spi) = *spib_ref.borrow_mut() {
|
||||
let hw_cs_pin = pinsb.pb2.into_funsel_1();
|
||||
let transfer_cfg = TransferConfig::new(
|
||||
SPI_SPEED_KHZ.khz().into(),
|
||||
SPI_SPEED_KHZ.khz(),
|
||||
SPI_MODE,
|
||||
Some(hw_cs_pin),
|
||||
BLOCKMODE,
|
||||
|
@ -25,7 +25,7 @@ fn main() -> ! {
|
||||
(tx, rx),
|
||||
115200.bps(),
|
||||
&mut dp.SYSCONFIG,
|
||||
50.mhz().into(),
|
||||
50.mhz(),
|
||||
);
|
||||
let (mut tx, mut rx) = uartb.split();
|
||||
writeln!(tx, "Hello World\r").unwrap();
|
||||
|
Reference in New Issue
Block a user