fix: transfer options

This commit is contained in:
elagil 2025-08-25 21:10:59 +02:00 committed by Dario Nieuwenhuis
parent f0fc1a15da
commit be88187591
2 changed files with 8 additions and 1 deletions

View File

@ -283,6 +283,9 @@ impl AnyChannel {
state.lli_state.transfer_count.store(0, Ordering::Relaxed)
}
/// Configure a linked-list transfer.
///
/// Transfer options apply only to the base register transfer, not the linked-list items.
unsafe fn configure_linked_list<const ITEM_COUNT: usize>(
&self,
table: &Table<ITEM_COUNT>,

View File

@ -69,6 +69,8 @@ pub struct ReadableRingBuffer<'a, W: Word> {
impl<'a, W: Word> ReadableRingBuffer<'a, W> {
/// Create a new ring buffer.
///
/// Transfer options are applied to the individual linked list items.
pub unsafe fn new(
channel: impl Peripheral<P = impl Channel> + 'a,
request: Request,
@ -220,6 +222,8 @@ pub struct WritableRingBuffer<'a, W: Word> {
impl<'a, W: Word> WritableRingBuffer<'a, W> {
/// Create a new ring buffer.
///
/// Transfer options are applied to the individual linked list items.
pub unsafe fn new(
channel: impl Peripheral<P = impl Channel> + 'a,
request: Request,
@ -279,7 +283,7 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> {
self.channel.configure_linked_list(
&self.table,
TransferOptions {
half_transfer_ir: true,
half_transfer_ir: false,
complete_transfer_ir: true,
..Default::default()
},