Starting to work
This commit is contained in:
parent
e77c6fedad
commit
4a8d322dd9
1 changed files with 4 additions and 12 deletions
|
|
@ -18,13 +18,10 @@ PicoDVI::~PicoDVI(void) {
|
|||
static struct dvi_inst *dviptr = NULL;
|
||||
static uint16_t *fb = NULL;
|
||||
static uint16_t fbw = 0, fbh = 0;
|
||||
static volatile bool waiting = true;
|
||||
|
||||
static volatile bool foo = true;
|
||||
|
||||
//void core1_main() {
|
||||
void setup1() {
|
||||
while(foo); // Wait for begin() to do its thing
|
||||
|
||||
while(waiting); // Wait for begin() to do its thing
|
||||
dvi_register_irqs_this_core(dviptr, DMA_IRQ_0);
|
||||
dvi_start(dviptr);
|
||||
dvi_scanbuf_main_16bpp(dviptr);
|
||||
|
|
@ -42,7 +39,6 @@ void core1_scanline_callback() {
|
|||
scanline = (scanline + 1) % fbh;
|
||||
}
|
||||
|
||||
|
||||
bool PicoDVI::begin(void) {
|
||||
if ((framebuf = (uint16_t *)calloc(framebuf_width * framebuf_height, sizeof(uint16_t)))) {
|
||||
vreg_set_voltage(voltage);
|
||||
|
|
@ -64,15 +60,11 @@ bool PicoDVI::begin(void) {
|
|||
bufptr += framebuf_width;
|
||||
queue_add_blocking_u32(&dvi0.q_colour_valid, &bufptr);
|
||||
|
||||
#if 0
|
||||
// This first line is where things go south
|
||||
*dviptr = dvi0;
|
||||
dviptr = &dvi0;
|
||||
fb = framebuf;
|
||||
fbw = framebuf_width;
|
||||
fbh = framebuf_height;
|
||||
// multicore_launch_core1(core1_main);
|
||||
foo = false; // Set core 1 free
|
||||
#endif
|
||||
waiting = false; // Set core 1 free
|
||||
|
||||
for (int i=10; i<20; i++) {
|
||||
framebuf[i * framebuf_width + i] = 0xF800;
|
||||
|
|
|
|||
Loading…
Reference in a new issue