forked from billroy/bitlash
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Stream and Print classes for input and output
Instead of keeping pin numbers and output handler functions and deciding on the fly where to send any printed bytes, now a Print* is kept, greatly simplifying sbp() and friends. Additionally, output can now also be redirected to an arbitrary Print object by calling setOutputHandler. Similarly, for the input a Stream* is kept. This allows users of the library to select any of the available serial port or any other Stream object to use as the main console. This allows for example to use an Ethernet client, without needing the bitlash library to understand every particular ethernet library available (as long as it implements the Stream interface).
- Loading branch information
1 parent
20b4752
commit e91dd2a
Showing
5 changed files
with
104 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters