sajattack / bitbang-hal

Implements embedded-hal traits by bitbanging
MIT License
40 stars 10 forks source link

Fix Serial Write #23

Open Javier-varez opened 3 years ago

Javier-varez commented 3 years ago

In order to guarantee the width of the start bit in a serial transfer we need ot make sure that we are waiting for the correct amount of time. Since the timer is already started we have no guarantee of the current count value and therefore should add an initial wait.

sajattack commented 3 years ago

I would rather take the solution in #10 but it needs to be updated to support embedded-time. Would you be able to take that on?

Javier-varez commented 3 years ago

I fully agree, that would be a much better solution. I'll give it a go!

Javier-varez commented 3 years ago

I'm not quite sure I understand the strategy to use the embedded time crate. As far as I have seen no timer hardware abstraction layers currently use the types and traits defined there, so the serial port will not work with them?

sajattack commented 3 years ago

I was under the impression there was better adoption.