wokwi / avr8js

Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
https://blog.wokwi.com/avr8js-simulate-arduino-in-javascript/
MIT License
463 stars 73 forks source link

usart.ts code typo? #51

Closed yiivon closed 3 years ago

yiivon commented 3 years ago

src/peripherals/usart.ts line 103 if (ucsrb & UCSRA_TXC && ucsrb & UCSRB_TXCIE) { is ucsra & UCSRA_TXC ?

urish commented 3 years ago

So it seems!

How did you come across this issue?

yiivon commented 3 years ago

So it seems!

How did you come across this issue?

I am trying to implement the Rx part hardly and ..., so, you see

urish commented 3 years ago

The Rx part for AVR8js? as in issue #11 ?

yiivon commented 3 years ago

The Rx part for AVR8js? as in issue #11 ?

Yes

urish commented 3 years ago

That's great!

Would you be interested in sending a PR to fix this issue as well?

In addition to fixing the actual issue, a test case which would fail before the fix will be very helpful

yiivon commented 3 years ago

I am not very familiar with avr usart, fortunately I seem to have simply implemented the Rx part of it. However, I am not very sure whether this implementation will bring about other undesirable problems, hope helping and thank you. image image

urish commented 3 years ago

Got it, thanks for reporting!

What are you building?