Documentation ¶
Overview ¶
package tinyterm is for TinyGo developers who want to use a terminal style user interface for any display that supports the Displayer interface. This includes several different displays in the TinyGo Drivers repo.
Index ¶
Constants ¶
const ( SGRReset = iota SGRBold SGRFaint SGRItalic SGRUnderline SGRSlowBlink SGRRapidBlink SGRReverseVideo SGRConceal SGRCrossedOut SGRPrimaryFont SGRAltFont1 SGRAltFont2 SGRAltFont3 SGRAltFont4 SGRAltFont5 SGRAltFont6 SGRAltFont7 SGRAltFont8 SGRAltFont9 SGRFraktur SGRDoubleUnderline SGRNormal SGRNotItalicNotFraktur SGRUnderlineOff SGRBlinkOff SGRInverseOff SGRReveal SGRNotCrossedOut SGRFgBlack SGRFgRed SGRFgGreen SGRFgYellow SGRFgBlue SGRFgMagenta SGRFgCyan SGRFgWhite SGRSetFgColor SGRDefaultFgColor SGRBgBlack SGRBgRed SGRBgGreen SGRBgYellow SGRBgBlue SGRBgMagenta SGRBgCyan SGRBgWhite SGRSetBgColor SGRDefaultBgColor SGRFramed SGREncircled SGROverlined SGRIdeogramUnderline SGRIdeogramDblUnderline SGRIdeogramOverline SGRIdeogramStress SGRIdeogramAttrOff )
const Version = "0.3.0"
Version returns a user-readable string showing the version of the TinyTerm package for support purposes.
Update this value before release of new version of software.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // the font to be used for the terminal Font *tinyfont.Font // font height for the terminal FontHeight int16 // font offset for the terminal FontOffset int16 // UseSoftwareScroll when true will blank the display an start again at // the top when running out of space, instead of using whatever hardware // scrolling is available on the display. UseSoftwareScroll bool }
Config contains the configuration for a Terminal.
type Displayer ¶
type Displayer interface { drivers.Displayer FillRectangle(x, y, width, height int16, c color.RGBA) error SetScroll(line int16) }
Displayer is a wrapper around the TinyGo drivers repo's Displayer interface.
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal is a terminal interface that can be used on any display that supports the Displayer interface.
func NewTerminal ¶
NewTerminal returns a new Terminal. The Terminal will need to have Configure called on it to be used.
func (*Terminal) Printf ¶
Printf wraps the fmt package function of the same name, and outputs the result to the terminal.
func (*Terminal) Println ¶
Println wraps the fmt package function of the same name, and outputs the result to the terminal.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
httpclient
This example opens a TCP connection using a device with WiFiNINA firmware and sends a HTTP request to retrieve a webpage, based on the following Arduino example:
|
This example opens a TCP connection using a device with WiFiNINA firmware and sends a HTTP request to retrieve a webpage, based on the following Arduino example: |
fonts
|
|