Fix variable names in crc_v2/v3.

removed `reclaim` in crc_v1.
used write instead of modify.
renamed `init` to `reset` in crc_v1.
This commit is contained in:
Joshua Salzedo
2021-09-27 10:46:09 -07:00
parent 43ad28b9f9
commit e36d4f460a
2 changed files with 15 additions and 21 deletions

View File

@ -22,12 +22,12 @@ impl Crc {
let mut instance = Self {
_peripheral: peripheral,
};
instance.init();
instance.reset();
instance
}
/// Resets the CRC unit to default value (0xFFFF_FFFF)
pub fn init(&mut self) {
pub fn reset(&mut self) {
unsafe { PAC_CRC.cr().write(|w| w.set_reset(true)) };
}
@ -51,10 +51,4 @@ impl Crc {
unsafe { PAC_CRC.dr().read() }
}
/// Reclaims the CRC peripheral.
pub fn release(self) -> CRC {
CRC::disable();
self._peripheral
}
}