Compare commits

..

5 commits

Author SHA1 Message Date
Liz
350a5aa1d7 freq needs to be 150, removing tinyusb CI types
Some checks failed
Arduino Library CI / build (push) Has been cancelled
2025-02-25 08:59:48 -05:00
Liz
d5f93199c9 add ifdef to examples for pin defines 2025-02-25 08:44:34 -05:00
Liz
9d6c356c66 Update 00simpletest.ino 2025-02-25 08:40:23 -05:00
Liz
a3264fdf95 try ifdef for example
Some checks are pending
Arduino Library CI / build (push) Waiting to run
2025-02-25 08:38:19 -05:00
Liz
e0fda41105 revert clang on drivers folder 2025-02-25 08:21:06 -05:00
11 changed files with 66 additions and 2812 deletions

View file

@ -4,10 +4,6 @@ on: [pull_request, push, repository_dispatch]
jobs:
build:
strategy:
matrix:
arduino-platform: ["feather_rp2350", "metro_rp2350"]
runs-on: ubuntu-latest
steps:
@ -24,41 +20,10 @@ jobs:
run: bash ci/actions_install.sh
- name: test platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
run: python3 ci/build_platform.py feather_rp2350 metro_rp2350
clang:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: adafruit/ci-arduino
path: ci
- name: pre-install
run: bash ci/actions_install.sh
- name: clang
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -e "./src/drivers/dvhstx" -e './.git' -r .
doxygen:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: adafruit/ci-arduino
path: ci
- name: pre-install
run: bash ci/actions_install.sh
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
- name: doxygen
env:

2
.gitignore vendored
View file

