mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
Add no scroll option for terminal
This commit is contained in:
parent
e3f61b0e6e
commit
b1c2dc4b3c
@ -147,6 +147,7 @@ This is a partial list of definitions that can be added in a `BOARD.py` file's `
|
||||
* `ESPR_GRAPHICS_SELF_INIT` - Should the Graphics library instantiate itself with its own `g` instance?
|
||||
* `ESPR_LCD_MANUAL_BACKLIGHT` - STM32/FSMC: Don't turn the backlight on and leave code to do this manually
|
||||
* `ESPR_DISABLE_KICKWATCHDOG_PIN=BTN1_PININDEX` - If this pin is 1, skip kickWatchdog calls (which would eventually force a reboot if WDT enabled)
|
||||
* `ESPR_TERMNINAL_NO_SCROLL` - disable scrolling in the onscreen terminal (once we get to the end, we just clear the screen and start at the top)
|
||||
|
||||
|
||||
There are some specifically that are useful for cutting a few bytes out of the build:
|
||||
|
||||
@ -105,7 +105,12 @@ void terminalScroll() {
|
||||
#else
|
||||
gfx.data.bgColor = 0;
|
||||
#endif
|
||||
#ifdef ESPR_TERMNINAL_NO_SCROLL
|
||||
terminalY = 0;
|
||||
graphicsClear(&gfx);
|
||||
#else
|
||||
graphicsScroll(&gfx, 0, -TERMINAL_CHAR_H); // always fill background in black
|
||||
#endif
|
||||
gfx.data.bgColor = cb;
|
||||
terminalSetGFX(&gfx); // save
|
||||
// if we're not in an IRQ, flip this now
|
||||
@ -205,7 +210,11 @@ void terminalSendChar(char chn) {
|
||||
void jswrap_terminal_init() {
|
||||
terminalControlCharsReset();
|
||||
terminalX = 0;
|
||||
#ifdef ESPR_TERMNINAL_NO_SCROLL
|
||||
terminalY = 0;
|
||||
#else
|
||||
terminalY = (unsigned char)(TERMINAL_HEIGHT-1);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*JSON{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user