Skip to content

Commit

Permalink
Add eh1 impls for LPSPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Florob committed Jun 8, 2024
1 parent 95dbb97 commit 0d5cf38
Show file tree
Hide file tree
Showing 2 changed files with 326 additions and 46 deletions.
6 changes: 6 additions & 0 deletions src/chip/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ impl<P, const N: u8> lpuart::Lpuart<P, N> {
// LPSPI
use crate::lpspi;

impl<P, const N: u8> lpspi::Lpspi<P, N> {
pub(crate) fn wait_for_transmit_fifo_space(&self) -> Result<(), lpspi::LpspiError> {
crate::spin_on(self.spin_for_fifo_space())
}
}

unsafe impl<P, const N: u8> peripheral::Source<u32> for lpspi::Lpspi<P, N> {
fn source_signal(&self) -> u32 {
LPSPI_DMA_RX_MAPPING[N as usize - 1]
Expand Down
Loading

0 comments on commit 0d5cf38

Please sign in to comment.