Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for lcd_bus to make it available for rp2 port:
I have tested it for an ili9341 display with xpt2046 touch via SPI and
an ili9486 display without touch via 16 bit i80 bus.
Main changes:
micropy_updates/common/mp_spi_common.h:
Separate definition for bus/device for ESP32 port and common (other) ports to make it compatible with machine_spi.c in micropy_updates/rp2
ext_mod/lcd_bus/common_include/spi_bus.h and i80_bus.h:
buffer_flags in struct definition, as otherwise the pointers are no more aligned
ext_mod/lcd_bus/common_src/spi_bus.c:
as a spi device is already given to the constructor for the creation of the mp_lcd_spi_bus_obj, I have eliminated that from the
s_spi_init function and use the already existing bus.
Workaround for the different naming for the SPI device inside machine_spi.c and this file
ext_mod/lcd_bus_common_src/i80_bus.c:
NULL pointer in the code for CMD sending eliminated
code for parameter sending corrected for all 4 possible combinations of parameter_bits and bus_width
I tried to compile also for STM32, but it first failed because "LV_USE_TINY_TTF" was redefined. When I corrected that I got many errors like this:
build-STM32F439/lv_mpy.c:36775:17: error: 'mp_lv_funcptr_lv_iter_next_cb' defined but not used [-Werror=unused-function]
36775 | static mp_obj_t mp_lv_funcptr_lv_iter_next_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_next_cb_mpobj, func, NULL, MP_QSTR_, NULL); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
So I gave up. But at least the bitbang i80_bus should work for stm32 too.