Replaced Hertz by impl Into<Hertz> completely
Some checks are pending
Rust/va108xx-hal/pipeline/head This commit looks good
Rust/va108xx-hal/pipeline/pr-main Build started...

This commit is contained in:
2021-12-09 23:19:21 +01:00
parent 5f6914a93a
commit 659b7e8f27
7 changed files with 27 additions and 22 deletions

View File

@ -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,

View File

@ -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();