Comments (4)
It is probably due my lack of understanding how CMake works but I haven't found out a good way to choose a HAL in compile time. Instead HAGL assumes it to be in the folder hagl_hal
. This is not optimal but I have not had need for a fix myself so the problem has not been fixed.
Also slightly related I am pondering about enabling running several displays (even with different HALs) at the same time. This would require passing a display object to each function call. Something like:
hagl_display_t display;
hagl_init(display);
hagl_put_pixel(display, x0, y0, color);
from hagl.
Yeah I reckon for multiple displays it makes sense to pass in the display as a parameter.
In regards to having conditional builds, I manged to hack something which required no changes to the hagl repo but required some minimal changes to hagl_hal (hagl_esp_mipi)
I attach the patch here - if you like it I can do a PR against hagl_esp_mipi
hagl_hal_external.txt but basically it involves adding a new kconfig that if set doesn't include any of the implementations of the hal, leaving the user of the libraries to provide the implementation. Let me know what you think please!
from hagl.
Thanks I will check it!
from hagl.
Another option I found is that idf_component_register can be called conditionally - so for example in https://github.com/tuupola/hagl_esp_mipi/blob/master/CMakeLists.txt the register could be conditional on a config like CONFIG_HAGL_MIPI_ENABLE or whichever name you think is most appropriate of course.
Would you like me to do a PR for this instead? or provide a PoC?
from hagl.
Related Issues (20)
- Esp8266 support? HOT 5
- Which IDE used ? HOT 1
- Why does text come out so small? HOT 1
- Support for getScreen? HOT 1
- Hex to rgb565
- Unable to set HAGL_CHAR_BUFFER_SIZE from main
- Add HAL for Raspberry Pi Pico VGABOARD HOT 4
- hagl_put_char / hagl_put_text always drawn on black background HOT 4
- [Low prio] Offscreen drawing in a bitmap HOT 3
- Big stack allocations HOT 3
- DISPLAY_DEPTH < 8 HOT 2
- Overflow bug in hagl_scale_blit
- Generating new fonts HOT 6
- Found a dot that is not rendered at bottom right of screen. HOT 2
- is it possible to use HAGL with platformio and arduino framework? HOT 2
- Ability to rotate the display at runtime HOT 1
- Input API? HOT 7
- [Minor] README.md contains 2 "Draw a line" sections
- Include a 8x8 font by default HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hagl.