Skip to content

Commit

Permalink
pico: inline dbi vsync_callback
Browse files Browse the repository at this point in the history
The setter, not the identically named actual callback
  • Loading branch information
Daft-Freak committed Jan 23, 2025
1 parent 4adc048 commit c8385f6
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions 32blit-pico/display/dbi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,6 @@ static void set_backlight(uint8_t brightness) {
#endif
}

static bool vsync_callback(gpio_irq_callback_t callback) {
#ifdef LCD_VSYNC_PIN
gpio_set_irq_enabled_with_callback(LCD_VSYNC_PIN, GPIO_IRQ_EDGE_RISE, true, callback);
return true;
#else
return false;
#endif
}

static void set_pixel_double(bool pd) {
pixel_double = pd;

Expand Down Expand Up @@ -470,7 +461,10 @@ void init_display() {

clear();

have_vsync = vsync_callback(vsync_callback);
#ifdef LCD_VSYNC_PIN
gpio_set_irq_enabled_with_callback(LCD_VSYNC_PIN, GPIO_IRQ_EDGE_RISE, true, vsync_callback);
have_vsync = true;
#endif
}

void update_display(uint32_t time) {
Expand Down

0 comments on commit c8385f6

Please sign in to comment.