Git Product home page Git Product logo

hagl_esp_mipi's Introduction

MIPI DCS HAL for HAGL Graphics Library

HAL for HAGL graphics library for display drivers supporting the MIPI Display Command Set. This covers most displays currently used by hobbyists. Tested with ST7735S, ST7789V, ST7789V2, ILI9341, ILI9342C, ILI9163 and GC9107.

Software License

Usage

To use with an ESP-IDF project you include this HAL and the HAGL graphics library itself. If you are using CMake based build the HAL must be in folder named hagl_hal.

$ cd components
$ git submodule add [email protected]:tuupola/hagl_esp_mipi.git hagl_hal
$ git submodule add [email protected]:tuupola/hagl.git

You can alter display behaviour via menuconfig. If you choose to use back buffer all drawing operations will be fast. Downside is that back buffer requires lot of memory. To reduce flickering you can also choose to lock back buffer while flushing. Locking will slow down draw operations though.

$ idf.py menuconfig

You can also use the older GNU Make based build system.

$ make menuconfig

Default configs are provided for popular dev boards. For example to compile for M5Stack do something like the following:

$ cp components/hagl_hal/sdkconfig/m5stack.defaults sdkconfig.defaults
$ idf.py menuconfig

For example usage see ESP GFX, ESP effects and Mandelbrot.

Speed

First table numbers are operations per second with double buffering. Bigger number is better. T-Display and M5StickC have higher numbers because they have smaller resolution. Smaller resolution means less bytes to push to the display.

T4 T-Display M5Stack M5StickC
hagl_put_pixel() 304400 304585 340850 317094
hagl_draw_line() 10485 14942 12145 31293
hagl_draw_circle() 15784 16430 17730 18928
hagl_fill_circle() 8712 9344 9982 13910
hagl_draw_ellipse() 8187 8642 9168 10019
hagl_fill_ellipse() 3132 3457 3605 5590
hagl_draw_triangle() 3581 5137 4160 11186
hagl_fill_triangle() 1246 1993 1654 6119
hagl_draw_rectangle() 22759 30174 26910 64259
hagl_fill_rectangle() 2191 4849 2487 16146
hagl_draw_rounded_rectangle() 17660 21993 20736 39102
hagl_fill_rounded_rectangle() 2059 4446 2313 13270
hagl_draw_polygon() 2155 3096 2494 6763
hagl_fill_polygon() 692 1081 938 3295
hagl_put_char() 29457 29131 32429 27569
hagl_flush() 32 76 32 96

Second table numbers are operations per second with single buffering ie. writing directly to the display controller memory.

T4 T-Display M5Stack M5StickC
hagl_put_pixel() 16041 15252 16044 24067
hagl_draw_line() 113 172 112 289
hagl_draw_circle() 148 173 145 230
hagl_fill_circle() 264 278 261 341
hagl_draw_ellipse() 84 103 85 179
hagl_fill_ellipse() 114 128 116 191
hagl_draw_triangle() 37 54 37 114
hagl_fill_triangle() 72 111 72 371
hagl_draw_rectangle() 2378 2481 2374 3482
hagl_fill_rectangle() 91 146 91 454
hagl_draw_rounded_rectangle() 458 535 459 808
hagl_fill_rounded_rectangle() 87 139 79 400
hagl_draw_polygon() 21 33 19 71
hagl_fill_polygon() 43 66 49 228
hagl_put_char) 4957 4264 4440 2474
hagl_flush() x x x x

You can run the speed tests yourself by checking out the speedtest repository.

License

The MIT License (MIT). Please see License File for more information.

hagl_esp_mipi's People

Contributors

tuupola avatar ynezz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hagl_esp_mipi's Issues

Font support

Have you given any thought to providing support for Truetype fonts. I am using PlatformIO and could not manage to compile it. They do some funny things like using defines to declare the names of include files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.