fbcp-ili9341 icon indicating copy to clipboard operation
fbcp-ili9341 copied to clipboard

Allow setting the some parameters using an environment variable

Open rahul-thakoor opened this issue 3 years ago • 1 comments

https://github.com/juj/fbcp-ili9341/blob/662e8db76ba16d86cf6fd09d85240adc19e62735/display.h#L110

Hello there, For my use case, I am building the fbcp executable once for a specific target display. However, this could be run on different devices which might require setting different SPI_BUS_CLOCK_DIVISOR values to get the right performance. Would it be possible to make it so if the option was not passed at compile time, then we detect if said environment variable is set at runtime, if not then throw error? It would allow not having to recompile the executable everytime. we could run the executable like this for e.g SPI_BUS_CLOCK_DIVISOR=6 ./fbcp-ili934 It might make sense for other parameters too.

Thanks

rahul-thakoor avatar Sep 24 '20 11:09 rahul-thakoor

Sorry, missed this issue from before.

I would recommend building the driver to different build directories for different device. The SPI speed parameter could be configured for runtime use, but it would not be possible to build in different driver backends in the current design.

juj avatar Dec 08 '20 09:12 juj