Once more: esp32, ILI9341 + xpt2046 + sdcard on same spi

Actually… this might be a bug in the LVGL micropython bindings.
I noticed that it tries to convert 64bit integers with mp_obj_new_int/mp_obj_get_int, while the correct functions are probably mp_obj_new_int_from_ll and I’m not sure what is the other one to convert mp integer back to long long.
I’ve opened an issue to track this.

That’s strange.
Macros are not automatically converted, but HSPI/VSPI is handled specially here with an enum, which is converted automatically.

That’s great! I can’t wait until my kids are old enough to wire anything on my projects. Currently they barely wire their own shoe laces…

Both ili and xpt can be configure to work either half duplex or full duplex. There’s a half_duplex argument in the constructor.

I can’t remember seeing anything in the docs that prevents half-duplex and full-duplex coexistence on the same SPI bus. But I think I’ve seen issues (this, this) mentioning problems when mixing half/full duplex. Maybe some esp-idf problem? here is a post in esp forum.

If you provide “-1” to ili miso/mosi/clk, it will not try to initialize the bus. But you need to make sure that whichever code that initializes the bus also sets a large enough max_transfer_sz.
Another option is to let ili initialize the bus and remove the bus initialization code from the sdcard driver.