Cargo fmt

This commit is contained in:
Joshua Salzedo 2021-09-27 10:49:32 -07:00
parent e36d4f460a
commit a26ffeb84b
No known key found for this signature in database
GPG key ID: C3D0EB484493B731
2 changed files with 4 additions and 6 deletions

View file

@ -1,9 +1,8 @@
use crate::pac::CRC as PAC_CRC;
use crate::peripherals::CRC;
use crate::rcc::sealed::RccPeripheral;
use embassy_hal_common::unborrow;
use embassy::util::Unborrow;
use embassy_hal_common::unborrow;
pub struct Crc {
_peripheral: CRC,
@ -11,7 +10,7 @@ pub struct Crc {
impl Crc {
/// Instantiates the CRC32 peripheral and initializes it to default values.
pub fn new(peripheral: impl Unborrow<Target= CRC>) -> Self {
pub fn new(peripheral: impl Unborrow<Target = CRC>) -> Self {
// Note: enable and reset come from RccPeripheral.
// enable CRC clock in RCC.
CRC::enable();
@ -50,5 +49,4 @@ impl Crc {
pub fn read(&self) -> u32 {
unsafe { PAC_CRC.dr().read() }
}
}

View file

@ -2,8 +2,8 @@ use crate::pac::crc::vals;
use crate::pac::CRC as PAC_CRC;
use crate::peripherals::CRC;
use crate::rcc::sealed::RccPeripheral;
use embassy_hal_common::unborrow;
use embassy::util::Unborrow;
use embassy_hal_common::unborrow;
pub struct Crc {
_peripheral: CRC,
@ -66,7 +66,7 @@ pub enum PolySize {
impl Crc {
/// Instantiates the CRC32 peripheral and initializes it to default values.
pub fn new(peripheral: impl Unborrow<Target= CRC>, config: Config) -> Self {
pub fn new(peripheral: impl Unborrow<Target = CRC>, config: Config) -> Self {
// Note: enable and reset come from RccPeripheral.
// enable CRC clock in RCC.
CRC::enable();