Cargo fmt
This commit is contained in:
parent
e36d4f460a
commit
a26ffeb84b
2 changed files with 4 additions and 6 deletions
|
@ -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() }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue