-
Notifications
You must be signed in to change notification settings - Fork 304
ST7789: Make display offsets runtime configurable #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We don't change previous functionality by adding a helper function that sets the user offsets when initializing the display
Looks promising overall. |
@arktrin I forgot to ask, are you using the master or develop branch of this repo? |
I'm using only the master branch. |
Ok, this commit is for the develop one, can I send you a patch for the master branch in order to test it in your setup? |
Yeah, sure. I also don't see any problems in switching to the develop branch if it's easier and more convenient (for test purposes at least). |
It would be great if you can test it using the develop branch. I'm also planning to test it develop, but using the ESP32 module. EDIT static lv_disp_drv_t disp_drv;
lv_disp_drv_init(&disp_drv);
disp_drv.flush_cb = st7789_flush;
disp_drv.rotated = LV_DISP_ROT_NONE;
/* Initialize SPI or I2C bus used by the drivers */
lvgl_driver_init();
/* Initialize GPIOs not related to SPI nor I2C, such as reset, backlight, DC, etc */
display_bsp_init_io();
/* Removed from lvgl_driver_init, that function is meant to initialize all
* the needed peripherals */
st7789_init(&disp_drv); EDIT 2 diff --git a/lvgl_helpers.c b/lvgl_helpers.c
index 6bfdff0..1b17cf1 100644
--- a/lvgl_helpers.c
+++ b/lvgl_helpers.c
@@ -182,7 +182,7 @@ bool lvgl_spi_driver_init(int host,
int dma_channel,
int quadwp_pin, int quadhd_pin)
{
- assert((0 <= host) && (SPI_HOST_MAX > host));
+ // assert((0 <= host) && (SPI_HOST_MAX > host));
const char *spi_names[] = {
"SPI1_HOST", "SPI2_HOST", "SPI3_HOST"
}; |
Found a couple of issues, I'm placing them here as reminder:
GPIO 35 is pin busy, we need to add an option such as |
@C47D Hmm, I thought it would be easier. I've cloned this branch - github.com/lvgl/lv_port_esp32/tree/feat/new_driver_test, updated to latest develop branch of lvgl_esp32_drivers, and it doesn't compiles because of multiple definition of display_bsp_init_io() function - in main.c and lvgl_helpers.c |
Sorry about that, it seems like I forgot to push that change, you should comment out that function on the main.c file. Also, you should clone this particular branch, not develop. |
Commenting out display_bsp_init_io() function in the main.c helped. Switched to |
It worked as well for me using the ESP32 module. I didn't tried changing the offset after initializing the display tho. Do you think it's ready to merge? |
I'm getting some warning during compilation:
Is it ok to have them? |
Not really, can you fill a issue to keep track of them? They don't harm tho, will address them when possible. |
#165 Done! |
@arktrin Thanks 👍 , can we merge this PR? |
Excluding warnings everything seems to work fine. I do think it's ready to be merged. |
Thanks for the reviews @arktrin , something I noticed after updating the offset at runtime is that we don't have a function to clear the display. |
@C47D I've tried to update to latest develop branch and now I've got these errors:
Can't reproduce yesterday's results. What am I doing wrong? |
I merged a PR last Friday into develop and didn't updated the lv_port_esp32 project. Let me do that, sorry for the inconvenience. |
@arktrin Sorry, I was pushing to the wrong remote repo, you should be able to get it working now. |
@C47D Thanks a lot! But with a latest develop now I've got even larger number of errors:
|
Damn, I compiled the project multiple times yesterday and didn't got that much errors, only the first warning. Can you remind me the idf version that you are using? I will move your last message to a new issue to find it more easily. |
Offsets are now handled by LVGL see lvgl/lvgl#2583 ! |
@tore-espressif wow, huge change. |
Yep, still using the offsets you sent previously
Nice, didn't knew this one, thanks for sharing it |
We don't change previous functionality by adding a helper function that sets the user offsets when initializing the display.
Proposal to fix #163