Rearrange functions into the sequence normal of use
@@ -86,16 +86,16 @@ where
Twim(twim)
}
- /// Re-enable the instance after it was previously disabled.
- pub fn enable(&mut self) {
- self.0.enable.write(|w| w.enable().enabled());
- }
-
/// Disable the instance.
pub fn disable(&mut self) {
self.0.enable.write(|w| w.enable().disabled());
}
+ /// Re-enable the instance after it was previously disabled.
+ pub fn enable(&mut self) {
+ self.0.enable.write(|w| w.enable().enabled());
+ }
+
/// Set TX buffer, checking that it is in RAM and has suitable length.
unsafe fn set_tx_buffer(&mut self, buffer: &[u8]) -> Result<(), Error> {
slice_in_ram_or(buffer, Error::DMABufferNotInDataMemory)?;
