Let repeated clock byte be singular pointer and not array pointer
This commit is contained in:
parent
e9a2c4a9e3
commit
47a0769fc2
@ -78,7 +78,7 @@ foreach_dma_channel! {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn start_write_repeated<W: Word>(&mut self, _request: Request, repeated: *const [W], count: usize, reg_addr: *mut W, options: TransferOptions) {
|
unsafe fn start_write_repeated<W: Word>(&mut self, _request: Request, repeated: *const W, count: usize, reg_addr: *mut W, options: TransferOptions) {
|
||||||
low_level_api::start_transfer(
|
low_level_api::start_transfer(
|
||||||
pac::$dma_peri,
|
pac::$dma_peri,
|
||||||
$channel_num,
|
$channel_num,
|
||||||
|
@ -102,7 +102,7 @@ foreach_dma_channel! {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn start_write_repeated<W: Word>(&mut self, request: Request, repeated: *const [W], count: usize, reg_addr: *mut W, options: TransferOptions) {
|
unsafe fn start_write_repeated<W: Word>(&mut self, request: Request, repeated: *const W, count: usize, reg_addr: *mut W, options: TransferOptions) {
|
||||||
low_level_api::start_transfer(
|
low_level_api::start_transfer(
|
||||||
pac::$dma_peri,
|
pac::$dma_peri,
|
||||||
$channel_num,
|
$channel_num,
|
||||||
|
@ -75,7 +75,7 @@ foreach_dma_channel! {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn start_write_repeated<W: Word>(&mut self, request: Request, repeated: *const [W], count: usize, reg_addr: *mut W, options: TransferOptions) {
|
unsafe fn start_write_repeated<W: Word>(&mut self, request: Request, repeated: *const W, count: usize, reg_addr: *mut W, options: TransferOptions) {
|
||||||
low_level_api::start_transfer(
|
low_level_api::start_transfer(
|
||||||
pac::$dma_peri,
|
pac::$dma_peri,
|
||||||
$channel_num,
|
$channel_num,
|
||||||
|
@ -59,7 +59,7 @@ pub(crate) mod sealed {
|
|||||||
unsafe fn start_write_repeated<W: super::Word>(
|
unsafe fn start_write_repeated<W: super::Word>(
|
||||||
&mut self,
|
&mut self,
|
||||||
request: Request,
|
request: Request,
|
||||||
repeated: *const [W],
|
repeated: *const W,
|
||||||
count: usize,
|
count: usize,
|
||||||
reg_addr: *mut W,
|
reg_addr: *mut W,
|
||||||
options: TransferOptions,
|
options: TransferOptions,
|
||||||
@ -246,7 +246,7 @@ mod transfers {
|
|||||||
pub fn write_repeated<'a, W: Word>(
|
pub fn write_repeated<'a, W: Word>(
|
||||||
channel: impl Peripheral<P = impl Channel> + 'a,
|
channel: impl Peripheral<P = impl Channel> + 'a,
|
||||||
request: Request,
|
request: Request,
|
||||||
repeated: *const [W],
|
repeated: *const W,
|
||||||
count: usize,
|
count: usize,
|
||||||
reg_addr: *mut W,
|
reg_addr: *mut W,
|
||||||
) -> impl Future<Output = ()> + 'a {
|
) -> impl Future<Output = ()> + 'a {
|
||||||
|
@ -466,7 +466,7 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> {
|
|||||||
|
|
||||||
let tx_request = self.txdma.request();
|
let tx_request = self.txdma.request();
|
||||||
let tx_dst = T::REGS.tx_ptr();
|
let tx_dst = T::REGS.tx_ptr();
|
||||||
let clock_byte = [0x00u8];
|
let clock_byte = 0x00u8;
|
||||||
let tx_f = crate::dma::write_repeated(&mut self.txdma, tx_request, &clock_byte, clock_byte_count, tx_dst);
|
let tx_f = crate::dma::write_repeated(&mut self.txdma, tx_request, &clock_byte, clock_byte_count, tx_dst);
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
Loading…
Reference in New Issue
Block a user