@@ -1007,8 +1007,9 @@ where
1007
1007
}
1008
1008
1009
1009
/// Changes the buffer and restarts or continues a double buffer transfer. This must be called
1010
- /// immediately after a transfer complete event. Returns the old buffer together with its
1011
- /// `CurrentBuffer`. If an error occurs, this method will return the new buffer with the error.
1010
+ /// immediately after a transfer complete event if using double buffering, otherwise you might
1011
+ /// lose data. Returns the old buffer together with its `CurrentBuffer`. If an error occurs,
1012
+ /// this method will return the new buffer with the error.
1012
1013
///
1013
1014
/// This method will clear the transfer complete flag on entry, it will also clear it again if
1014
1015
/// an overrun occurs during its execution. Moreover, if an overrun occurs, the stream will be
@@ -1157,15 +1158,15 @@ where
1157
1158
}
1158
1159
1159
1160
/// Changes the buffer and restarts or continues a double buffer transfer. This must be called
1160
- /// immediately after a transfer complete event. The closure must return `(BUF, T)` where `BUF`
1161
- /// is the new buffer to be used. This method can be called before the end of an ongoing
1162
- /// transfer only if not using double buffering, in that case, the current transfer will be
1163
- /// canceled and a new one will be started. A `NotReady` error will be returned if this method
1164
- /// is called before the end of a transfer while double buffering and the closure won't be
1165
- /// executed.
1161
+ /// immediately after a transfer complete event if using double buffering, otherwise you might
1162
+ /// lose data. The closure must return `(BUF, T)` where `BUF` is the new buffer to be used. This
1163
+ /// method can be called before the end of an ongoing transfer only if not using double
1164
+ /// buffering, in that case, the current transfer will be canceled and a new one will be
1165
+ /// started. A `NotReady` error will be returned if this method is called before the end of a
1166
+ /// transfer while double buffering and the closure won't be executed.
1166
1167
///
1167
1168
/// # Panics
1168
- /// This method will panic when double buffering and one or both of the following conditions
1169
+ /// This method will panic when double buffering if one or both of the following conditions
1169
1170
/// happen:
1170
1171
///
1171
1172
/// * The new buffer's length is smaller than the one used in the `init` method.
@@ -1175,10 +1176,6 @@ where
1175
1176
///
1176
1177
/// Memory corruption might occur in the previous buffer, the one passed to the closure, if an
1177
1178
/// overrun occurs in double buffering mode.
1178
- ///
1179
- /// # Panics
1180
- ///
1181
- /// This method will panic if an overrun is detected while double buffering.
1182
1179
pub unsafe fn next_transfer_with < F , T > ( & mut self , f : F ) -> Result < T , DMAError < ( ) > >
1183
1180
where
1184
1181
F : FnOnce ( BUF , CurrentBuffer ) -> ( BUF , T ) ,
0 commit comments