Conversation
| lto = true | ||
| opt-level = "s" | ||
|
|
||
| [patch.crates-io] |
There was a problem hiding this comment.
This is a hack and should be reverted
| nrf52832-hal = { version = "0.11", features = ["rt"], optional = true } | ||
| nrf52840-hal = { version = "0.11", features = ["rt"], optional = true } | ||
|
|
||
| nrf-hal-common = { version = "0.11", features = ["bbq-uarte"] } |
There was a problem hiding this comment.
TODO: I need to plumb this feature to the hals
| @@ -0,0 +1,7 @@ | |||
| target remote :2331 | |||
There was a problem hiding this comment.
This file should be deleted
| let (rxd_prod, rxd_cons) = self.rxd_buf.try_split().map_err(|e| Error::Bbqueue(e))?; | ||
|
|
||
| // hmmm | ||
| let hw_timer = match Timer::INTERRUPT { |
There was a problem hiding this comment.
I should probably add a better way to do this
| OutgoingLen: ArrayLength<u8>, | ||
| IncomingLen: ArrayLength<u8>, | ||
| { | ||
| pub fn try_split<Timer: TimerInstance, Channel: Ppi + ConfigurablePpi, Uarte: UarteInstance>( |
There was a problem hiding this comment.
This is a pretty gross API
| @@ -0,0 +1,132 @@ | |||
| #![no_std] | |||
There was a problem hiding this comment.
TODO: Document this is for the DWM1001-DEV
| // This is overly restrictive. See (similar SPIM issue): | ||
| // https://github.com/nrf-rs/nrf52/issues/17 | ||
| if rx_buffer.len() > u8::max_value() as usize { | ||
| return Err(Error::TxBufferTooLong); |
There was a problem hiding this comment.
This error was wrong. I did fix it below.
|
|
||
| pub trait Instance: Deref<Target = uarte0::RegisterBlock> {} | ||
| pub trait Instance: Deref<Target = uarte0::RegisterBlock> { | ||
| #[cfg(feature = "bbq-uarte")] |
There was a problem hiding this comment.
I put this behind a flag because it's technically a breaking change I guess? I could be convinced it isn't though
|
|
||
| /// Stop an unfinished UART read transaction and flush FIFO to DMA buffer | ||
| pub(crate) fn uarte_cancel_read<T: Instance>(uarte: &T) { | ||
| uarte.events_rxto.write(|w| w); |
There was a problem hiding this comment.
TODO: I added this line, but I don't know why. I need to re-read the datasheet and make sure I wasn't just debugging something odd.
| if error { | ||
| self.uarte.events_error.write(|w| w); | ||
| } | ||
| if rxdrdy { |
There was a problem hiding this comment.
The RX FIFO is only flushed if !endrx, but the rxrdy will still be cleared if set.
If e.g. more than block_size but less than 2*block_size is received, rxdrdy will be cleared and therefore will not be flushed on the following timeout
No description provided.