File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 8686 Twim ( twim)
8787 }
8888
89+ /// Disable the instance.
90+ ///
91+ /// Disabling the instance will switch off the peripheral leading to a
92+ /// considerably lower energy use. However, while the instance is disabled
93+ /// it is not possible to use it for communication. The configuration of
94+ /// the instance will be retained.
95+ pub fn disable ( & mut self ) {
96+ self . 0 . enable . write ( |w| w. enable ( ) . disabled ( ) ) ;
97+ }
98+
99+ /// Re-enable the instance after it was previously disabled.
100+ pub fn enable ( & mut self ) {
101+ self . 0 . enable . write ( |w| w. enable ( ) . enabled ( ) ) ;
102+ }
103+
89104 /// Set TX buffer, checking that it is in RAM and has suitable length.
90105 unsafe fn set_tx_buffer ( & mut self , buffer : & [ u8 ] ) -> Result < ( ) , Error > {
91106 slice_in_ram_or ( buffer, Error :: DMABufferNotInDataMemory ) ?;
You can’t perform that action at this time.
0 commit comments