Rename vga_sync to vga_hsync, because that's all that it does.
This commit is contained in:
parent
0f31cfb22d
commit
074ba919d7
@ -53,9 +53,9 @@ static void vga_pixel_program_init(PIO pio, uint sm, uint offset)
|
||||
pio_sm_set_enabled(pio, sm, true);
|
||||
}
|
||||
|
||||
static void vga_sync_program_init(PIO pio, uint sm, uint offset)
|
||||
static void vga_hsync_program_init(PIO pio, uint sm, uint offset)
|
||||
{
|
||||
pio_sm_config config = vga_sync_program_get_default_config(offset);
|
||||
pio_sm_config config = vga_hsync_program_get_default_config(offset);
|
||||
// destination pins for SET instructions
|
||||
sm_config_set_set_pins(&config, 20, 2);
|
||||
pio_gpio_init(pio, 20);
|
||||
@ -99,10 +99,10 @@ int main()
|
||||
vga_pixel_program_init(pio, sm0, offset0);
|
||||
|
||||
// VGA sync program
|
||||
uint offset1 = pio_add_program(pio, &vga_sync_program);
|
||||
uint offset1 = pio_add_program(pio, &vga_hsync_program);
|
||||
uint sm1 = pio_claim_unused_sm(pio, true);
|
||||
printf("Starting VGA sync machine on %u...\n", sm1);
|
||||
vga_sync_program_init(pio, sm1, offset1);
|
||||
vga_hsync_program_init(pio, sm1, offset1);
|
||||
printf("Feeding horizontal sync...\n");
|
||||
pio_sm_put_blocking(pio, sm1, 63 * 4);
|
||||
pio_sm_put_blocking(pio, sm1, 775 * 4);
|
||||
|
@ -6,9 +6,9 @@ loop:
|
||||
out pins, 1 [2]
|
||||
jmp loop
|
||||
|
||||
.program vga_sync
|
||||
.program vga_hsync
|
||||
|
||||
entrypoint_vga_sync:
|
||||
entrypoint_vga_hsync:
|
||||
pull
|
||||
mov isr, osr
|
||||
pull
|
||||
|
Loading…
Reference in New Issue
Block a user