Loading device/terminal/fx9860/text_display.c +8 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,9 @@ const struct text_display fx9860_text_display = { .flush = &fx9860_tdisp_flush, .set_cursor_pos = &fx9860_tdisp_set_cursor_pos, .set_cursor = &fx9860_tdisp_set_cursor .set_cursor = &fx9860_tdisp_set_cursor, .clear = &fx9860_tdisp_clear }; Loading Loading @@ -115,3 +117,8 @@ void fx9860_tdisp_set_cursor_pos(struct tdisp_data *disp, size_t posx, void fx9860_tdisp_set_cursor(struct tdisp_data *disp, enum text_cursor curs) { disp->cursor = curs; } void fx9860_tdisp_clear(struct tdisp_data *disp) { memset(disp->vram, disp->back ? 0xFF : 0x00, 1024); } device/terminal/fx9860/text_display.h +1 −0 Original line number Diff line number Diff line Loading @@ -37,5 +37,6 @@ void fx9860_tdisp_set_cursor_pos(struct tdisp_data *disp, size_t posx, void fx9860_tdisp_set_cursor(struct tdisp_data *disp, enum text_cursor curs); void fx9860_tdisp_clear(struct tdisp_data *disp); #endif //_DEVICE_TERMINAL_FX9860_TEXT_DISPLAY_H device/terminal/text_display.h +8 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,14 @@ struct text_display { * Set cursor type, if supported. */ void (*set_cursor)(struct tdisp_data *disp, enum text_cursor curs); /** * Clear the whole screen (using the current background color). * TODO should be more generic, to allow erasing of a given part * of the screen. */ void (*clear)(struct tdisp_data *disp); }; Loading device/terminal/virtual_term.c +11 −2 Original line number Diff line number Diff line Loading @@ -304,7 +304,15 @@ static int vt_parse_escape_code(struct vt_instance *term, char str_char) { break; case 'J': // TODO Erase the screen down to the bottom from the current line. If an argument is given and == 1, erase up to the top instead. // If an argument is given and == 2, clear the whole screen with the background color and go to cursor home. if(term->esc_state.arguments_index >= 0 && term->esc_state.arguments[0] == 2) { // If an argument is given and == 2, clear the whole screen with the // background color and go to cursor home. _tdisp->clear(& term->disp); vt_move_cursor(term, 0, 0); vt_delay_flush(); } break; case 'p': // TODO Bind a string to a keyboard key Loading Loading @@ -348,7 +356,6 @@ static void vt_read_escape_code(struct vt_instance *term, char str_char) { term->esc_state.arguments_index++; // check if there are too much arguments for our simple parser if(term->esc_state.arguments_index == VT100_MAX_INTARGS) { vt_clear_escape_code(term); newstate = VT100_STATE_NONE; } } else { Loading @@ -368,6 +375,8 @@ static void vt_read_escape_code(struct vt_instance *term, char str_char) { break; } if(newstate == VT100_STATE_NONE) vt_clear_escape_code(term); term->esc_state.discovery_state = newstate; } Loading Loading
device/terminal/fx9860/text_display.c +8 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,9 @@ const struct text_display fx9860_text_display = { .flush = &fx9860_tdisp_flush, .set_cursor_pos = &fx9860_tdisp_set_cursor_pos, .set_cursor = &fx9860_tdisp_set_cursor .set_cursor = &fx9860_tdisp_set_cursor, .clear = &fx9860_tdisp_clear }; Loading Loading @@ -115,3 +117,8 @@ void fx9860_tdisp_set_cursor_pos(struct tdisp_data *disp, size_t posx, void fx9860_tdisp_set_cursor(struct tdisp_data *disp, enum text_cursor curs) { disp->cursor = curs; } void fx9860_tdisp_clear(struct tdisp_data *disp) { memset(disp->vram, disp->back ? 0xFF : 0x00, 1024); }
device/terminal/fx9860/text_display.h +1 −0 Original line number Diff line number Diff line Loading @@ -37,5 +37,6 @@ void fx9860_tdisp_set_cursor_pos(struct tdisp_data *disp, size_t posx, void fx9860_tdisp_set_cursor(struct tdisp_data *disp, enum text_cursor curs); void fx9860_tdisp_clear(struct tdisp_data *disp); #endif //_DEVICE_TERMINAL_FX9860_TEXT_DISPLAY_H
device/terminal/text_display.h +8 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,14 @@ struct text_display { * Set cursor type, if supported. */ void (*set_cursor)(struct tdisp_data *disp, enum text_cursor curs); /** * Clear the whole screen (using the current background color). * TODO should be more generic, to allow erasing of a given part * of the screen. */ void (*clear)(struct tdisp_data *disp); }; Loading
device/terminal/virtual_term.c +11 −2 Original line number Diff line number Diff line Loading @@ -304,7 +304,15 @@ static int vt_parse_escape_code(struct vt_instance *term, char str_char) { break; case 'J': // TODO Erase the screen down to the bottom from the current line. If an argument is given and == 1, erase up to the top instead. // If an argument is given and == 2, clear the whole screen with the background color and go to cursor home. if(term->esc_state.arguments_index >= 0 && term->esc_state.arguments[0] == 2) { // If an argument is given and == 2, clear the whole screen with the // background color and go to cursor home. _tdisp->clear(& term->disp); vt_move_cursor(term, 0, 0); vt_delay_flush(); } break; case 'p': // TODO Bind a string to a keyboard key Loading Loading @@ -348,7 +356,6 @@ static void vt_read_escape_code(struct vt_instance *term, char str_char) { term->esc_state.arguments_index++; // check if there are too much arguments for our simple parser if(term->esc_state.arguments_index == VT100_MAX_INTARGS) { vt_clear_escape_code(term); newstate = VT100_STATE_NONE; } } else { Loading @@ -368,6 +375,8 @@ static void vt_read_escape_code(struct vt_instance *term, char str_char) { break; } if(newstate == VT100_STATE_NONE) vt_clear_escape_code(term); term->esc_state.discovery_state = newstate; } Loading