Skip to content

Commit 74e7dae

Browse files
Rename DVIterm1 class to DVItext1, because "term" Implies a Lot
1 parent 1acf442 commit 74e7dae

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/PicoDVI.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,18 @@ void DVIGFX1::swap(bool copy_framebuffer) {
290290
#define FONT_FIRST_ASCII 0
291291
#include "font_8x8.h"
292292

293-
DVIterm1::DVIterm1(const DVIresolution r, const struct dvi_serialiser_cfg &c,
293+
DVItext1::DVItext1(const DVIresolution r, const struct dvi_serialiser_cfg &c,
294294
vreg_voltage v)
295295
: PicoDVI(dvispec[r].timing, c, v),
296296
GFXcanvas16(dvispec[r].width / 8, dvispec[r].height / 8) {
297297
dvi_vertical_repeat = dvispec[r].v_rep;
298298
dvi_monochrome_tmds = true;
299299
}
300300

301-
DVIterm1::~DVIterm1(void) { gfxptr = NULL; }
301+
DVItext1::~DVItext1(void) { gfxptr = NULL; }
302302

303303
// Character framebuffer is actually a small GFXcanvas16, so...
304-
size_t DVIterm1::write(uint8_t c) {
304+
size_t DVItext1::write(uint8_t c) {
305305
if (c == '\r') { // Carriage return
306306
cursor_x = 0;
307307
} else if ((c == '\n') || (cursor_x >= WIDTH)) { // Newline OR right edge
@@ -326,7 +326,7 @@ static uint8_t scanbuf[1280 / 8] __attribute__((aligned(4)));
326326

327327
#ifdef TERM_USE_INTERRUPT
328328

329-
void inline __not_in_flash_func(DVIterm1::_prepare_scanline)(uint16_t y) {
329+
void inline __not_in_flash_func(DVItext1::_prepare_scanline)(uint16_t y) {
330330
uint16_t *row = getBuffer() + (y / FONT_CHAR_HEIGHT) * WIDTH;
331331
uint32_t offset = (y & 7) * FONT_N_CHARS;
332332

@@ -342,13 +342,13 @@ void inline __not_in_flash_func(DVIterm1::_prepare_scanline)(uint16_t y) {
342342
queue_add_blocking_u32(&dvi0.q_tmds_valid, &tmdsbuf);
343343
}
344344

345-
void __not_in_flash_func(term1_scanline_callback)(void) {
345+
void __not_in_flash_func(text1_scanline_callback)(void) {
346346
static uint y = 1;
347-
((DVIterm1 *)gfxptr)->_prepare_scanline(y);
348-
y = (y + 1) % (((DVIterm1 *)gfxptr)->height() * 8);
347+
((DVItext1 *)gfxptr)->_prepare_scanline(y);
348+
y = (y + 1) % (((DVItext1 *)gfxptr)->height() * 8);
349349
}
350350

351-
static void mainloopterm1(struct dvi_inst *inst) {
351+
static void mainlooptext1(struct dvi_inst *inst) {
352352
// Idle func, everything happens in interrupt
353353
for (;;)
354354
delay(1000);
@@ -360,11 +360,11 @@ static void mainloopterm1(struct dvi_inst *inst) {
360360
// This is a little simpler and might stick with it
361361
// since nothing important to do in idle func above.
362362

363-
static void mainloopterm1(struct dvi_inst *inst) {
364-
((DVIterm1 *)gfxptr)->_mainloop();
363+
static void mainlooptext1(struct dvi_inst *inst) {
364+
((DVItext1 *)gfxptr)->_mainloop();
365365
}
366366

367-
void __not_in_flash_func(DVIterm1::_mainloop)(void) {
367+
void __not_in_flash_func(DVItext1::_mainloop)(void) {
368368
for (;;) {
369369
for (uint16_t y = 0; y < HEIGHT; y++) {
370370
uint16_t *row = getBuffer() + y * WIDTH;
@@ -386,14 +386,14 @@ void __not_in_flash_func(DVIterm1::_mainloop)(void) {
386386

387387
#endif // end TERM_USE_INTERRUPT
388388

389-
bool DVIterm1::begin(void) {
389+
bool DVItext1::begin(void) {
390390
if ((getBuffer())) {
391391
fillScreen(' ');
392392
gfxptr = this;
393393
#ifdef TERM_USE_INTERRUPT
394-
dvi0.scanline_callback = term1_scanline_callback;
394+
dvi0.scanline_callback = text1_scanline_callback;
395395
#endif
396-
mainloop = mainloopterm1;
396+
mainloop = mainlooptext1;
397397
PicoDVI::begin();
398398

399399
// Must do this AFTER begin because tmdsbuf (accessed in func)

src/PicoDVI.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ class DVIGFX1 : public PicoDVI, public GFXcanvas1 {
102102
volatile bool swap_wait = 0; // For syncronizing front/back buffer swap
103103
};
104104

105-
class DVIterm1 : public PicoDVI, public GFXcanvas16 {
105+
class DVItext1 : public PicoDVI, public GFXcanvas16 {
106106
public:
107-
DVIterm1(const DVIresolution res = DVI_RES_400x240p60,
107+
DVItext1(const DVIresolution res = DVI_RES_400x240p60,
108108
const struct dvi_serialiser_cfg &c = pimoroni_demo_hdmi_cfg,
109109
vreg_voltage v = VREG_VOLTAGE_1_20);
110-
~DVIterm1(void);
110+
~DVItext1(void);
111111
bool begin(void);
112112
size_t write(uint8_t c);
113113
void _prepare_scanline(uint16_t y);

0 commit comments

Comments
 (0)