@ -1,3 +1 @@
build/*
/doxygen
/html

2459
Doxyfile

File diff suppressed because it is too large Load diff

View file

@ -4,11 +4,15 @@
// If your board definition has PIN_CKP and related defines,
// DVHSTX_PINOUT_DEFAULT is available
DVHSTX16 display(DVHSTX_PINOUT_DEFAULT, DVHSTX_RESOLUTION_320x240);
// If you get the message "error: 'DVHSTX_PINOUT_DEFAULTx' was not declared"
// then you need to give the pins numbers explicitly, like the example below.
// The order is: {CKP, D0P, D1P, D2P} DVHSTX16 display({12, 14, 16, 18},
// DVHSTX_RESOLUTION_320x240);
#ifdef PIN_CKP
DVHSTX16 display(DVHSTX_PINOUT_DEFAULT, DVHSTX_RESOLUTION_320x240);
#else
DVHSTX16 display({14, 18, 16, 12}, DVHSTX_RESOLUTION_320x240);
#endif
void setup() {
Serial.begin(115200);

View file

@ -4,30 +4,15 @@
// If your board definition has PIN_CKP and related defines,
// DVHSTX_PINOUT_DEFAULT is available
DVHSTX8 display(DVHSTX_PINOUT_DEFAULT, DVHSTX_RESOLUTION_640x360);
// If you get the message "error: 'DVHSTX_PINOUT_DEFAULTx' was not declared"
// then you need to give the pins numbers explicitly, like the example below.
// The order is: {CKP, D0P, D1P, D2P} DVHSTX8 display({12, 14, 16, 18},
// DVHSTX_RESOLUTION_640x360);
struct moving_point {
int x, y, dx, dy;
void step() {
x += dx;
if (x < 0) { x = 0; dx = random(3) + 1; }
if (x >= display.width()) { x = display.width() - 1; dx = -random(3) - 1; }
y += dy;
if (y < 0) { y = 0; dy = random(3) + 1; }
if (y >= display.height()) { y = display.height() - 1; dy = -random(3) - 1; }
}
};
moving_point p1, p2;
int random_with_sign(int n) {
return random(2) ? random(n-1)+1 : -random(n-1)-1;
}
#ifdef PIN_CKP
DVHSTX16 display(DVHSTX_PINOUT_DEFAULT, DVHSTX_RESOLUTION_320x240);
#else
DVHSTX16 display({14, 18, 16, 12}, DVHSTX_RESOLUTION_320x240);
#endif
void setup() {
Serial.begin(115200);
@ -38,20 +23,12 @@ void setup() {
digitalWrite(LED_BUILTIN, (millis() / 500) & 1);
}
Serial.println("display initialized");
p1 = moving_point{random(display.width()), random(display.height()), random_with_sign(3), random_with_sign(3)};
p2 = moving_point{random(display.width()), random(display.height()), random_with_sign(3), random_with_sign(3)};
}
void loop() {
static int j;
display.drawLine(p1.x, p1.y, p2.x, p2.y, 1 + (j + 254) % 255);
Serial.printf("%d %d %d %d\r\n", p1.x, p1.y, p1.dx, p1.dy);
p1.step();
p2.step();
for(int i=1; i<256; i++) {
display.setColor(i, ((i + j) % 255) * 0x010101);
}
j += 1;
delay(3);
// Draw random lines
display.drawLine(random(display.width()), random(display.height()),
random(display.width()), random(display.height()),
random(65536));
sleep_ms(1);
}

View file

@ -4,12 +4,16 @@
// If your board definition has PIN_CKP and related defines,
// DVHSTX_PINOUT_DEFAULT is available
DVHSTXText display(DVHSTX_PINOUT_DEFAULT);
// If you get the message "error: 'DVHSTX_PINOUT_DEFAULTx' was not declared"
// then you need to give the pins numbers explicitly, like the example below.
// The order is: {CKP, D0P, D1P, D2P}.
//
// DVHSTXText display({12, 14, 16, 18});
// DVHSTXText3 display({12, 14, 16, 18});
#ifdef PIN_CKP
DVHSTX16 display(DVHSTX_PINOUT_DEFAULT, DVHSTX_RESOLUTION_320x240);
#else
DVHSTX16 display({14, 18, 16, 12}, DVHSTX_RESOLUTION_320x240);
#endif
const static TextColor colors[] = {
TextColor::TEXT_BLACK, TextColor::TEXT_RED, TextColor::TEXT_GREEN,

View file

@ -1,5 +1,5 @@
name=Adafruit DVI HSTX
version=1.2.0
version=1.0.0
author=Jeff Epler
maintainer=Adafruit <info@adafruit.com>
sentence=Arduino library for RP2350 DVI output, based on dvhstx

View file

@ -13,14 +13,10 @@ int16_t dvhstx_width(DVHSTXResolution r) {
return 400;
case DVHSTX_RESOLUTION_320x240:
return 320;
case DVHSTX_RESOLUTION_640x480:
return 640;
case DVHSTX_RESOLUTION_360x240:
return 360;
case DVHSTX_RESOLUTION_360x200:
return 360;
case DVHSTX_RESOLUTION_720x400:
return 720;
case DVHSTX_RESOLUTION_360x288:
return 360;
case DVHSTX_RESOLUTION_400x300:
@ -46,14 +42,10 @@ int16_t dvhstx_height(DVHSTXResolution r) {
return 225;
case DVHSTX_RESOLUTION_320x240:
return 240;
case DVHSTX_RESOLUTION_640x480:
return 480;
case DVHSTX_RESOLUTION_360x240:
return 240;
case DVHSTX_RESOLUTION_360x200:
return 200;
case DVHSTX_RESOLUTION_720x400:
return 400;
case DVHSTX_RESOLUTION_360x288:
return 288;
case DVHSTX_RESOLUTION_400x300:
@ -74,7 +66,6 @@ void DVHSTX16::swap(bool copy_framebuffer) {
memcpy(hstx.get_front_buffer<uint8_t>(), hstx.get_back_buffer<uint8_t>(),
sizeof(uint16_t) * _width * _height);
}
buffer = hstx.get_back_buffer<uint16_t>();
}
void DVHSTX8::swap(bool copy_framebuffer) {
if (!double_buffered) {
@ -85,26 +76,14 @@ void DVHSTX8::swap(bool copy_framebuffer) {
memcpy(hstx.get_front_buffer<uint8_t>(), hstx.get_back_buffer<uint8_t>(),
sizeof(uint8_t) * _width * _height);
}
buffer = hstx.get_back_buffer<uint8_t>();
}
void DVHSTXText::swap(bool copy_framebuffer) {
if (!double_buffered) {
return;
}
hstx.flip_blocking();
if (copy_framebuffer) {
memcpy(hstx.get_front_buffer<uint8_t>(), hstx.get_back_buffer<uint8_t>(),
sizeof(uint16_t) * _width * _height);
}
buffer = hstx.get_back_buffer<uint16_t>();
}
void DVHSTXText::clear() {
void DVHSTXText3::clear() {
std::fill(getBuffer(), getBuffer() + WIDTH * HEIGHT, attr << 8);
}
// Character framebuffer is actually a small GFXcanvas16, so...
size_t DVHSTXText::write(uint8_t c) {
size_t DVHSTXText3::write(uint8_t c) {
if (!*this)
return 0;

View file

@ -4,77 +4,31 @@
#include "drivers/dvhstx/dvhstx.hpp"
#if DOXYGEN
/// Enumerated types in the library. Due to a technical limitations in the
/// documentation generator, these are displayed as members of a class called
/// "enum", but in reality they are defined as top-level enumerations.
struct enum {
public :
#endif
enum DVHSTXResolution {
/* well supported, square pixels on a 16:9 display, actual resolution
1280x720@50Hz */
DVHSTX_RESOLUTION_320x180,
DVHSTX_RESOLUTION_640x360,
/// Available video resolutions
enum DVHSTXResolution {
DVHSTX_RESOLUTION_320x180, ///< well supported, aspect ratio 16:9,
///< actual resolution 1280x720@50Hz
DVHSTX_RESOLUTION_640x360, ///< well supported, aspect ratio 16:9,
///< actual resolution 1280x720@50Hz
/* sometimes supported, square pixels on a 16:9 display, actual resolution
960x540@60Hz */
DVHSTX_RESOLUTION_480x270,
DVHSTX_RESOLUTION_480x270, ///< sometimes supported, aspect ratio 16:9,
///< actual resolution 960x540@60Hz
/* sometimes supported, square pixels on a 16:9 display, actual resolution
800x450@60Hz */
DVHSTX_RESOLUTION_400x225,
DVHSTX_RESOLUTION_400x225, ///< sometimes supported, aspect ratio 16:9,
///< actual resolution 800x450@60Hz
/* well supported, but pixels aren't square on a 16:9 display */
DVHSTX_RESOLUTION_320x240, /* 4:3, actual resolution 640x480@60Hz */
DVHSTX_RESOLUTION_360x240, /* 3:2, actual resolution 720x480@60Hz */
DVHSTX_RESOLUTION_360x200, /* 18:10, actual resolution 720x400@70Hz */
DVHSTX_RESOLUTION_360x288, /* 5:4, actual resolution 720x576@60Hz */
DVHSTX_RESOLUTION_400x300, /* 4:3, actual resolution 800x600@60Hz */
DVHSTX_RESOLUTION_512x384, /* 4:3, actual resolution 1024x768@60Hz */
DVHSTX_RESOLUTION_320x240, ///< well supported, aspect ratio 4:3, actual
///< resolution 640x480@60Hz
DVHSTX_RESOLUTION_640x480, ///< well supported, aspect ratio 4:3, actual
///< resolution 640x480@60Hz
DVHSTX_RESOLUTION_360x240, ///< well supported, aspect ratio 3:2, actual
///< resolution 720x480@60Hz
DVHSTX_RESOLUTION_360x200, ///< well supported, aspect ratio 9:5, actual
///< resolution 720x400@70Hz (very close to
///< 16:9)
DVHSTX_RESOLUTION_720x400, ///< well supported, aspect ratio 9:5, actual
///< resolution 720x400@70Hz (very close to
///< 16:9)
DVHSTX_RESOLUTION_360x288, ///< well supported, aspect ratio 5:4, actual
///< resolution 720x576@60Hz
DVHSTX_RESOLUTION_400x300, ///< well supported, aspect ratio 4:3, actual
///< resolution 800x600@60Hz
DVHSTX_RESOLUTION_512x384, ///< well supported, aspect ratio 4:3, actual
///< resolution 1024x768@60Hz
/* sometimes supported, but pixels aren't square on a 16:9 display */
DVHSTX_RESOLUTION_400x240, ///< well supported, aspect ratio 5:3, actual
///< resolution 800x480@60Hz
};
#if DOXYGEN
/// Foreground, background & attribute definitions for DVHSTXText Cells
enum TextColor{
TEXT_BLACK, ///< Black foreground color
TEXT_RED, ///< Red foreground color
TEXT_GREEN, ///< Green foreground color
TEXT_YELLOW, ///< Yellow foreground color
TEXT_BLUE, ///< Blue foreground color
TEXT_MAGENTA, ///< Magenta foreground color
TEXT_WHITE, ///< White foreground color
BG_BLACK, ///< Black background color
BG_RED, ///< Red background color
BG_GREEN, ///< Green background color
BG_YELLOW, ///< Yellow background color
BG_BLUE, ///< Blue background color
BG_MAGENTA, ///< Magenta background color
BG_CYAN, ///< Cyan background color
BG_WHITE, ///< White background color
ATTR_NORMAL_INTEN, ///< Normal intensity foreground
ATTR_LOW_INTEN, ///< Lower intensity foreground
ATTR_V_LOW_INTEN, ///< Lowest intensity foreground
};
/* sometimes supported, but pixels aren't square on a 16:9 display */
DVHSTX_RESOLUTION_400x240, /* 5:3, actual resolution 800x480@60Hz */
};
#endif
using pimoroni::DVHSTXPinout;
@ -88,25 +42,16 @@ using pimoroni::DVHSTXPinout;
#if defined(PIN_CKP)
#define DVHSTX_PINOUT_DEFAULT \
{ PIN_CKP, PIN_D0P, PIN_D1P, PIN_D2P }
#else
#if !defined(DVHSTX_NO_DEFAULT_PINOUT_WARNING)
#pragma GCC warning \
"DVHSTX_PINOUT_DEFAULT is a default pinout. If you get no video display, use the correct pinout for your board."
#endif
#define DVHSTX_PINOUT_DEFAULT \
{ 12, 14, 16, 18 }
#endif
int16_t dvhstx_width(DVHSTXResolution r);
int16_t dvhstx_height(DVHSTXResolution r);
/// A 16-bit canvas displaying to a DVI monitor
class DVHSTX16 : public GFXcanvas16 {
public:
/**************************************************************************/
/*!
@brief Instatiate a DVHSTX 16-bit canvas context for graphics
@param pinout Details of the HSTX pinout
@param res Display resolution
@param double_buffered Whether to allocate two buffers
*/
@ -117,12 +62,6 @@ public:
pinout(pinout), res{res}, double_buffered{double_buffered} {}
~DVHSTX16() { end(); }
/**************************************************************************/
/*!
@brief Start the display
@return true if successful, false in case of error
*/
/**************************************************************************/
bool begin() {
bool result =
hstx.init(dvhstx_width(res), dvhstx_height(res),
@ -133,11 +72,6 @@ public:
fillScreen(0);
return true;
}
/**************************************************************************/
/*!
@brief Stop the display
*/
/**************************************************************************/
void end() { hstx.reset(); }
/**********************************************************************/
@ -159,8 +93,8 @@ public:
@return The corresponding 16-bit pixel value
*/
/**********************************************************************/
uint16_t color565(uint8_t r, uint8_t g, uint8_t b) {
return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
uint16_t color565(uint8_t red, uint8_t green, uint8_t blue) {
return ((red & 0xF8) << 8) | ((green & 0xFC) << 3) | (blue >> 3);
}
private:
@ -170,13 +104,11 @@ private:
bool double_buffered;
};
/// An 8-bit canvas displaying to a DVI monitor
class DVHSTX8 : public GFXcanvas8 {
public:
/**************************************************************************/
/*!
@brief Instatiate a DVHSTX 8-bit canvas context for graphics
@param pinout Details of the HSTX pinout
@param res Display resolution
@param double_buffered Whether to allocate two buffers
*/
@ -187,12 +119,6 @@ public:
pinout(pinout), res{res}, double_buffered{double_buffered} {}
~DVHSTX8() { end(); }
/**************************************************************************/
/*!
@brief Start the display
@return true if successful, false in case of error
*/
/**************************************************************************/
bool begin() {
bool result =
hstx.init(dvhstx_width(res), dvhstx_height(res),
@ -209,32 +135,11 @@ public:
fillScreen(0);
return true;
}
/**************************************************************************/
/*!
@brief Stop the display
*/
/**************************************************************************/
void end() { hstx.reset(); }
/**************************************************************************/
/*!
@brief Set the given palette entry to a RGB888 color
@param idx The palette entry number, from 0 to 255
@param r The input red value, 0 to 255
@param g The input red value, 0 to 255
@param b The input red value, 0 to 255
*/
/**************************************************************************/
void setColor(uint8_t idx, uint8_t r, uint8_t g, uint8_t b) {
hstx.get_palette()[idx] = (r << 16) | (g << 8) | b;
void setColor(uint8_t idx, uint8_t red, uint8_t green, uint8_t blue) {
hstx.get_palette()[idx] = (red << 16) | (green << 8) | blue;
}
/**************************************************************************/
/*!
@brief Set the given palette entry to a RGB888 color
@param idx The palette entry number, from 0 to 255
@param rgb The 24-bit RGB value in the form 0x00RRGGBB
*/
/**************************************************************************/
void setColor(uint8_t idx, uint32_t rgb) { hstx.get_palette()[idx] = rgb; }
/**********************************************************************/
@ -256,130 +161,55 @@ private:
using TextColor = pimoroni::DVHSTX::TextColour;
/// A text-mode canvas displaying to a DVI monitor
///
/// The text mode display is always 91x30 characters at a resolution of 1280x720
/// pixels.
class DVHSTXText : public GFXcanvas16 {
class DVHSTXText3 : public GFXcanvas16 {
public:
/// Each element of the canvas is a Cell, which comprises a character and an
/// attribute.
struct Cell {
uint16_t value; ///< A value where the low 8 bits are the character and the
///< high 8 bits are the attribute
/**************************************************************************/
/*!
@brief Create a cell object from an ASCII character and an attribute
@param c ASCII character value. Glyphs from 32 to 126 inclusive are
available
@param attr Attribute value. Can be the logical OR of a text color, a
background color, and an intensity flag
*/
/**************************************************************************/
uint16_t value;
Cell(uint8_t c, uint8_t attr = TextColor::TEXT_WHITE)
: value(c | (attr << 8)) {}
};
/**************************************************************************/
/*!
@brief Instatiate a DVHSTX 8-bit canvas context for graphics
@param pinout Details of the HSTX pinout
@param res Display resolution
@param double_buffered Whether to allocate two buffers
*/
/**************************************************************************/
DVHSTXText(DVHSTXPinout pinout, bool double_buffered = false)
: GFXcanvas16(91, 30, false), double_buffered{double_buffered},
pinout(pinout), res{}, attr{TextColor::TEXT_WHITE} {}
~DVHSTXText() { end(); }
DVHSTXText3(DVHSTXPinout pinout)
: GFXcanvas16(91, 30, false),
pinout(pinout), res{res}, attr{TextColor::TEXT_WHITE} {}
~DVHSTXText3() { end(); }
/**************************************************************************/
/*!
@brief Check if the display is running
@return true if the display is running
*/
/**************************************************************************/
operator bool() const { return hstx.get_back_buffer<uint16_t>(); }
/**************************************************************************/
/*!
@brief Start the display
@return true if successful, false in case of error
*/
/**************************************************************************/
bool begin() {
bool result = hstx.init(91, 30, pimoroni::DVHSTX::MODE_TEXT_RGB111,
double_buffered, pinout);
bool result =
hstx.init(91, 30, pimoroni::DVHSTX::MODE_TEXT_RGB111, false, pinout);
if (!result)
return false;
buffer = hstx.get_back_buffer<uint16_t>();
return true;
}
/**************************************************************************/
/*!
@brief Stop the display
*/
/**************************************************************************/
void end() { hstx.reset(); }
/**************************************************************************/
/*!
@brief Clear the display. All cells are set to character 32 (space) with
the current color
*/
/**************************************************************************/
void clear();
/**************************************************************************/
/*!
@brief Set the color used by write()
@param a Attribute value. Can be the logical OR of a text color, a
background color, and an intensity flag
*/
/**************************************************************************/
void setColor(uint8_t a) { attr = a; }
/**************************************************************************/
/*!
@brief Set the color used by write()
@param fg A foreground color
@param bg A background color
@param inten An intensity flag
*/
/**************************************************************************/
void setColor(TextColor fg, TextColor bg,
TextColor inten = TextColor::ATTR_NORMAL_INTEN) {
attr = fg | bg | inten;
}
/**************************************************************************/
/*!
@brief Hide the block cursor
*/
/**************************************************************************/
void hideCursor() {
cursor_visible = false;
hstx.cursor_off();
}
/**************************************************************************/
/*!
@brief Show the block cursor
*/
/**************************************************************************/
void showCursor() {
cursor_visible = true;
sync_cursor_with_hstx();
}
/**************************************************************************/
/*!
@brief Move the position for write(), and the block cursor (if shown)
@param x The screen location horizontally, from 0 to 91 inclusive
@param y The screen location vertically, from 0 to 29 inclusive
Note that when the cursor's X position is (zero-based) 91 it is shown on
(zero-based) column 90 but the next character written will be wrapped and
shown at the beginning of the next line.
*/
/**************************************************************************/
void setCursor(int x, int y) {
if (x < 0)
x = 0;
@ -394,51 +224,11 @@ public:
sync_cursor_with_hstx();
}
/**************************************************************************/
/*!
@brief Write a character to the display
@param c The character to write
Because this class is a subclass of Print, you can also use methods like
print, println, and printf to write text.
Text is written with the current attribute, and the screen automatically
wraps and scrolls when needed.
This function fails (returns 0) if the display was not successfully started
with begin().
@return 1 if the character is written, 0 if it was not
*/
/**************************************************************************/
size_t write(uint8_t c);
/**************************************************************************/
/*!
@brief Get the current cursor X position, from 0 to 91
@return The column position of the cursor
*/
/**************************************************************************/
int getCursorX() const { return cursor_x; }
/**************************************************************************/
/*!
@brief Get the current cursor Y position, from 0 to 29
@return The row position of the cursor
*/
/**************************************************************************/
int getCursorY() const { return cursor_y; }
/**********************************************************************/
/*!
@brief If double-buffered, wait for retrace and swap buffers. Otherwise,
do nothing (returns immediately)
@param copy_framebuffer if true, copy the new screen to the new back buffer.
Otherwise, the content is undefined.
*/
/**********************************************************************/
void swap(bool copy_framebuffer = false);
private:
DVHSTXPinout pinout;
DVHSTXResolution res;

View file

@ -209,17 +209,13 @@ void __scratch_x("display") DVHSTX::gfx_dma_handler() {
*dst_ptr++ = val;
*dst_ptr++ = val;
}
} else if (h_repeat_shift == 1) {
}
else {
for (int i = 0; i < timing_mode->h_active_pixels; i += 2) {
uint32_t val = display_palette[*src_ptr++];
*dst_ptr++ = val;
*dst_ptr++ = val;
}
} else {
for (int i = 0; i < timing_mode->h_active_pixels; i += 1) {
uint32_t val = display_palette[*src_ptr++];
*dst_ptr++ = val;
}
}
}
}
@ -323,16 +319,16 @@ void __scratch_x("display") DVHSTX::text_dma_handler() {
bg_xor = bg * 0x3030303;
tmp_h = colour * ((bits >> 6) & 0x3030303) ^ bg_xor;
*dst_ptr++ = (tmp_l & 0xffff) | (tmp_h << 16);
*dst_ptr++ = tmp_l & 0xffff | (tmp_h << 16);
tmp_l = tmp_h >> 16;
tmp_h = colour * ((bits >> 4) & 0x3030303) ^ bg_xor;
*dst_ptr++ = (tmp_l & 0xffff) | (tmp_h << 16);
*dst_ptr++ = tmp_l & 0xffff | (tmp_h << 16);
tmp_l = tmp_h >> 16;
tmp_h = colour * ((bits >> 2) & 0x3030303) ^ bg_xor;
*dst_ptr++ = (tmp_l & 0xffff) | (tmp_h << 16);
*dst_ptr++ = tmp_l & 0xffff | (tmp_h << 16);
tmp_l = tmp_h >> 16;
tmp_h = colour * ((bits >> 0) & 0x3030303) ^ bg_xor;
*dst_ptr++ = (tmp_l & 0xffff) | (tmp_h << 16);
*dst_ptr++ = tmp_l & 0xffff | (tmp_h << 16);
}
if (y / 24 == cursor_y) {
uint8_t* dst_ptr = (uint8_t*)&line_buffers[ch_num * line_buf_total_len + count_of(vactive_text_line_header)] + 14 * cursor_x;

View file

@ -2,7 +2,6 @@
#include <string.h>
#include "dvi.hpp"
#include "pico/stdlib.h"
#include "hardware/gpio.h"
@ -126,6 +125,7 @@ namespace pimoroni {
private:
RGB888 palette[PALETTE_SIZE];
bool double_buffered;
uint8_t* frame_buffer_display;
uint8_t* frame_buffer_back;
uint32_t* font_cache = nullptr;