Skip to content

Report UART status as events; addl UART events#129

Open
flaviut wants to merge 1 commit into
wokwi:mainfrom
flaviut:uart-events
Open

Report UART status as events; addl UART events#129
flaviut wants to merge 1 commit into
wokwi:mainfrom
flaviut:uart-events

Conversation

@flaviut

@flaviut flaviut commented Jun 26, 2023

Copy link
Copy Markdown

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.

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.
@flaviut

flaviut commented Jun 26, 2023

Copy link
Copy Markdown
Author

I guess this is really two proposals in one?

  • Using EventEmitter for callbacks, rather than a manually-assigned field
  • Adding additional event listeners to the UART

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant