Coder Social home page Coder Social logo

hagl_gd32v_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 (Longan Nano) and ST7789 (TTGO T-Display GD32).

Software License

Usage

To use with an Nuclei SDK project you include this HAL and the HAGL graphics library itself.

$ cd external
$ git submodule add https://github.com/tuupola/hagl_gd32v_mipi.git hagl_hal
$ git submodule add https://github.com/tuupola/hagl.git

Then in your Makefile include the new source and header files.

SRCDIRS = . external/hagl/src external/hagl_hal/src
INCDIRS = . external/hagl/include external/hagl_hal/include

By default the HAL uses single buffering. The buffer is the GRAM of the display driver chip. You can enable double buffering with flags.

COMMON_FLAGS += -DHAGL_HAL_USE_DOUBLE_BUFFER

The default config can be found in hagl_hal.h. Defaults are ok for Longan Nano in vertical mode. You can override settings by including an use config file.

COMMON_FLAGS += -include ./hagl_user_config.h

An example project Makefile which both enables double buffering and overrides default config would look like following:

TARGET = firmware
NUCLEI_SDK_ROOT = ../nuclei-sdk
SRCDIRS = . external/hagl/src external/hagl_hal/src
INCDIRS = . external/hagl/include external/hagl_hal/include
COMMON_FLAGS += -DHAGL_HAL_USE_DOUBLE_BUFFER
COMMON_FLAGS += -include ./hagl_user_config.h

include $(NUCLEI_SDK_ROOT)/Build/Makefile.base

Current stats

/* Single buffered */
61297 PIXELS per second, FB 0 FPS
962 LINES per second, FB 0 FPS
756 CIRCLES per second, FB 0 FPS
279 FILLED CIRCLES per second, FB 0 FPS
492 ELLIPSES per second, FB 0 FPS
100 FILLED ELLIPSES per second, FB 0 FPS
316 TRIANGLES per second, FB 0 FPS
189 FILLED TRIANGLES per second, FB 0 FPS
2295 RECTANGLES per second, FB 0 FPS
230 FILLED RECTANGLES per second, FB 0 FPS
1360 ROUND RECTANGLES per second, FB 0 FPS
223 FILLED ROUND RECTANGLES per second, FB 0 FPS
193 POLYGONS per second, FB 0 FPS
114 FILLED POLYGONS per second, FB 0 FPS
6394 CHARACTERS per second, FB 0 FPS
480 STRINGS per second, FB 0 FPS
33 RGB BARS per second, FB 0 FPS

/* Double buffered */
397087 PIXELS per second, FB 0 FPS
29462 LINES per second, FB 0 FPS
24498 CIRCLES per second, FB 0 FPS
13028 FILLED CIRCLES per second, FB 0 FPS
13252 ELLIPSES per second, FB 0 FPS
5228 FILLED ELLIPSES per second, FB 0 FPS
10316 TRIANGLES per second, FB 0 FPS
548 FILLED TRIANGLES per second, FB 0 FPS
18202 RECTANGLES per second, FB 0 FPS
13733 FILLED RECTANGLES per second, FB 0 FPS
16931 ROUND RECTANGLES per second, FB 0 FPS
12097 FILLED ROUND RECTANGLES per second, FB 0 FPS
6236 POLYGONS per second, FB 0 FPS
327 FILLED POLYGONS per second, FB 0 FPS
33755 CHARACTERS per second, FB 0 FPS
2632 STRINGS per second, FB 0 FPS
2040 RGB BARS per second, FB 0 FPS

License

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

hagl_gd32v_mipi's People

Contributors

gsax avatar tuupola avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.