Merge #1422
1422: rp: remove leftovers from #1414 r=Dirbaio a=pennae forgot to remove these when they were no longer necessary or useful. oops. Co-authored-by: pennae <github@quasiparticle.net>
This commit is contained in:
commit
5f99ccf54c
2 changed files with 3 additions and 9 deletions
|
@ -874,7 +874,6 @@ mod sealed {
|
||||||
pub trait Instance {
|
pub trait Instance {
|
||||||
const TX_DREQ: u8;
|
const TX_DREQ: u8;
|
||||||
const RX_DREQ: u8;
|
const RX_DREQ: u8;
|
||||||
const ID: usize;
|
|
||||||
|
|
||||||
type Interrupt: crate::interrupt::Interrupt;
|
type Interrupt: crate::interrupt::Interrupt;
|
||||||
|
|
||||||
|
@ -909,11 +908,10 @@ impl_mode!(Async);
|
||||||
pub trait Instance: sealed::Instance {}
|
pub trait Instance: sealed::Instance {}
|
||||||
|
|
||||||
macro_rules! impl_instance {
|
macro_rules! impl_instance {
|
||||||
($inst:ident, $irq:ident, $id:expr, $tx_dreq:expr, $rx_dreq:expr) => {
|
($inst:ident, $irq:ident, $tx_dreq:expr, $rx_dreq:expr) => {
|
||||||
impl sealed::Instance for peripherals::$inst {
|
impl sealed::Instance for peripherals::$inst {
|
||||||
const TX_DREQ: u8 = $tx_dreq;
|
const TX_DREQ: u8 = $tx_dreq;
|
||||||
const RX_DREQ: u8 = $rx_dreq;
|
const RX_DREQ: u8 = $rx_dreq;
|
||||||
const ID: usize = $id;
|
|
||||||
|
|
||||||
type Interrupt = crate::interrupt::$irq;
|
type Interrupt = crate::interrupt::$irq;
|
||||||
|
|
||||||
|
@ -939,8 +937,8 @@ macro_rules! impl_instance {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_instance!(UART0, UART0_IRQ, 0, 20, 21);
|
impl_instance!(UART0, UART0_IRQ, 20, 21);
|
||||||
impl_instance!(UART1, UART1_IRQ, 1, 22, 23);
|
impl_instance!(UART1, UART1_IRQ, 22, 23);
|
||||||
|
|
||||||
pub trait TxPin<T: Instance>: sealed::TxPin<T> + crate::gpio::Pin {}
|
pub trait TxPin<T: Instance>: sealed::TxPin<T> + crate::gpio::Pin {}
|
||||||
pub trait RxPin<T: Instance>: sealed::RxPin<T> + crate::gpio::Pin {}
|
pub trait RxPin<T: Instance>: sealed::RxPin<T> + crate::gpio::Pin {}
|
||||||
|
|
|
@ -53,10 +53,6 @@ async fn main(_spawner: Spawner) {
|
||||||
let (mut tx, mut rx, mut uart) = (p.PIN_0, p.PIN_1, p.UART0);
|
let (mut tx, mut rx, mut uart) = (p.PIN_0, p.PIN_1, p.UART0);
|
||||||
let mut irq = interrupt::take!(UART0_IRQ);
|
let mut irq = interrupt::take!(UART0_IRQ);
|
||||||
|
|
||||||
// TODO
|
|
||||||
// nuclear error reporting. just abort the entire transfer and invalidate the
|
|
||||||
// dma buffer, buffered buffer, fifo etc.
|
|
||||||
|
|
||||||
// We can't send too many bytes, they have to fit in the FIFO.
|
// We can't send too many bytes, they have to fit in the FIFO.
|
||||||
// This is because we aren't sending+receiving at the same time.
|
// This is because we aren't sending+receiving at the same time.
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue