wokwi / rp2040js

A Raspberry Pi Pico Emulator in JavaScript
MIT License
384 stars 40 forks source link

Report UART status as events; addl UART events #129

Open flaviut opened 1 year ago

flaviut commented 1 year ago

This is more flexible & allows for multiple listeners.

The new events allow the user to push data to the UART without a ton of trouble & setTimeouts.

This does introduce a new dependency, eventemitter3. This is not really needed for Node, but it is needed on the browser since the browser's events implementation is different than in Node.

flaviut commented 1 year ago

I guess this is really two proposals in one?

I'd be interested to hear what you think of them, and if you think this is a good direction to go in at all.