WIP
Some checks failed
Build pico-mac / bins (push) Has been cancelled

This commit is contained in:
Jeff Epler 2025-08-26 11:53:48 -05:00
parent 46b8cd8fbf
commit 75c2755ff2
3 changed files with 20 additions and 2 deletions

View file

@ -41,10 +41,8 @@ target_compile_definitions(common_pico INTERFACE
target_link_libraries(common_pico INTERFACE pico_stdlib pico_multicore)
if (USE_HSTX)
set(PIMORONI_PICO_PATH ${CMAKE_CURRENT_LIST_DIR}/../../3rdparty/pimoroni-pico)
target_sources(common_pico INTERFACE
${CMAKE_CURRENT_LIST_DIR}/dvhstx_shim.cpp)
include(${PIMORONI_PICO_PATH}/pimoroni_pico_import.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/../../3rdparty/dvhstx/drivers/dvhstx/dvhstx.cmake)
target_link_libraries(common_pico INTERFACE dvhstx)
target_compile_definitions(common_pico INTERFACE USE_HSTX=1)

8
src/pico/dvhstx_shim.cpp Normal file
View file

@ -0,0 +1,8 @@
#include "dvhstx.hpp"
#include "dvhstx_shim.h"
static pimoroni::DVHSTX display;
void hstx_setup(line_fun_t gen_line) {
display.set_callback(gen_line, &display);
display.init(640, 240, pimoroni::DVHSTX::MODE_LINE_CALLBACK_RGB565, {HSTX_CKP, HSTX_D0P, HSTX_D1P, HSTX_D2P});
}

12
src/pico/dvhstx_shim.h Normal file
View file

@ -0,0 +1,12 @@
#pragma once
#if defined(__cplusplus)
extern "C" {
#endif
typedef void(*line_fun_t)(void *cb_data, int line_num, uint32_t *data);
void hstx_setup(line_fun_t gen_line);
#if defined(__cplusplus)
}
#endif