mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 12:20:37 +00:00
fix: transfer options
This commit is contained in:
parent
f0fc1a15da
commit
be88187591
@ -283,6 +283,9 @@ impl AnyChannel {
|
|||||||
state.lli_state.transfer_count.store(0, Ordering::Relaxed)
|
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>(
|
unsafe fn configure_linked_list<const ITEM_COUNT: usize>(
|
||||||
&self,
|
&self,
|
||||||
table: &Table<ITEM_COUNT>,
|
table: &Table<ITEM_COUNT>,
|
||||||
|
@ -69,6 +69,8 @@ pub struct ReadableRingBuffer<'a, W: Word> {
|
|||||||
|
|
||||||
impl<'a, W: Word> ReadableRingBuffer<'a, W> {
|
impl<'a, W: Word> ReadableRingBuffer<'a, W> {
|
||||||
/// Create a new ring buffer.
|
/// Create a new ring buffer.
|
||||||
|
///
|
||||||
|
/// Transfer options are applied to the individual linked list items.
|
||||||
pub unsafe fn new(
|
pub unsafe fn new(
|
||||||
channel: impl Peripheral<P = impl Channel> + 'a,
|
channel: impl Peripheral<P = impl Channel> + 'a,
|
||||||
request: Request,
|
request: Request,
|
||||||
@ -220,6 +222,8 @@ pub struct WritableRingBuffer<'a, W: Word> {
|
|||||||
|
|
||||||
impl<'a, W: Word> WritableRingBuffer<'a, W> {
|
impl<'a, W: Word> WritableRingBuffer<'a, W> {
|
||||||
/// Create a new ring buffer.
|
/// Create a new ring buffer.
|
||||||
|
///
|
||||||
|
/// Transfer options are applied to the individual linked list items.
|
||||||
pub unsafe fn new(
|
pub unsafe fn new(
|
||||||
channel: impl Peripheral<P = impl Channel> + 'a,
|
channel: impl Peripheral<P = impl Channel> + 'a,
|
||||||
request: Request,
|
request: Request,
|
||||||
@ -279,7 +283,7 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> {
|
|||||||
self.channel.configure_linked_list(
|
self.channel.configure_linked_list(
|
||||||
&self.table,
|
&self.table,
|
||||||
TransferOptions {
|
TransferOptions {
|
||||||
half_transfer_ir: true,
|
half_transfer_ir: false,
|
||||||
complete_transfer_ir: true,
|
complete_transfer_ir: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user