More stuff.
This commit is contained in:
parent
1d68748f50
commit
7a79fdd6d8
22
src/main.c
22
src/main.c
@ -139,12 +139,20 @@ int main()
|
||||
|
||||
// clear frame buffer
|
||||
memset(&frames[0].data[0], 0, sizeof(frames[0].data));
|
||||
// horizontal line
|
||||
for (uint16_t x = 400; x < 620; ++x)
|
||||
set_pixel(x, 64);
|
||||
// vertical line
|
||||
for (uint16_t y = 20; y < 460; ++y)
|
||||
set_pixel(400, y);
|
||||
// horizontal lines
|
||||
for (uint16_t x = 0; x < 640; ++x)
|
||||
{
|
||||
set_pixel(x, 4);
|
||||
set_pixel(x, 244);
|
||||
set_pixel(x, 484);
|
||||
}
|
||||
// vertical lines
|
||||
for (uint16_t y = 3; y < 483; ++y)
|
||||
{
|
||||
set_pixel(0, y);
|
||||
set_pixel(480, y);
|
||||
set_pixel(640, y);
|
||||
}
|
||||
|
||||
// PIO and state machines
|
||||
PIO pio = pio0;
|
||||
@ -199,7 +207,7 @@ int main()
|
||||
irq_set_exclusive_handler(DMA_IRQ_0, dma_handler);
|
||||
irq_set_enabled(DMA_IRQ_0, true);
|
||||
|
||||
dma_channel_configure(dma_channel, &dma_config, &pio0_hw->txf[2], &frames[0].data[0], 38400,
|
||||
dma_channel_configure(dma_channel, &dma_config, &pio0_hw->txf[2], &frames[0].data[0], 10000,
|
||||
false);
|
||||
|
||||
dma_ready = true;
|
||||
|
Loading…
Reference in New Issue
Block a user