-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join Serial for USART and UART again. Make inner traits with different implementation for USART and UART. #636
Conversation
Serial
for USART and UART again. Make inner traits with different implementation for USART and UART.
Serial
for USART and UART again. Make inner traits with different implementation for USART and UART.4c6b118
to
17b3b46
Compare
stm32f4 has several issues with uart. |
…ferent implementation for USART and UART.
17b3b46
to
7e90edf
Compare
You plan release new version of |
I don't have access. Only @adamgreig can do this. |
pub trait RegisterBlockImpl: crate::Sealed {
}
impl crate::Sealed for RegisterBlockUart { } |
6063be0
to
574d47a
Compare
bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
cc #630
@burrbull
Main idea
Note that
RegisterBlockImpl
not exports fromstm32f4xx-hal
.Changes in public API
type RegisterBlock;
toInstance
uart::{Serial, Rx, Tx}
RxListen
,TxListen
,Listen
traitsSerial.split
andSerial.release
trait bounds toUART: CommonPins
Rx.join
andTx.join
trait bounds toUART: CommonPins
Questions
PeriAddress
andDMASet
implemented forRx<UART, u8>
, notRx<UART, WORD>
? And Tx too.P.S.
I have tried use
#![feature(specialization)]
and#![feature(min_specialization)]
and failed miserably.The
min_specialization
not does not cover this case, thespecialization
cause ICE.Besides I think that current specialization RFC not suitable for our case at all, because we have
impl InstanceUsart
andimpl InstanceUart
with the same "specialization", but not trait bounds inheritance.