Merge pull request #269 from 9names/fix_uart_example_clock

Use .freq() to avoid moving clock
This commit is contained in:
Jonathan Pallant 2022-01-28 15:03:23 +00:00 committed by GitHub
commit 5771f872f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ fn main() -> ! {
let mut uart = hal::uart::UartPeripheral::new(pac.UART0, uart_pins, &mut pac.RESETS)
.enable(
hal::uart::common_configs::_9600_8_N_1,
clocks.peripheral_clock.into(),
clocks.peripheral_clock.freq(),
)
.unwrap();