def flush(self, disp_drv, area, color_p): # Column addresses self.send_cmd(0x2A) self.flush_data[0] = (area.x1 >> 8) & 0xFF self.flush_data[1] = area.x1 & 0xFF self.flush_data[2] = (area.x2 >> 8) & 0xFF self.flush_data[3] = area.x2 & 0xFF self.send_data(self.flush_data) # Page addresses self.send_cmd(0x2B) self.flush_data[0] = (area.y1 >> 8) & 0xFF self.flush_data[1] = area.y1 & 0xFF self.flush_data[2] = (area.y2 >> 8) & 0xFF self.flush_data[3] = area.y2 & 0xFF self.send_data(self.flush_data) # Memory write self.send_cmd(0x2C) size = (area.x2 - area.x1 + 1) * (area.y2 - area.y1 + 1) data_view = color_p.__dereference__(size * 2) self.send_data(data_view) lv.disp_flush_ready(disp_drv)
def flush_isr(spi_transaction_ptr): lv.disp_flush_ready(self.disp_drv) # esp.spi_device_release_bus(self.spi) esp.get_ccount(self.end_time_ptr)
def my_flush_cb(disp_drv, area, color_p): lcd_v3.write(frame_buf) lcd_v3.pwm_pins_toggle( ) # note: original application toggles the display with 60 Hz (= stable frame rate?) lv.disp_flush_ready(disp_drv)
def flush_isr(spi_transaction_ptr): lv.disp_flush_ready(self.disp_drv)