├── .gitignore ├── LICENSE ├── README.md ├── docs ├── .buildinfo ├── .nojekyll ├── _images │ ├── vga1_16x16.png │ ├── vga1_16x32.png │ ├── vga1_8x16.png │ ├── vga1_8x8.png │ ├── vga1_bold_16x16.png │ ├── vga1_bold_16x32.png │ ├── vga2_16x16.png │ ├── vga2_16x32.png │ ├── vga2_8x16.png │ ├── vga2_8x8.png │ ├── vga2_bold_16x16.png │ └── vga2_bold_16x32.png ├── _modules │ ├── index.html │ └── st7789s3.html ├── _sources │ ├── examples.rst.txt │ ├── fonts.rst.txt │ ├── index.rst.txt │ └── st7789s3.rst.txt ├── _static │ ├── basic.css │ ├── css │ │ ├── badge_only.css │ │ ├── fonts │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── lato-bold-italic.woff │ │ │ ├── lato-bold-italic.woff2 │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-normal-italic.woff │ │ │ ├── lato-normal-italic.woff2 │ │ │ ├── lato-normal.woff │ │ │ └── lato-normal.woff2 │ │ └── theme.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ ├── badge_only.js │ │ ├── html5shiv-printshiv.min.js │ │ ├── html5shiv.min.js │ │ └── theme.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── underscore-1.13.1.js │ ├── underscore.js │ ├── vga1_16x16.png │ ├── vga1_16x32.png │ ├── vga1_8x16.png │ ├── vga1_8x8.png │ ├── vga1_bold_16x16.png │ ├── vga1_bold_16x32.png │ ├── vga2_16x16.png │ ├── vga2_16x32.png │ ├── vga2_8x16.png │ ├── vga2_8x8.png │ ├── vga2_bold_16x16.png │ └── vga2_bold_16x32.png ├── examples.html ├── fonts.html ├── genindex.html ├── index.html ├── objects.inv ├── py-modindex.html ├── search.html ├── searchindex.js └── st7789s3.html ├── examples ├── feathers.py ├── fonts.py ├── hello.py ├── lines.py ├── scroll.py ├── tft_config.py ├── toasters │ ├── imgtobitmap.py │ ├── maketoast │ ├── t1.png │ ├── t1.py │ ├── t2.png │ ├── t2.py │ ├── t3.png │ ├── t3.py │ ├── t4.png │ ├── t4.py │ ├── t5.png │ ├── t5.py │ ├── toasters.bmp │ └── toasters.py └── truetype │ ├── chango.py │ └── noto_fonts.py ├── fonts ├── romfonts │ ├── __init__.py │ ├── vga1_16x16.py │ ├── vga1_16x32.py │ ├── vga1_8x16.py │ ├── vga1_8x8.py │ ├── vga1_bold_16x16.py │ ├── vga1_bold_16x32.py │ ├── vga2_16x16.py │ ├── vga2_16x32.py │ ├── vga2_8x16.py │ ├── vga2_8x8.py │ ├── vga2_bold_16x16.py │ └── vga2_bold_16x32.py └── truetype │ ├── NotoSansMono_32.py │ ├── NotoSans_32.py │ ├── NotoSerif_32.py │ ├── __init__.py │ ├── chango_16.py │ ├── chango_32.py │ └── chango_64.py ├── lib ├── __init__.py └── st7789s3.py ├── sphinx ├── Makefile ├── requires.txt └── source │ ├── _static │ ├── vga1_16x16.png │ ├── vga1_16x32.png │ ├── vga1_8x16.png │ ├── vga1_8x8.png │ ├── vga1_bold_16x16.png │ ├── vga1_bold_16x32.png │ ├── vga2_16x16.png │ ├── vga2_16x32.png │ ├── vga2_8x16.png │ ├── vga2_8x8.png │ ├── vga2_bold_16x16.png │ └── vga2_bold_16x32.png │ ├── conf.py │ ├── examples.rst │ ├── fonts.rst │ ├── index.rst │ ├── romfont.py │ ├── st7789s3.rst │ └── truetype.py └── utils ├── font2bitmap.py ├── font_from_romfont.py ├── imgtobitmap.py ├── png_from_font.py └── sprites2bitmap.py /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .idea 3 | __pycache__ 4 | *~ 5 | *.pyc 6 | *.o 7 | *.P 8 | .history 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Ivan Belokobylskiy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Python T-Display-S3 ST7789 driver for MicroPython 2 | ================================================= 3 | 4 | This driver is a quick hack to get the ST7789 display working on the T-Display-S3 board. 5 | It is based on devbis' st7789py_mpy module from https://github.com/devbis/st7789py_mpy. 6 | 7 | This driver adds support for: 8 | 9 | - 320x240, 170x320, 240x240 and 135x240 pixel displays 10 | - Display rotation 11 | - Hardware based scrolling 12 | - Drawing text using 8 and 16 bit wide bitmap fonts with heights that are 13 | multiples of 8. Included are 12 bitmap fonts derived from classic pc 14 | BIOS text mode fonts. 15 | - Drawing text using converted TrueType fonts. 16 | - Drawing converted bitmaps 17 | - Parallel interface. 18 | 19 | 20 | This is a work in progress. Documentation can be found in the docs directory 21 | and at https://penfold.owt.com/st7789s3. 22 | 23 | 24 | Examples 25 | -------- 26 | 27 | See the examples directory for example programs that run on the LILYGO® TTGO T-Display-S3. 28 | The example programs require the tft_config.py module to be present. 29 | 30 | Fonts 31 | ----- 32 | 33 | See the subdirectories in the fonts directory for the converted font modules 34 | used in the examples. These modules can be compiled using the mpy-cross 35 | compiler before uploading to save memory. 36 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: f876fee880e8dea6b14124c6c4c350c4 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_images/vga1_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga1_16x16.png -------------------------------------------------------------------------------- /docs/_images/vga1_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga1_16x32.png -------------------------------------------------------------------------------- /docs/_images/vga1_8x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga1_8x16.png -------------------------------------------------------------------------------- /docs/_images/vga1_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga1_8x8.png -------------------------------------------------------------------------------- /docs/_images/vga1_bold_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga1_bold_16x16.png -------------------------------------------------------------------------------- /docs/_images/vga1_bold_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga1_bold_16x32.png -------------------------------------------------------------------------------- /docs/_images/vga2_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga2_16x16.png -------------------------------------------------------------------------------- /docs/_images/vga2_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga2_16x32.png -------------------------------------------------------------------------------- /docs/_images/vga2_8x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga2_8x16.png -------------------------------------------------------------------------------- /docs/_images/vga2_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga2_8x8.png -------------------------------------------------------------------------------- /docs/_images/vga2_bold_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga2_bold_16x16.png -------------------------------------------------------------------------------- /docs/_images/vga2_bold_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_images/vga2_bold_16x32.png -------------------------------------------------------------------------------- /docs/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview: module code — st7789s3 0.1.0 documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 66 | 67 |
71 | 72 |
73 | 107 |
108 |
109 |
110 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /docs/_sources/examples.rst.txt: -------------------------------------------------------------------------------- 1 | **************** 2 | Example Programs 3 | **************** 4 | 5 | These examples run on the LilyGo TTGO T-Display-S3 available from the usual 6 | locations. See https://github.com/Xinyuan-LilyGO/T-Display-S3 for more 7 | information. 8 | 9 | 10 | lines.py 11 | -------- 12 | 13 | .. literalinclude:: ../../examples/lines.py 14 | :linenos: 15 | :language: python 16 | 17 | 18 | hello.py 19 | -------- 20 | 21 | .. literalinclude:: ../../examples/hello.py 22 | :linenos: 23 | :language: python 24 | 25 | feathers.py 26 | ----------- 27 | 28 | .. literalinclude:: ../../examples/feathers.py 29 | :linenos: 30 | :language: python 31 | 32 | 33 | fonts.py 34 | -------- 35 | 36 | .. literalinclude:: ../../examples/fonts.py 37 | :linenos: 38 | :language: python 39 | 40 | 41 | scroll.py 42 | --------- 43 | 44 | .. literalinclude:: ../../examples/scroll.py 45 | :linenos: 46 | :language: python 47 | 48 | 49 | toasters.py 50 | ----------- 51 | 52 | Flying toasters sprite demo using bitmaps created from spritesheet using the imgtobitmap.py utility. 53 | See the maketoast script in the utils directory for details. See the 320x240 toasters example for 54 | a more advanced example that uses the sprites2bitmap utility and indexed bitmaps. 55 | 56 | .. literalinclude:: ../../examples/toasters/toasters.py 57 | :linenos: 58 | :language: python 59 | 60 | 61 | chango.py 62 | --------- 63 | 64 | Test for font2bitmap converter for the driver. 65 | See the font2bitmap program in the utils directory. 66 | 67 | .. literalinclude:: ../../examples/truetype/chango.py 68 | :linenos: 69 | :language: python 70 | 71 | 72 | noto_fonts.py 73 | ------------- 74 | 75 | Test for font2bitmap converter for the driver. 76 | See the font2bitmap program in the utils directory. 77 | 78 | .. literalinclude:: ../../examples/truetype/noto_fonts.py 79 | :linenos: 80 | :language: python 81 | 82 | -------------------------------------------------------------------------------- /docs/_sources/fonts.rst.txt: -------------------------------------------------------------------------------- 1 | Fonts 2 | ===== 3 | 4 | Two type of fonts are supported by this driver fixed size bitmap fonts 5 | converted from PC Bios images using the font_from_romfont utility and fixed or proportional fonts converted from True-Type fonts using the font2bitmap utility. 6 | 7 | The rom fonts are available in 128 and 256 PC character sets in 8x8, 8x16, 16x6 and 16x32 pixel sizes. They written using the text method. 8 | 9 | The True-Type fonts can be converted to any size as long as the widest 10 | character is 256 pixels or less. They are written using the write method. 11 | 12 | Pre-compiling the font files to .mpy files will significantly reduce the memory required for the fonts. 13 | 14 | Rom Font Conversion 15 | ------------------- 16 | 17 | The `utils` directory contains the font_from_romfont.py program used to convert PC BIOS bitmap fonts from the font-bin directory of spacerace's 18 | https://github.com/spacerace/romfont repo. 19 | 20 | The utility converts all romfont bin files in the specified -input-directory (-i) and writes python font files to the specified -output-directory (-o). 21 | 22 | Characters included can be limited by using the -first-char (-f) and -last-char (-l) options. 23 | 24 | Example: 25 | 26 | font_from_romfont -i font-bin -o fonts -f 32 -l 127 27 | 28 | 29 | .. literalinclude:: romfont.py 30 | :linenos: 31 | :language: python 32 | :caption: Sample converted romfont font module. 33 | 34 | 35 | True-Type Font Conversion 36 | ------------------------- 37 | 38 | The `utils` directory contains the `font2bitmap.py` program used to convert True-Type font into bitmap font modules. Use the -h option to see details of the available options. The `font2bitmap.py` program uses font handling classes from Dan Bader blog post on using freetype 39 | http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python and 40 | the negative glyph.left fix from peterhinch's font conversion program 41 | https://github.com/peterhinch/micropython-font-to-py. 42 | 43 | The utility requires the python freetype module. 44 | 45 | Example use: 46 | 47 | - ./font2bitmap NotoSans-Regular.ttf 32 -s "0123456789ABCEDF" 48 | - ./font2bitmap.py Chango-Regular.ttf 16 -c 0x20-0x7f 49 | 50 | 51 | .. literalinclude:: truetype.py 52 | :linenos: 53 | :language: python 54 | :caption: Sample converted TrueType font module. 55 | 56 | 57 | 58 | 8x8 Rom Fonts 59 | ------------- 60 | 61 | .. figure:: _static/vga1_8x8.png 62 | :align: center 63 | 64 | vga1_8x8.py: 128 Character 8x8 Font 65 | 66 | | 67 | 68 | .. figure:: _static/vga2_8x8.png 69 | :align: center 70 | 71 | vga2_8x8.py: 256 Character 8x8 Font 72 | 73 | | 74 | 75 | 8x16 Rom Fonts 76 | -------------- 77 | 78 | .. figure:: _static/vga1_8x16.png 79 | :align: center 80 | 81 | vga1_8x16.py: 128 Character 8x16 Font 82 | 83 | | 84 | 85 | .. figure:: _static/vga2_8x16.png 86 | :align: center 87 | 88 | vga2_8x16.py: 256 Character 8x16 Font 89 | 90 | | 91 | 92 | 16x16 Rom Fonts 93 | --------------- 94 | 95 | .. figure:: _static/vga1_16x16.png 96 | :align: center 97 | 98 | vga1_16x16.py: 128 Character 16x16 Thin Font 99 | 100 | | 101 | 102 | .. figure:: _static/vga1_bold_16x16.png 103 | :align: center 104 | 105 | vga1_bold_16x16.py: 128 Character 16x16 Bold Font 106 | 107 | | 108 | 109 | .. figure:: _static/vga2_16x16.png 110 | :align: center 111 | 112 | vga2_16x16.py: 256 Character 16x16 Thin Font 113 | 114 | | 115 | 116 | .. figure:: _static/vga2_bold_16x16.png 117 | :align: center 118 | 119 | vga2_bold_16x16.py: 256 Character 16x16 Bold Font 120 | 121 | | 122 | 123 | 16x32 Rom Fonts 124 | --------------- 125 | 126 | .. figure:: _static/vga1_16x32.png 127 | :align: center 128 | 129 | vga1_16x32.py: 128 Character 16x32 Thin Font 130 | 131 | | 132 | 133 | .. figure:: _static/vga1_bold_16x32.png 134 | :align: center 135 | 136 | vga1_bold_16x32.py: 128 Character 16x32 Bold Font 137 | 138 | | 139 | 140 | .. figure:: _static/vga2_16x32.png 141 | :align: center 142 | 143 | vga2_16x32.py: 256 Character 16x32 Thin Font 144 | 145 | | 146 | 147 | .. figure:: _static/vga2_bold_16x32.png 148 | :align: center 149 | 150 | vga2_bold_16x32.py: 256 Character 16x32 Bold Font 151 | 152 | | 153 | -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | st7789s3 Driver 2 | =============== 3 | 4 | st7789 tft driver in MicroPython based on devbis' st7789py_mpy module from 5 | https://github.com/devbis/st7789py_mpy. 6 | 7 | I added support for display rotation, scrolling and drawing text using 8 and 16 8 | bit wide bitmap fonts with heights that are multiples of 8. Included are 12 9 | bitmap fonts derived from classic pc text mode fonts. 10 | 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | :caption: Contents: 15 | 16 | self 17 | st7789s3 18 | examples 19 | fonts 20 | 21 | Index 22 | ===== 23 | 24 | * :ref:`genindex` 25 | -------------------------------------------------------------------------------- /docs/_sources/st7789s3.rst.txt: -------------------------------------------------------------------------------- 1 | st7789s3 Reference 2 | ================== 3 | 4 | .. automodule:: st7789s3 5 | :members: 6 | -------------------------------------------------------------------------------- /docs/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '0.1.0', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false, 12 | SHOW_SEARCH_SUMMARY: true, 13 | ENABLE_SEARCH_SHORTCUTS: true, 14 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | 201 | 202 | 203 | var splitChars = (function() { 204 | var result = {}; 205 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 206 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 207 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 208 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 209 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 210 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 211 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 212 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 213 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 214 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; 215 | var i, j, start, end; 216 | for (i = 0; i < singles.length; i++) { 217 | result[singles[i]] = true; 218 | } 219 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], 220 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], 221 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], 222 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], 223 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], 224 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], 225 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], 226 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], 227 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], 228 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], 229 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], 230 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], 231 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], 232 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], 233 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], 234 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], 235 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], 236 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], 237 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], 238 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], 239 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], 240 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], 241 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], 242 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], 243 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], 244 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], 245 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], 246 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], 247 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], 248 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], 249 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], 250 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], 251 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], 252 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], 253 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], 254 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], 255 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], 256 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], 257 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], 258 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], 259 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], 260 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], 261 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], 262 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], 263 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], 264 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], 265 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], 266 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], 267 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; 268 | for (i = 0; i < ranges.length; i++) { 269 | start = ranges[i][0]; 270 | end = ranges[i][1]; 271 | for (j = start; j <= end; j++) { 272 | result[j] = true; 273 | } 274 | } 275 | return result; 276 | })(); 277 | 278 | function splitQuery(query) { 279 | var result = []; 280 | var start = -1; 281 | for (var i = 0; i < query.length; i++) { 282 | if (splitChars[query.charCodeAt(i)]) { 283 | if (start !== -1) { 284 | result.push(query.slice(start, i)); 285 | start = -1; 286 | } 287 | } else if (start === -1) { 288 | start = i; 289 | } 290 | } 291 | if (start !== -1) { 292 | result.push(query.slice(start)); 293 | } 294 | return result; 295 | } 296 | 297 | 298 | -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #f8f8f8; } 8 | .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #9C6500 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #E40000 } /* Generic.Error */ 21 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 22 | .highlight .gi { color: #008400 } /* Generic.Inserted */ 23 | .highlight .go { color: #717171 } /* Generic.Output */ 24 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 25 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 26 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 28 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 29 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 30 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 31 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 32 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 33 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 34 | .highlight .m { color: #666666 } /* Literal.Number */ 35 | .highlight .s { color: #BA2121 } /* Literal.String */ 36 | .highlight .na { color: #687822 } /* Name.Attribute */ 37 | .highlight .nb { color: #008000 } /* Name.Builtin */ 38 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 39 | .highlight .no { color: #880000 } /* Name.Constant */ 40 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 41 | .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ 42 | .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ 43 | .highlight .nf { color: #0000FF } /* Name.Function */ 44 | .highlight .nl { color: #767600 } /* Name.Label */ 45 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 46 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 47 | .highlight .nv { color: #19177C } /* Name.Variable */ 48 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 49 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 50 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 51 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 52 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 53 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 54 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 55 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 56 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 57 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 58 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 59 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 60 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 61 | .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ 62 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 63 | .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ 64 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 65 | .highlight .sr { color: #A45A77 } /* Literal.String.Regex */ 66 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 67 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 68 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 69 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 70 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 71 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 72 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 73 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 74 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/vga1_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga1_16x16.png -------------------------------------------------------------------------------- /docs/_static/vga1_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga1_16x32.png -------------------------------------------------------------------------------- /docs/_static/vga1_8x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga1_8x16.png -------------------------------------------------------------------------------- /docs/_static/vga1_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga1_8x8.png -------------------------------------------------------------------------------- /docs/_static/vga1_bold_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga1_bold_16x16.png -------------------------------------------------------------------------------- /docs/_static/vga1_bold_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga1_bold_16x32.png -------------------------------------------------------------------------------- /docs/_static/vga2_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga2_16x16.png -------------------------------------------------------------------------------- /docs/_static/vga2_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga2_16x32.png -------------------------------------------------------------------------------- /docs/_static/vga2_8x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga2_8x16.png -------------------------------------------------------------------------------- /docs/_static/vga2_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga2_8x8.png -------------------------------------------------------------------------------- /docs/_static/vga2_bold_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga2_bold_16x16.png -------------------------------------------------------------------------------- /docs/_static/vga2_bold_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/_static/vga2_bold_16x32.png -------------------------------------------------------------------------------- /docs/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Index — st7789s3 0.1.0 documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 66 | 67 |
71 | 72 |
73 | 272 |
273 |
274 |
275 | 280 | 281 | 282 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | st7789s3 Driver — st7789s3 0.1.0 documentation 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 68 | 69 |
73 | 74 |
75 | 151 |
152 |
153 |
154 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/docs/objects.inv -------------------------------------------------------------------------------- /docs/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Python Module Index — st7789s3 0.1.0 documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 73 | 74 |
78 | 79 |
80 | 129 |
130 |
131 |
132 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search — st7789s3 0.1.0 documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 69 | 70 |
74 | 75 |
76 | 119 |
120 |
121 |
122 | 127 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /docs/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({docnames:["examples","fonts","index","st7789s3"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["examples.rst","fonts.rst","index.rst","st7789s3.rst"],objects:{"":[[3,0,0,"-","st7789s3"]],"st7789s3.ST7789":[[3,2,1,"","bitmap"],[3,2,1,"","blit_buffer"],[3,2,1,"","fill"],[3,2,1,"","fill_rect"],[3,2,1,"","hard_reset"],[3,2,1,"","hline"],[3,2,1,"","inversion_mode"],[3,2,1,"","line"],[3,2,1,"","pixel"],[3,2,1,"","rect"],[3,2,1,"","rotation"],[3,2,1,"","sleep_mode"],[3,2,1,"","soft_reset"],[3,2,1,"","text"],[3,2,1,"","vline"],[3,2,1,"","vscrdef"],[3,2,1,"","vscsad"],[3,2,1,"","write"],[3,2,1,"","write_width"]],st7789s3:[[3,1,1,"","ST7789"],[3,3,1,"","color565"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"0":[0,3],"01":[0,3],"0123456789":1,"0123456789abcedf":1,"02x":0,"0x20":1,"0x7f":1,"1":[0,1,3],"10":0,"100":0,"12":[2,3],"127":1,"128":1,"135":0,"135x240":3,"16":[0,1,2,3],"160":0,"16x16":2,"16x32":2,"16x6":1,"17":1,"170":0,"170x320":3,"2":[0,1,3],"2019":3,"2020":3,"2021":3,"2022":3,"24":1,"240":3,"255":[0,3],"256":[0,1],"280":3,"3":[0,3],"32":1,"320":0,"320x240":0,"4":0,"40":3,"5":0,"565":[0,3],"6":0,"64":0,"8":[0,1,2,3],"80":0,"85":0,"8x16":2,"8x8":2,"9":0,"byte":[1,3],"char":[0,1],"class":[0,1,3],"const":3,"default":3,"do":3,"import":0,"int":[0,3],"long":1,"new":0,"return":[0,3],"true":[0,2,3],"while":0,A:3,AND:3,AS:3,BE:3,BUT:3,FOR:3,IN:3,IS:3,NO:3,NOT:3,OF:3,OR:3,THE:3,TO:3,The:[0,1,3],There:3,These:0,To:3,WITH:3,_:[0,1],__init__:0,_bitmap:1,_font:1,_offset:1,_width:1,abcd:0,abcdefghij:0,abcdefghijklmnopqrst:0,abcdefghijklmnopqrstuvwxyz:1,abov:3,across:0,action:3,ad:2,adafruit:0,add:3,address:3,advanc:0,after:3,all:[0,1,3],along:0,an:[0,3],ani:[1,3],anim:0,antialias:1,ar:[1,2,3],area:[0,3],aris:3,associ:3,author:3,avail:[0,1],b:1,background:3,backlight:3,bader:1,base:[2,3],belokobylskii:3,between:0,bfa:[0,3],bg:3,big:0,bin:1,bio:[1,3],bit:[1,2,3],bitmap:[0,1,2,3],bitmap_modul:3,black:[0,3],blit_buff:3,blog:1,blue:[0,3],bold:1,bool:3,bottom:[0,3],boundari:1,bpp:1,bu:3,buffer:3,c:[1,3],can:1,center:0,chang:3,chango:[1,2],chango_16:0,chango_32:0,chango_64:0,charact:[0,1,3],charg:3,choos:0,chr:0,circuitpython:0,circuitpython_flying_toast:0,claim:3,classic:[2,3],clear:0,cloud:0,co:0,code:1,col:0,col_max:0,collect:0,color565:[0,3],color:[0,1,3],color_wheel:0,column:[0,3],com:[0,1,2,3],compil:1,condit:3,config:0,connect:3,contain:[1,3],contract:3,convers:2,convert:[0,1,3],coordin:3,copi:3,copyright:3,corner:3,could:[1,3],counter:0,cover:3,creat:0,cs:3,current:1,current_i:0,curv:0,d0:3,d1:3,d2:3,d3:3,d4:3,d5:3,d6:3,d7:3,damag:3,dan:1,data:[1,3],dbader:1,dc:3,deal:3,def:0,defin:3,definit:3,demo:0,deriv:[2,3],detail:[0,1],devbi:[2,3],directori:[0,1],disabl:3,dislai:0,displai:[0,2,3],dist:0,distribut:3,document:3,draw:[0,2,3],driver:[0,1,3],each:1,effect:0,els:0,enabl:[0,3],encod:3,end:3,entir:3,enumer:0,event:3,exampl:[1,2,3],exce:0,express:3,f:1,fals:3,feather:2,fg:3,file:[1,3],fill:[0,3],fill_rect:[0,3],first:[0,1,3],fit:3,fix:[1,3],fly:0,follow:3,font1:0,font2:0,font2bitmap:[0,1],font3:0,font4:0,font:[2,3],font_16:0,font_32:0,font_64:0,font_from_romfont:1,foreground:3,format:0,four:0,frame:3,framebuff:3,free:[0,3],freetyp:1,from:[0,1,2,3],front:1,furnish:3,futur:1,gc:0,get:0,getrandbit:0,github:[0,1,2,3],given:[0,3],glyph:1,grant:3,green:[0,3],h:[1,3],half:0,handl:1,hard:3,hard_reset:3,hardwar:3,height:[0,1,2,3],hello:2,herebi:3,hline:3,holder:3,horizont:3,http:[0,1,2,3],hugh:3,i:[0,1,2],imag:1,imgtobitmap:0,impli:3,includ:[1,2,3],incorpor:3,increas:1,increment:0,index:[0,3],inform:0,initi:0,input:1,interv:0,invers:3,inversion_mod:3,invert:3,ivan:3,keep:0,kind:3,l:1,landscap:3,last:[0,1,3],last_i:0,last_lin:0,learn:0,left:[0,1,3],len:0,length:3,less:1,liabil:3,liabl:3,licens:3,lilygo:0,limit:[1,3],line:[1,2,3],locat:[0,3],locaton:0,machin:0,mai:1,main:0,maketoast:0,man:0,mani:1,map:1,mario:0,math:0,max:1,max_width:1,measur:3,memori:[1,3],memoryview:1,merchant:3,merg:3,method:1,micropython:[1,2,3],mirror:0,mit:3,mode:[2,3],modifi:3,modul:[1,2,3],monochrom:1,more:[0,1,3],move:0,mpy:1,multipl:[2,3],name:0,neg:1,next:0,none:3,noninfring:3,note:1,notic:3,noto:0,noto_font:2,noto_mono:0,noto_san:0,noto_serif:0,notosan:[0,1],notosans_32:0,notosansmono:0,notosansmono_32:0,notoserif:0,notoserif_32:0,number:1,o:1,obtain:3,off:3,offset:[0,1],offset_width:1,one:1,onli:1,option:[1,3],order:1,org:1,other:3,otherwis:3,out:3,output:1,overflow:0,page:0,paramet:3,particular:3,pc:[1,2,3],pendant:0,per:[0,1],permiss:3,permit:3,person:3,peterhinch:1,pi:0,pin:[0,3],pixel:[0,1,3],point:[0,3],portion:3,portrait:3,posit:0,post:1,pre:1,program:[1,2],proport:1,provid:3,publish:3,purpos:3,py:[1,2],python:1,rainbow:0,ram:3,randint:0,random:0,rang:[0,3],rd:3,read:3,rect:3,rectangl:[0,3],red:[0,3],reduc:1,refer:2,regular:1,render:1,repo:1,requir:[1,3],reset:[0,3],restrict:3,right:[0,3],rom:2,romfont:1,rotat:[0,2,3],row:[0,3],row_max:0,run:0,russ:3,s3:[0,3],s:[0,1,3],same:[1,3],sampl:1,save:0,screen:0,script:0,scroll:[2,3],second:0,see:[0,1],segment:0,self:0,sell:3,set:[0,1,3],shall:3,should:3,show:0,shown:3,significantli:1,singl:3,size:[1,3],sleep:[0,3],sleep_mod:3,smooth:1,smoothli:0,so:3,soft:3,soft_reset:3,softwar:3,sourc:3,spacerac:1,specifi:[1,3],speed:0,spite:0,sprite:0,sprites2bitmap:0,spritesheet:0,st7789:[0,2,3],st7789py_mpi:[2,3],st7789s3:0,start:[0,1,3],step:0,str:3,string:[0,1,3],subject:3,sublicens:3,substanti:3,support:[1,2,3],t1:0,t2:0,t3:0,t4:0,t5:0,t:[0,3],tabl:1,term:3,test:0,text:[0,1,2,3],tfa:[0,3],tfb:0,tft:[0,2,3],tft_config:0,thei:1,them:3,thi:[1,3],thin:1,third:0,three:0,through:0,toast:0,toaster:2,top:[0,3],tort:3,track:0,truetyp:[1,3],ttf:1,ttgo:0,tween:0,two:1,type:[0,2,3],under:3,up:0,us:[0,1,2,3],usual:0,utf:1,util:[0,1],utim:[0,3],valu:[0,3],vertic:3,vga1_16x16:[0,1],vga1_16x32:[0,1],vga1_8x16:[0,1],vga1_8x8:[0,1],vga1_bold_16x16:[0,1],vga1_bold_16x32:[0,1],vga2_16x16:[0,1],vga2_16x32:[0,1],vga2_8x16:[0,1],vga2_8x8:[0,1],vga2_bold_16x16:[0,1],vga2_bold_16x32:[0,1],vga_8x8:1,view:3,vline:[0,3],vsa:3,vscrdef:[0,3],vscsad:[0,3],vssa:3,w:3,wa:3,warranti:3,were:0,wheel:0,when:0,whether:3,which:3,white:[0,3],whom:3,wide:[2,3],widest:1,width:[0,1,3],without:3,work:3,wr:3,write:[0,1,3],write_width:[0,3],written:[1,3],x00:1,x01:1,x02:1,x03:1,x04:1,x06:1,x08:1,x09:1,x0:3,x0a:1,x0b:1,x0c:1,x0d:1,x0e:1,x10:1,x12:1,x18:1,x1:3,x24:1,x38:1,x3c:1,x3d:1,x49:1,x4a:1,x4b:1,x4c:1,x4d:1,x4e:1,x61:1,x63:1,x66:1,x6c:1,x70:1,x71:1,x76:1,x7e:1,x86:1,x90:1,x91:1,x94:1,x98:1,x:[0,3],x_offset:0,xc6:1,xdc:1,xe3:1,xee:1,xf7:1,xf8:1,xfb:1,xfc:1,xfe:1,xinyuan:0,y0:3,y1:3,y:[0,3],you:3},titles:["Example Programs","Fonts","st7789s3 Driver","st7789s3 Reference"],titleterms:{"16x16":1,"16x32":1,"8x16":1,"8x8":1,"true":1,chango:0,content:2,convers:1,driver:2,exampl:0,feather:0,font:[0,1],hello:0,index:2,line:0,noto_font:0,program:0,py:0,refer:3,rom:1,scroll:0,st7789s3:[2,3],toaster:0,type:1}}) -------------------------------------------------------------------------------- /examples/feathers.py: -------------------------------------------------------------------------------- 1 | """ 2 | feathers.py 3 | 4 | Smoothly scroll mirrored rainbow colored random curves across the display. 5 | 6 | """ 7 | 8 | import random 9 | import math 10 | import utime 11 | from machine import Pin 12 | import st7789s3 as st7789 13 | import tft_config 14 | 15 | def between(left, right, along): 16 | """returns a point along the curve from left to right""" 17 | dist = (1 - math.cos(along * math.pi)) / 2 18 | return left * (1 - dist) + right * dist 19 | 20 | 21 | def color_wheel(position): 22 | """returns a 565 color from the given position of the color wheel""" 23 | position = (255 - position) % 255 24 | 25 | if position < 85: 26 | return st7789.color565(255 - position * 3, 0, position * 3) 27 | 28 | if position < 170: 29 | position -= 85 30 | return st7789.color565(0, position * 3, 255 - position * 3) 31 | 32 | position -= 170 33 | return st7789.color565(position * 3, 255 - position * 3, 0) 34 | 35 | 36 | def main(): 37 | ''' 38 | The big show! 39 | ''' 40 | #enable display and clear screen 41 | 42 | tft = tft_config.config(1) 43 | 44 | height = tft.height # height of display in pixels 45 | width = tft.width # width if display in pixels 46 | 47 | tfa = tft_config.TFA # top free area when scrolling 48 | bfa = tft_config.BFA # bottom free area when scrolling 49 | 50 | scroll = 0 # scroll position 51 | wheel = 0 # color wheel position 52 | 53 | tft.vscrdef(tfa, width, bfa) # set scroll area 54 | tft.vscsad(scroll + tfa) # set scroll position 55 | tft.fill(st7789.BLACK) # clear screen 56 | 57 | half = (height >> 1) - 1 # half the height of the dislay 58 | interval = 0 # steps between new points 59 | increment = 0 # increment per step 60 | counter = 1 # step counter, overflow to start 61 | current_y = 0 # current_y value (right point) 62 | last_y = 0 # last_y value (left point) 63 | 64 | # segment offsets 65 | x_offsets = [x * (width // 8) -1 for x in range(2,9)] 66 | 67 | while True: 68 | # when the counter exceeds the interval, save current_y to last_y, 69 | # choose a new random value for current_y between 0 and 1/2 the 70 | # height of the display, choose a new random interval then reset 71 | # the counter to 0 72 | 73 | if counter > interval: 74 | last_y = current_y 75 | current_y = random.randint(0, half) 76 | counter = 0 77 | interval = random.randint(10, 100) 78 | increment = 1/interval # increment per step 79 | 80 | # clear the first column of the display and scroll it 81 | tft.vline(scroll, 0, height, st7789.BLACK) 82 | tft.vscsad(scroll + tfa) 83 | 84 | # get the next point between last_y and current_y 85 | tween = int(between(last_y, current_y, counter * increment)) 86 | 87 | # draw mirrored pixels across the display at the offsets using the color_wheel effect 88 | for i, x_offset in enumerate(x_offsets): 89 | tft.pixel((scroll + x_offset) % width, half + tween, color_wheel(wheel+(i<<2))) 90 | tft.pixel((scroll + x_offset) % width, half - tween, color_wheel(wheel+(i<<2))) 91 | 92 | # increment scroll, counter, and wheel 93 | scroll = (scroll + 1) % width 94 | wheel = (wheel + 1) % 256 95 | counter += 1 96 | 97 | 98 | main() 99 | -------------------------------------------------------------------------------- /examples/fonts.py: -------------------------------------------------------------------------------- 1 | """ 2 | fonts.py 3 | 4 | Pages through all characters of four fonts on the display. 5 | 6 | """ 7 | import utime 8 | import st7789s3 as st7789 9 | import tft_config 10 | 11 | # Choose fonts 12 | 13 | # import vga1_8x8 as font 14 | import vga2_8x8 as font1 15 | # import vga1_8x16 as font 16 | import vga2_8x16 as font2 17 | # import vga1_16x16 as font 18 | # import vga1_bold_16x16 as font 19 | # import vga2_16x16 as font 20 | import vga2_bold_16x16 as font3 21 | # import vga1_16x32 as font 22 | # import vga1_bold_16x32 as font 23 | # import vga2_16x32 as font 24 | import vga2_bold_16x32 as font4 25 | 26 | 27 | def main(): 28 | tft = tft_config.config(0) 29 | tft.vscrdef(tft_config.TFA, 320, tft_config.BFA) 30 | 31 | while True: 32 | for font in (font1, font2, font3, font4): 33 | tft.fill(st7789.BLUE) 34 | line = 0 35 | col = 0 36 | 37 | for char in range(font.FIRST, font.LAST): 38 | tft.text(font, chr(char), col, line, st7789.WHITE, st7789.BLUE) 39 | col += font.WIDTH 40 | if col > tft.width - font.WIDTH: 41 | col = 0 42 | line += font.HEIGHT 43 | 44 | if line > tft.height-font.HEIGHT: 45 | utime.sleep(3) 46 | tft.fill(st7789.BLUE) 47 | line = 0 48 | col = 0 49 | 50 | utime.sleep(3) 51 | 52 | 53 | main() 54 | -------------------------------------------------------------------------------- /examples/hello.py: -------------------------------------------------------------------------------- 1 | """ 2 | hello.py 3 | 4 | Writes "Hello!" in random colors at random locations on the display. 5 | 6 | """ 7 | import random 8 | import st7789s3 as st7789 9 | import tft_config 10 | 11 | # Choose a font 12 | 13 | # import vga1_8x8 as font 14 | # import vga2_8x8 as font 15 | # import vga1_8x16 as font 16 | # import vga2_8x16 as font 17 | # import vga1_16x16 as font 18 | # import vga1_bold_16x16 as font 19 | # import vga2_16x16 as font 20 | # import vga2_bold_16x16 as font 21 | # import vga1_16x32 as font 22 | # import vga1_bold_16x32 as font 23 | # import vga2_16x32 as font 24 | import vga2_bold_16x32 as font 25 | 26 | 27 | def main(): 28 | tft = tft_config.config(0) 29 | 30 | while True: 31 | for rotation in range(4): 32 | tft.rotation(rotation) 33 | tft.fill(0) 34 | col_max = tft.width - font.WIDTH*6 35 | row_max = tft.height - font.HEIGHT 36 | 37 | for _ in range(100): 38 | tft.text( 39 | font, 40 | "Hello!", 41 | random.randint(0, col_max), 42 | random.randint(0, row_max), 43 | st7789.color565( 44 | random.getrandbits(8), 45 | random.getrandbits(8), 46 | random.getrandbits(8)), 47 | st7789.color565( 48 | random.getrandbits(8), 49 | random.getrandbits(8), 50 | random.getrandbits(8)) 51 | ) 52 | 53 | 54 | main() 55 | -------------------------------------------------------------------------------- /examples/lines.py: -------------------------------------------------------------------------------- 1 | """ 2 | lines.py 3 | 4 | Draws lines and rectangles in random colors at random locations on the 5 | display. 6 | 7 | """ 8 | import random 9 | import st7789s3 as st7789 10 | import tft_config 11 | 12 | 13 | def main(): 14 | tft = tft_config.config(0) 15 | tft.fill(st7789.BLACK) 16 | 17 | while True: 18 | tft.line( 19 | random.randint(0, tft.width), 20 | random.randint(0, tft.height), 21 | random.randint(0, tft.width), 22 | random.randint(0, tft.height), 23 | st7789.color565( 24 | random.getrandbits(8), 25 | random.getrandbits(8), 26 | random.getrandbits(8) 27 | ) 28 | ) 29 | 30 | width = random.randint(0, tft.width // 2) 31 | height = random.randint(0, tft.height // 2) 32 | col = random.randint(0, tft.width - width) 33 | row = random.randint(0, tft.height - height) 34 | tft.fill_rect( 35 | col, 36 | row, 37 | width, 38 | height, 39 | st7789.color565( 40 | random.getrandbits(8), 41 | random.getrandbits(8), 42 | random.getrandbits(8) 43 | ) 44 | ) 45 | 46 | 47 | main() 48 | -------------------------------------------------------------------------------- /examples/scroll.py: -------------------------------------------------------------------------------- 1 | """ 2 | scroll.py 3 | 4 | Smoothly scrolls all font characters up the screen on the display. 5 | 6 | """ 7 | import utime 8 | import random 9 | import st7789s3 as st7789 10 | import tft_config 11 | 12 | # choose a font 13 | 14 | # import vga1_8x8 as font 15 | # import vga2_8x8 as font 16 | # import vga1_8x16 as font 17 | # import vga2_8x16 as font 18 | # import vga1_16x16 as font 19 | # import vga1_bold_16x16 as font 20 | # import vga2_16x16 as font 21 | import vga2_bold_16x16 as font 22 | 23 | 24 | def main(): 25 | tft = tft_config.config(0) 26 | last_line = tft.height - font.HEIGHT 27 | tfa = tft_config.TFA 28 | tfb = tft_config.BFA 29 | tft.vscrdef(tfa, 320, tfb) 30 | 31 | tft.fill(st7789.BLUE) 32 | scroll = 0 33 | character = 0 34 | while True: 35 | tft.fill_rect(0, scroll, tft.width, 1, st7789.BLUE) 36 | 37 | if scroll % font.HEIGHT == 0: 38 | tft.text( 39 | font, 40 | '\\x{:02x}= {:s} '.format(character, chr(character)), 41 | 0, 42 | (scroll + last_line) % tft.height, 43 | st7789.WHITE, 44 | st7789.BLUE) 45 | 46 | character = character + 1 if character < 256 else 0 47 | 48 | tft.vscsad(scroll + tfa) 49 | scroll += 1 50 | 51 | if scroll == tft.height: 52 | scroll = 0 53 | 54 | utime.sleep(0.01) 55 | 56 | 57 | main() 58 | -------------------------------------------------------------------------------- /examples/tft_config.py: -------------------------------------------------------------------------------- 1 | """ LilyGo T-DISPLAY-S3 170x320 ST7789 display """ 2 | 3 | from machine import Pin 4 | import st7789s3 as st7789 5 | 6 | TFA = 0 7 | BFA = 0 8 | 9 | def config(rotation=0): 10 | return st7789.ST7789( 11 | Pin(48, Pin.OUT), 12 | Pin(47, Pin.OUT), 13 | Pin(46, Pin.OUT), 14 | Pin(45, Pin.OUT), 15 | Pin(42, Pin.OUT), 16 | Pin(41, Pin.OUT), 17 | Pin(40, Pin.OUT), 18 | Pin(39, Pin.OUT), 19 | Pin(8, Pin.OUT), 20 | Pin(9, Pin.OUT), 21 | 170, 22 | 320, 23 | reset=Pin(5, Pin.OUT), 24 | cs=Pin(6, Pin.OUT), 25 | dc=Pin(7, Pin.OUT), 26 | backlight=Pin(38, Pin.OUT), 27 | rotation=rotation) 28 | -------------------------------------------------------------------------------- /examples/toasters/imgtobitmap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | ''' 3 | Convert image file to python module for use with blit_bitmap. 4 | 5 | Usage imgtobitmap image_file bits_per_pixel >image.py 6 | ''' 7 | 8 | import sys 9 | from PIL import Image 10 | import argparse 11 | 12 | 13 | def main(): 14 | 15 | parser = argparse.ArgumentParser( 16 | prog='imgtobitmap', 17 | description='Convert image file to python module for use with bitmap method.') 18 | 19 | parser.add_argument( 20 | 'image_file', 21 | help='Name of file containing image to convert') 22 | 23 | parser.add_argument( 24 | 'bits_per_pixel', 25 | type=int, 26 | choices=range(1, 9), 27 | default=1, 28 | metavar='bits_per_pixel', 29 | help='The number of bits to use per pixel (1..8)') 30 | 31 | args = parser.parse_args() 32 | bits = args.bits_per_pixel 33 | colors_requested = 1 << bits 34 | img = Image.open(args.image_file) 35 | img = img.convert("P", palette=Image.Palette.ADAPTIVE, colors=colors_requested) 36 | palette = img.getpalette() # Make copy of palette colors 37 | palette_colors = len(palette) // 3 38 | bits_required = palette_colors.bit_length() 39 | if (bits_required < bits): 40 | print(f'\nNOTE: Quantization reduced colors to {palette_colors} from the {colors_requested} ' 41 | f'requested, reconverting using {bits_required} bit per pixel could save memory.\n''', file=sys.stderr) 42 | 43 | # For all the colors in the palette 44 | colors = [] 45 | 46 | for color in range(palette_colors): 47 | 48 | # get rgb values and convert to 565 49 | color565 = ( 50 | ((palette[color*3] & 0xF8) << 8) 51 | | ((palette[color*3+1] & 0xFC) << 3) 52 | | ((palette[color*3+2] & 0xF8) >> 3)) 53 | 54 | # swap bytes in 565 55 | color = ((color565 & 0xff) << 8) + ((color565 & 0xff00) >> 8) 56 | 57 | # append byte swapped 565 color to colors 58 | colors.append(f'{color:04x}') 59 | 60 | image_bitstring = '' 61 | max_colors = len(colors) 62 | 63 | # Run through the image and create a string with the ascii binary 64 | # representation of the color of each pixel. 65 | for y in range(img.height): 66 | for x in range(img.width): 67 | color = img.getpixel((x, y)) 68 | bstring = ''.join( 69 | '1' if (color & (1 << bit - 1)) else '0' 70 | for bit in range(bits, 0, -1) 71 | ) 72 | image_bitstring += bstring 73 | 74 | bitmap_bits = len(image_bitstring) 75 | 76 | # Create python source with image parameters 77 | print(f'HEIGHT = {img.height}') 78 | print(f'WIDTH = {img.width}') 79 | print(f'COLORS = {max_colors}') 80 | print(f'BITS = {bitmap_bits}') 81 | print(f'BPP = {bits}') 82 | print('PALETTE = [', sep='', end='') 83 | 84 | for color, rgb in enumerate(colors): 85 | if color: 86 | print(',', sep='', end='') 87 | print(f'0x{rgb}', sep='', end='') 88 | print("]") 89 | 90 | # Run though image bit string 8 bits at a time 91 | # and create python array source for memoryview 92 | 93 | print("_bitmap =\\", sep='') 94 | print("b'", sep='', end='') 95 | 96 | for i in range(0, bitmap_bits, 8): 97 | 98 | if i and i % (16*8) == 0: 99 | print("'\\\nb'", end='', sep='') 100 | 101 | value = image_bitstring[i:i+8] 102 | color = int(value, 2) 103 | print(f'\\x{color:02x}', sep='', end='') 104 | 105 | print("'\nBITMAP = memoryview(_bitmap)") 106 | 107 | 108 | main() 109 | -------------------------------------------------------------------------------- /examples/toasters/maketoast: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # grab sprites from spritesheet using ImageMagick and convert to bitmap format. 5 | # 6 | # spritesheet from CircuitPython_Flying_Toasters 7 | # https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters 8 | # 9 | 10 | convert toasters.bmp -crop 64x64+64+0 t1.png 11 | convert toasters.bmp -crop 64x64+128+0 t2.png 12 | convert toasters.bmp -crop 64x64+192+0 t3.png 13 | convert toasters.bmp -crop 64x64+256+0 t4.png 14 | convert toasters.bmp -crop 64x64+320+0 t5.png 15 | 16 | # use 3 bits per pixel / 8 colors 17 | 18 | ../../utils/imgtobitmap.py t1.png 3 >t1.py 19 | ../../utils/imgtobitmap.py t2.png 3 >t2.py 20 | ../../utils/imgtobitmap.py t3.png 3 >t3.py 21 | ../../utils/imgtobitmap.py t4.png 3 >t4.py 22 | ../../utils/imgtobitmap.py t5.png 3 >t5.py 23 | -------------------------------------------------------------------------------- /examples/toasters/t1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/examples/toasters/t1.png -------------------------------------------------------------------------------- /examples/toasters/t1.py: -------------------------------------------------------------------------------- 1 | HEIGHT = 64 2 | WIDTH = 64 3 | COLORS = 7 4 | BITS = 12288 5 | BPP = 3 6 | PALETTE = [0x0000,0xffff,0xb6b5,0x00b0,0x6d6b,0x4082,0x494a] 7 | _bitmap =\ 8 | b'\x00\x00\x00\x00\x00\x00\x00\x02\x49\x24\x00\x00\x00\x00\x00\x00'\ 9 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02'\ 10 | b'\x49\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 11 | b'\x00\x00\x00\x00\x00\x00\x24\x92\x40\x00\x90\x00\x00\x00\x00\x00'\ 12 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92'\ 13 | b'\x40\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 14 | b'\x00\x00\x00\x00\x00\x09\x24\x90\x00\x24\x90\x00\x00\x00\x00\x00'\ 15 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x24\x90'\ 16 | b'\x00\x24\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 17 | b'\x00\x00\x00\x00\x02\x49\x00\x92\x49\x00\x02\x40\x49\x24\x92\x00'\ 18 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x49\x00\x92'\ 19 | b'\x49\x00\x02\x40\x49\x24\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 20 | b'\x00\x00\x00\x00\x92\x49\x24\x92\x40\x01\x24\x92\x49\x24\x92\x49'\ 21 | b'\x24\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x49\x24\x92'\ 22 | b'\x40\x01\x24\x92\x49\x24\x92\x49\x24\x80\x00\x00\x00\x00\x00\x00'\ 23 | b'\x00\x00\x00\x00\x92\x49\x24\x04\x92\x49\x20\x00\x01\xb6\xdb\x6d'\ 24 | b'\x24\x92\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x49\x24\x04'\ 25 | b'\x92\x49\x20\x00\x01\xb6\xdb\x6d\x24\x92\x48\x00\x00\x00\x00\x00'\ 26 | b'\x00\x00\x00\x24\x92\x49\x49\x24\x80\x00\x06\xdb\x6d\x24\x92\x49'\ 27 | b'\x24\x92\x49\x24\x80\x00\x00\x00\x00\x00\x00\x24\x92\x49\x49\x24'\ 28 | b'\x80\x00\x06\xdb\x6d\x24\x92\x49\x24\x92\x49\x24\x80\x00\x00\x00'\ 29 | b'\x00\x00\x00\x24\x94\x92\x48\x00\x00\x6d\xb4\x92\x49\x20\x00\x01'\ 30 | b'\xb6\xdb\x6d\x24\xa4\x00\x00\x00\x00\x00\x00\x24\x94\x92\x48\x00'\ 31 | b'\x00\x6d\xb4\x92\x49\x20\x00\x01\xb6\xdb\x6d\x24\xa4\x00\x00\x00'\ 32 | b'\x00\x00\x09\x49\x24\x80\x00\x06\xdb\x49\x24\x80\x00\x06\xdb\x6d'\ 33 | b'\x24\x92\x00\x00\x00\x90\x00\x00\x00\x00\x09\x49\x24\x80\x00\x06'\ 34 | b'\xdb\x49\x24\x80\x00\x06\xdb\x6d\x24\x92\x00\x00\x00\x90\x00\x00'\ 35 | b'\x00\x00\x12\x48\x00\x00\x6d\xb4\x92\x48\x00\x00\x6d\xb4\x92\x48'\ 36 | b'\x00\x00\x24\x92\x49\x24\x92\x49\x00\x00\x12\x48\x00\x00\x6d\xb4'\ 37 | b'\x92\x48\x00\x00\x6d\xb4\x92\x48\x00\x00\x24\x92\x49\x24\x92\x49'\ 38 | b'\x00\x04\x92\x00\x00\x1b\x49\x24\x80\x00\x06\xdb\x49\x24\xa4\x00'\ 39 | b'\x92\x49\x24\x90\x09\x00\x90\x00\x00\x04\x92\x00\x00\x1b\x49\x24'\ 40 | b'\x80\x00\x06\xdb\x49\x24\xa4\x00\x92\x49\x24\x90\x09\x00\x90\x00'\ 41 | b'\x01\x24\x80\x00\x06\xd2\x48\x00\x00\x6d\xb4\x92\x4a\x49\x00\x24'\ 42 | b'\x92\x40\x24\x92\x49\x24\x92\x49\x01\x24\x80\x00\x06\xd2\x48\x00'\ 43 | b'\x00\x6d\xb4\x92\x4a\x49\x00\x24\x92\x40\x24\x92\x49\x24\x92\x49'\ 44 | b'\x01\x24\x92\x49\xb4\x92\x00\x00\x1b\x49\x24\xa4\x92\x40\x09\x24'\ 45 | b'\x92\x49\x24\x02\x40\x24\x00\x00\x01\x24\x92\x49\xb4\x92\x00\x00'\ 46 | b'\x1b\x49\x24\xa4\x92\x40\x09\x24\x92\x49\x24\x02\x40\x24\x00\x00'\ 47 | b'\x92\xdb\x52\x49\x24\x80\x00\x06\xd2\x4b\x69\x24\x92\x40\x09\x24'\ 48 | b'\x90\x09\x24\x92\x49\x24\x92\x40\x92\xdb\x52\x49\x24\x80\x00\x06'\ 49 | b'\xd2\x4b\x69\x24\x92\x40\x09\x24\x90\x09\x24\x92\x49\x24\x92\x40'\ 50 | b'\x92\xdb\x6d\xb5\x24\x92\x49\xb4\x92\xda\x49\x24\x90\x02\x49\x24'\ 51 | b'\x92\x49\x00\x90\x09\x00\x00\x00\x92\xdb\x6d\xb5\x24\x92\x49\xb4'\ 52 | b'\x92\xda\x49\x24\x90\x02\x49\x24\x92\x49\x00\x90\x09\x00\x00\x00'\ 53 | b'\x92\xd4\x92\xb6\xdb\x52\x49\x24\xb6\x92\x49\x24\x90\x02\x49\x24'\ 54 | b'\x02\x49\x24\x92\x49\x24\x00\x00\x92\xd4\x92\xb6\xdb\x52\x49\x24'\ 55 | b'\xb6\x92\x49\x24\x90\x02\x49\x24\x02\x49\x24\x92\x49\x24\x00\x00'\ 56 | b'\x92\xd4\xb6\x49\x2b\x6d\xb6\x49\x36\x92\x49\x24\x00\x92\x49\x24'\ 57 | b'\x92\x40\x00\x00\x00\x00\x00\x00\x92\xd4\xb6\x49\x2b\x6d\xb6\x49'\ 58 | b'\x36\x92\x49\x24\x00\x92\x49\x24\x92\x40\x00\x00\x00\x00\x00\x00'\ 59 | b'\x92\xd4\xb6\xdb\x64\x92\xb6\x4b\x64\x92\x49\x24\x00\x92\x40\x24'\ 60 | b'\x92\x49\x24\x09\x2d\xb4\x00\x00\x92\xd4\xb6\xdb\x64\x92\xb6\x4b'\ 61 | b'\x64\x92\x49\x24\x00\x92\x40\x24\x92\x49\x24\x09\x2d\xb4\x00\x00'\ 62 | b'\x92\xdb\x6d\xb7\x64\x92\xb6\x4b\x64\x92\x49\x00\x24\x92\x49\x24'\ 63 | b'\x00\x00\x02\x49\x2d\x90\x00\x00\x92\xdb\x6d\xb7\x64\x92\xb6\x4b'\ 64 | b'\x64\x92\x49\x00\x24\x92\x49\x24\x00\x00\x02\x49\x2d\x90\x00\x00'\ 65 | b'\x92\xdb\x6d\x4a\xd4\x92\xb6\x4b\x64\x92\x49\x00\x24\x90\x09\x24'\ 66 | b'\x92\x40\x92\x4b\x6d\xb4\x00\x00\x92\xdb\x6d\x4a\xd4\x92\xb6\x4b'\ 67 | b'\x64\x92\x49\x00\x24\x90\x09\x24\x92\x40\x92\x4b\x6d\xb4\x00\x00'\ 68 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\x90\x09\x00\x24\x92\x49\x00'\ 69 | b'\x00\x24\x92\x4b\x6d\x90\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 70 | b'\x6d\x90\x09\x00\x24\x92\x49\x00\x00\x24\x92\x4b\x6d\x90\x00\x00'\ 71 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\x92\x49\x24\x00\x92\x40\x92'\ 72 | b'\x49\x24\x92\xdb\x6d\xb4\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 73 | b'\x6d\x92\x49\x24\x00\x92\x40\x92\x49\x24\x92\xdb\x6d\xb4\x00\x00'\ 74 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\x90\x09\x24\x90\x00\x24\x92'\ 75 | b'\x49\x24\xb6\xdb\x6d\x90\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 76 | b'\x6d\x90\x09\x24\x90\x00\x24\x92\x49\x24\xb6\xdb\x6d\x90\x00\x00'\ 77 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\xb6\x40\x00\x92\x49\x24\x92'\ 78 | b'\x4b\x6d\xb6\xdb\x64\x00\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 79 | b'\x6d\xb6\x40\x00\x92\x49\x24\x92\x4b\x6d\xb6\xdb\x64\x00\x00\x00'\ 80 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xd9\x24\x92\x49\x24\xb6'\ 81 | b'\xdb\x6d\xb6\xd9\x00\x00\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 82 | b'\x6d\xb6\xd9\x24\x92\x49\x24\xb6\xdb\x6d\xb6\xd9\x00\x00\x00\x00'\ 83 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6'\ 84 | b'\xdb\x6d\x92\x40\x00\x00\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 85 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92\x40\x00\x00\x00\x00'\ 86 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6'\ 87 | b'\xd9\x24\x00\x00\x00\x00\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 88 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00\x00\x00\x00\x00\x00'\ 89 | b'\x02\x4b\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92'\ 90 | b'\x40\x00\x00\x00\x00\x00\x00\x00\x02\x4b\x6d\xb6\xdb\x6d\xb6\x4b'\ 91 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92\x40\x00\x00\x00\x00\x00\x00\x00'\ 92 | b'\x00\x09\x2d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00'\ 93 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x2d\xb6\xdb\x6d\xb6\x4b'\ 94 | b'\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 95 | b'\x00\x00\x24\x92\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x64\x92\x40\x00\x00'\ 96 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92\xdb\x6d\xb6\x4b'\ 97 | b'\x6d\xb6\xdb\x64\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 98 | b'\x00\x00\x00\x02\x49\x2d\xb6\x4b\x6d\x92\x49\x00\x00\x00\x00\x00'\ 99 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x49\x2d\xb6\x4b'\ 100 | b'\x6d\x92\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 101 | b'\x00\x00\x00\x00\x00\x24\x92\x49\x24\x00\x00\x00\x00\x00\x00\x00'\ 102 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92\x49'\ 103 | b'\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 104 | BITMAP = memoryview(_bitmap) 105 | -------------------------------------------------------------------------------- /examples/toasters/t2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/examples/toasters/t2.png -------------------------------------------------------------------------------- /examples/toasters/t2.py: -------------------------------------------------------------------------------- 1 | HEIGHT = 64 2 | WIDTH = 64 3 | COLORS = 7 4 | BITS = 12288 5 | BPP = 3 6 | PALETTE = [0x0000,0xffff,0xb6b5,0x00b0,0x6d6b,0x4082,0x494a] 7 | _bitmap =\ 8 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 9 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 10 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 11 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 12 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 13 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 14 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 15 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 16 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 17 | b'\x00\x00\x00\x00\x00\x00\x00\x02\x49\x00\x00\x00\x49\x24\x92\x00'\ 18 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02'\ 19 | b'\x49\x00\x00\x00\x49\x24\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 20 | b'\x00\x00\x00\x00\x00\x00\x24\x92\x49\x01\x24\x92\x49\x24\x92\x49'\ 21 | b'\x24\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92'\ 22 | b'\x49\x01\x24\x92\x49\x24\x92\x49\x24\x80\x00\x00\x00\x00\x00\x00'\ 23 | b'\x00\x00\x00\x00\x00\x09\x24\x04\x92\x49\x20\x00\x01\xb6\xdb\x6d'\ 24 | b'\x24\x92\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x24\x04'\ 25 | b'\x92\x49\x20\x00\x01\xb6\xdb\x6d\x24\x92\x48\x00\x00\x00\x00\x00'\ 26 | b'\x00\x00\x00\x00\x02\x49\x49\x24\x80\x00\x06\xdb\x6d\x24\x92\x49'\ 27 | b'\x24\x92\x49\x24\x80\x00\x00\x00\x00\x00\x00\x00\x02\x49\x49\x24'\ 28 | b'\x80\x00\x06\xdb\x6d\x24\x92\x49\x24\x92\x49\x24\x80\x00\x00\x00'\ 29 | b'\x00\x00\x00\x00\x94\x92\x48\x00\x00\x6d\xb4\x92\x49\x20\x00\x01'\ 30 | b'\xb6\xdb\x6d\x24\xa4\x00\x00\x00\x00\x00\x00\x00\x94\x92\x48\x00'\ 31 | b'\x00\x6d\xb4\x92\x49\x20\x00\x01\xb6\xdb\x6d\x24\xa4\x00\x00\x00'\ 32 | b'\x00\x00\x00\x49\x24\x80\x00\x06\xdb\x49\x24\x80\x00\x06\xdb\x6d'\ 33 | b'\x24\x92\x49\x24\xa4\x90\x00\x00\x00\x00\x00\x49\x24\x80\x00\x06'\ 34 | b'\xdb\x49\x24\x80\x00\x06\xdb\x6d\x24\x92\x49\x24\xa4\x90\x00\x00'\ 35 | b'\x00\x00\x12\x48\x00\x00\x6d\xb4\x92\x48\x00\x00\x6d\xb4\x92\x49'\ 36 | b'\x24\x80\x00\x00\x24\x90\x00\x00\x00\x00\x12\x48\x00\x00\x6d\xb4'\ 37 | b'\x92\x48\x00\x00\x6d\xb4\x92\x49\x24\x80\x00\x00\x24\x90\x00\x00'\ 38 | b'\x00\x04\x92\x00\x00\x1b\x49\x24\x80\x00\x06\xdb\x49\x24\xa4\x90'\ 39 | b'\x00\x24\x92\x49\x00\x90\x00\x00\x00\x04\x92\x00\x00\x1b\x49\x24'\ 40 | b'\x80\x00\x06\xdb\x49\x24\xa4\x90\x00\x24\x92\x49\x00\x90\x00\x00'\ 41 | b'\x01\x24\x80\x00\x06\xd2\x48\x00\x00\x6d\xb4\x92\x4a\x49\x24\x92'\ 42 | b'\x49\x24\x92\x49\x24\x90\x00\x00\x01\x24\x80\x00\x06\xd2\x48\x00'\ 43 | b'\x00\x6d\xb4\x92\x4a\x49\x24\x92\x49\x24\x92\x49\x24\x90\x00\x00'\ 44 | b'\x01\x24\x92\x49\xb4\x92\x00\x00\x1b\x49\x24\xa4\x92\x49\x24\x90'\ 45 | b'\x00\x00\x00\x00\x00\x90\x00\x00\x01\x24\x92\x49\xb4\x92\x00\x00'\ 46 | b'\x1b\x49\x24\xa4\x92\x49\x24\x90\x00\x00\x00\x00\x00\x90\x00\x00'\ 47 | b'\x92\xdb\x52\x49\x24\x80\x00\x06\xd2\x4b\x69\x24\x92\x49\x00\x00'\ 48 | b'\x92\x49\x24\x92\x49\x00\x00\x00\x92\xdb\x52\x49\x24\x80\x00\x06'\ 49 | b'\xd2\x4b\x69\x24\x92\x49\x00\x00\x92\x49\x24\x92\x49\x00\x00\x00'\ 50 | b'\x92\xdb\x6d\xb5\x24\x92\x49\xb4\x92\xda\x49\x24\x92\x40\x09\x24'\ 51 | b'\x92\x49\x00\x92\x49\x24\x92\x49\x92\xdb\x6d\xb5\x24\x92\x49\xb4'\ 52 | b'\x92\xda\x49\x24\x92\x40\x09\x24\x92\x49\x00\x92\x49\x24\x92\x49'\ 53 | b'\x92\xd4\x92\xb6\xdb\x52\x49\x24\xb6\x92\x49\x24\x90\x02\x49\x24'\ 54 | b'\x92\x49\x24\x90\x09\x00\x90\x00\x92\xd4\x92\xb6\xdb\x52\x49\x24'\ 55 | b'\xb6\x92\x49\x24\x90\x02\x49\x24\x92\x49\x24\x90\x09\x00\x90\x00'\ 56 | b'\x92\xd4\xb6\x49\x2b\x6d\xb6\x49\x36\x92\x49\x24\x00\x92\x49\x24'\ 57 | b'\x92\x40\x24\x92\x49\x24\x92\x49\x92\xd4\xb6\x49\x2b\x6d\xb6\x49'\ 58 | b'\x36\x92\x49\x24\x00\x92\x49\x24\x92\x40\x24\x92\x49\x24\x92\x49'\ 59 | b'\x92\xd4\xb6\xdb\x64\x92\xb6\x4b\x64\x92\x49\x24\x00\x92\x49\x24'\ 60 | b'\x92\x49\x24\x02\x40\x00\x92\x40\x92\xd4\xb6\xdb\x64\x92\xb6\x4b'\ 61 | b'\x64\x92\x49\x24\x00\x92\x49\x24\x92\x49\x24\x02\x40\x00\x92\x40'\ 62 | b'\x92\xdb\x6d\xb7\x64\x92\xb6\x4b\x64\x92\x49\x00\x24\x92\x49\x24'\ 63 | b'\x90\x09\x24\x92\x49\x24\x00\x00\x92\xdb\x6d\xb7\x64\x92\xb6\x4b'\ 64 | b'\x64\x92\x49\x00\x24\x92\x49\x24\x90\x09\x24\x92\x49\x24\x00\x00'\ 65 | b'\x92\xdb\x6d\x4a\xd4\x92\xb6\x4b\x64\x92\x49\x00\x24\x90\x09\x00'\ 66 | b'\x92\x49\x24\x90\x2d\xb4\x00\x00\x92\xdb\x6d\x4a\xd4\x92\xb6\x4b'\ 67 | b'\x64\x92\x49\x00\x24\x90\x09\x00\x92\x49\x24\x90\x2d\xb4\x00\x00'\ 68 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\x90\x09\x00\x24\x92\x49\x00'\ 69 | b'\x00\x00\x00\x00\x2d\x90\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 70 | b'\x6d\x90\x09\x00\x24\x92\x49\x00\x00\x00\x00\x00\x2d\x90\x00\x00'\ 71 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\x92\x49\x24\x00\x92\x40\x92'\ 72 | b'\x49\x24\x92\xdb\x6d\xb4\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 73 | b'\x6d\x92\x49\x24\x00\x92\x40\x92\x49\x24\x92\xdb\x6d\xb4\x00\x00'\ 74 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\x90\x09\x24\x90\x00\x24\x92'\ 75 | b'\x49\x24\xb6\xdb\x6d\x90\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 76 | b'\x6d\x90\x09\x24\x90\x00\x24\x92\x49\x24\xb6\xdb\x6d\x90\x00\x00'\ 77 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\xb6\x40\x00\x92\x49\x24\x92'\ 78 | b'\x4b\x6d\xb6\xdb\x64\x00\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 79 | b'\x6d\xb6\x40\x00\x92\x49\x24\x92\x4b\x6d\xb6\xdb\x64\x00\x00\x00'\ 80 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xd9\x24\x92\x49\x24\xb6'\ 81 | b'\xdb\x6d\xb6\xd9\x00\x00\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 82 | b'\x6d\xb6\xd9\x24\x92\x49\x24\xb6\xdb\x6d\xb6\xd9\x00\x00\x00\x00'\ 83 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6'\ 84 | b'\xdb\x6d\x92\x40\x00\x00\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 85 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92\x40\x00\x00\x00\x00'\ 86 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6'\ 87 | b'\xd9\x24\x00\x00\x00\x00\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 88 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00\x00\x00\x00\x00\x00'\ 89 | b'\x02\x4b\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92'\ 90 | b'\x40\x00\x00\x00\x00\x00\x00\x00\x02\x4b\x6d\xb6\xdb\x6d\xb6\x4b'\ 91 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92\x40\x00\x00\x00\x00\x00\x00\x00'\ 92 | b'\x00\x09\x2d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00'\ 93 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x2d\xb6\xdb\x6d\xb6\x4b'\ 94 | b'\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 95 | b'\x00\x00\x24\x92\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x64\x92\x40\x00\x00'\ 96 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92\xdb\x6d\xb6\x4b'\ 97 | b'\x6d\xb6\xdb\x64\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 98 | b'\x00\x00\x00\x02\x49\x2d\xb6\x4b\x6d\x92\x49\x00\x00\x00\x00\x00'\ 99 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x49\x2d\xb6\x4b'\ 100 | b'\x6d\x92\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 101 | b'\x00\x00\x00\x00\x00\x24\x92\x49\x24\x00\x00\x00\x00\x00\x00\x00'\ 102 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92\x49'\ 103 | b'\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 104 | BITMAP = memoryview(_bitmap) 105 | -------------------------------------------------------------------------------- /examples/toasters/t3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/examples/toasters/t3.png -------------------------------------------------------------------------------- /examples/toasters/t3.py: -------------------------------------------------------------------------------- 1 | HEIGHT = 64 2 | WIDTH = 64 3 | COLORS = 7 4 | BITS = 12288 5 | BPP = 3 6 | PALETTE = [0x0000,0xb6b5,0x00b0,0x6d6b,0x4082,0x494a,0xffff] 7 | _bitmap =\ 8 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 9 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 10 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 11 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 12 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 13 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 14 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 15 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 16 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 17 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92\x49\x00'\ 18 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 19 | b'\x00\x00\x00\x00\x24\x92\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 20 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x49\x24\x92\x49\x24'\ 21 | b'\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 22 | b'\x00\x00\x92\x49\x24\x92\x49\x24\x92\x40\x00\x00\x00\x00\x00\x00'\ 23 | b'\x00\x00\x00\x00\x00\x00\x00\x02\x49\x24\x90\x00\x01\x24\x92\x48'\ 24 | b'\x92\x49\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02'\ 25 | b'\x49\x24\x90\x00\x01\x24\x92\x48\x92\x49\x24\x00\x00\x00\x00\x00'\ 26 | b'\x00\x00\x00\x00\x00\x00\x24\x92\x40\x00\x04\x92\x48\x92\x49\x24'\ 27 | b'\x92\x49\x24\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92'\ 28 | b'\x40\x00\x04\x92\x48\x92\x49\x24\x92\x49\x24\x92\x40\x00\x00\x00'\ 29 | b'\x00\x00\x00\x00\x02\x49\x24\x00\x00\x49\x22\x49\x24\x90\x00\x01'\ 30 | b'\x24\x92\x48\x92\x5b\x00\x00\x00\x00\x00\x00\x00\x02\x49\x24\x00'\ 31 | b'\x00\x49\x22\x49\x24\x90\x00\x01\x24\x92\x48\x92\x5b\x00\x00\x00'\ 32 | b'\x00\x00\x00\x24\x92\x40\x00\x04\x92\x24\x92\x40\x00\x04\x92\x48'\ 33 | b'\x92\x49\x24\x92\x5b\x6c\x00\x00\x00\x00\x00\x24\x92\x40\x00\x04'\ 34 | b'\x92\x24\x92\x40\x00\x04\x92\x48\x92\x49\x24\x92\x5b\x6c\x00\x00'\ 35 | b'\x00\x00\x09\x24\x00\x00\x49\x22\x49\x24\x00\x00\x49\x22\x49\x24'\ 36 | b'\x96\xc0\x00\x00\x1b\x6c\x00\x00\x00\x00\x09\x24\x00\x00\x49\x22'\ 37 | b'\x49\x24\x00\x00\x49\x22\x49\x24\x96\xc0\x00\x00\x1b\x6c\x00\x00'\ 38 | b'\x00\x02\x49\x00\x00\x12\x24\x92\x40\x00\x04\x92\x24\x92\x5b\x6c'\ 39 | b'\x00\x1b\x6d\xb6\xc0\x6c\x00\x00\x00\x02\x49\x00\x00\x12\x24\x92'\ 40 | b'\x40\x00\x04\x92\x24\x92\x5b\x6c\x00\x1b\x6d\xb6\xc0\x6c\x00\x00'\ 41 | b'\x00\x92\x40\x00\x04\x89\x24\x00\x00\x49\x22\x49\x25\xb6\xdb\x6d'\ 42 | b'\xb6\xdb\x6d\xb6\xdb\x6c\x00\x00\x00\x92\x40\x00\x04\x89\x24\x00'\ 43 | b'\x00\x49\x22\x49\x25\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6c\x00\x00'\ 44 | b'\x00\x92\x49\x25\x22\x49\x00\x00\x12\x24\x92\x5b\x6d\xb6\xdb\x6d'\ 45 | b'\xb6\xdb\x6d\xb6\xdb\x6c\x00\x00\x00\x92\x49\x25\x22\x49\x00\x00'\ 46 | b'\x12\x24\x92\x5b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6c\x00\x00'\ 47 | b'\x6e\x49\x09\x24\x92\x40\x00\x04\x89\x26\xd6\xdb\x6d\xb6\xdb\x6d'\ 48 | b'\xb6\xdb\x6d\xb6\xdb\x00\x00\x00\x6e\x49\x09\x24\x92\x40\x00\x04'\ 49 | b'\x89\x26\xd6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x00\x00\x00'\ 50 | b'\x6e\x49\x24\x90\x92\x49\x25\x22\x49\xb5\xb6\xdb\x6d\xb6\xdb\x6d'\ 51 | b'\xb6\xdb\x6d\xb6\xc0\x6c\x00\x00\x6e\x49\x24\x90\x92\x49\x25\x22'\ 52 | b'\x49\xb5\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xc0\x6c\x00\x00'\ 53 | b'\x6e\x42\x49\x92\x49\x09\x24\x92\x6d\x6d\xb6\xdb\x6d\xb6\xdb\x6d'\ 54 | b'\xb6\xdb\x6d\xb6\xc0\x00\x00\x00\x6e\x42\x49\x92\x49\x09\x24\x92'\ 55 | b'\x6d\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xc0\x00\x00\x00'\ 56 | b'\x6e\x42\x6d\x24\x99\x24\x91\xb6\xed\x6d\xb6\xdb\x6c\x00\x1b\x6d'\ 57 | b'\xb6\xdb\x6c\x00\x00\x6c\x00\x00\x6e\x42\x6d\x24\x99\x24\x91\xb6'\ 58 | b'\xed\x6d\xb6\xdb\x6c\x00\x1b\x6d\xb6\xdb\x6c\x00\x00\x6c\x00\x00'\ 59 | b'\x6e\x42\x6d\xb6\xd2\x49\x91\xb9\x1b\x6d\xb6\xdb\x03\x6d\x80\x00'\ 60 | b'\x00\x00\x00\x0d\xb6\x03\x6d\x80\x6e\x42\x6d\xb6\xd2\x49\x91\xb9'\ 61 | b'\x1b\x6d\xb6\xdb\x03\x6d\x80\x00\x00\x00\x00\x0d\xb6\x03\x6d\x80'\ 62 | b'\x6e\x49\x24\x92\xd2\x49\x91\xb9\x1b\x6d\xb6\xc0\xdb\x6d\xb6\xd8'\ 63 | b'\x0d\xb6\x03\x6d\x80\xdb\x60\x36\x6e\x49\x24\x92\xd2\x49\x91\xb9'\ 64 | b'\x1b\x6d\xb6\xc0\xdb\x6d\xb6\xd8\x0d\xb6\x03\x6d\x80\xdb\x60\x36'\ 65 | b'\x6e\x49\x24\x26\x42\x49\x91\xb9\x1b\x6d\xb6\xc0\xdb\x6d\xb6\x03'\ 66 | b'\x6d\x80\xdb\x60\x36\xd8\x0d\xb6\x6e\x49\x24\x26\x42\x49\x91\xb9'\ 67 | b'\x1b\x6d\xb6\xc0\xdb\x6d\xb6\x03\x6d\x80\xdb\x60\x36\xd8\x0d\xb6'\ 68 | b'\x6e\x49\x24\x92\x49\x24\x91\xb9\x24\x6c\x06\xc0\xdb\x6d\xb6\xdb'\ 69 | b'\x60\x36\xd8\x0d\xb6\x03\x6d\x80\x6e\x49\x24\x92\x49\x24\x91\xb9'\ 70 | b'\x24\x6c\x06\xc0\xdb\x6d\xb6\xdb\x60\x36\xd8\x0d\xb6\x03\x6d\x80'\ 71 | b'\x6e\x49\x24\x26\x49\x24\x91\xb9\x24\x6d\xb6\xdb\x03\x6d\xb6\xdb'\ 72 | b'\x6d\xb6\xdb\x6d\x80\xdb\x6d\x80\x6e\x49\x24\x26\x49\x24\x91\xb9'\ 73 | b'\x24\x6d\xb6\xdb\x03\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x80\xdb\x6d\x80'\ 74 | b'\x6e\x49\x24\x92\x49\x24\x91\xb9\x24\x6c\x06\xdb\x6c\x0d\xb6\xdb'\ 75 | b'\x6d\x80\xdb\x6d\xb6\xdb\x60\x00\x6e\x49\x24\x92\x49\x24\x91\xb9'\ 76 | b'\x24\x6c\x06\xdb\x6c\x0d\xb6\xdb\x6d\x80\xdb\x6d\xb6\xdb\x60\x00'\ 77 | b'\x6e\x49\x24\x26\x49\x24\x91\xb9\x24\x91\xb0\x00\x6d\xb0\x36\xdb'\ 78 | b'\x6d\xb6\xd8\x0d\xb6\xdb\x60\x00\x6e\x49\x24\x26\x49\x24\x91\xb9'\ 79 | b'\x24\x91\xb0\x00\x6d\xb0\x36\xdb\x6d\xb6\xd8\x0d\xb6\xdb\x60\x00'\ 80 | b'\x6e\x49\x24\x92\x49\x24\x91\xb9\x24\x92\x46\xdb\x6d\xb6\xc0\xdb'\ 81 | b'\x6d\xb6\xdb\x6d\xb6\xd8\x00\x00\x6e\x49\x24\x92\x49\x24\x91\xb9'\ 82 | b'\x24\x92\x46\xdb\x6d\xb6\xc0\xdb\x6d\xb6\xdb\x6d\xb6\xd8\x00\x00'\ 83 | b'\x6e\x49\x24\x26\x49\x24\x91\xb9\x24\x92\x49\x24\x92\x49\x24\x03'\ 84 | b'\x6d\xb6\xdb\x6d\xb6\x00\x00\x00\x6e\x49\x24\x26\x49\x24\x91\xb9'\ 85 | b'\x24\x92\x49\x24\x92\x49\x24\x03\x6d\xb6\xdb\x6d\xb6\x00\x00\x00'\ 86 | b'\x6e\x49\x24\x92\x49\x24\x91\xb9\x24\x92\x49\x24\x92\x49\x24\x90'\ 87 | b'\x0d\xb6\xdb\x6d\x80\x00\x00\x00\x6e\x49\x24\x92\x49\x24\x91\xb9'\ 88 | b'\x24\x92\x49\x24\x92\x49\x24\x90\x0d\xb6\xdb\x6d\x80\x00\x00\x00'\ 89 | b'\x01\xb9\x24\x92\x49\x24\x91\xb9\x24\x92\x49\x24\x92\x49\x24\x6d'\ 90 | b'\xb0\x00\xdb\x60\x00\x00\x00\x00\x01\xb9\x24\x92\x49\x24\x91\xb9'\ 91 | b'\x24\x92\x49\x24\x92\x49\x24\x6d\xb0\x00\xdb\x60\x00\x00\x00\x00'\ 92 | b'\x00\x06\xe4\x92\x49\x24\x91\xb9\x24\x92\x49\x24\x92\x46\xdb\x00'\ 93 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xe4\x92\x49\x24\x91\xb9'\ 94 | b'\x24\x92\x49\x24\x92\x46\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 95 | b'\x00\x00\x1b\x6e\x49\x24\x91\xb9\x24\x92\x49\x1b\x6d\xb0\x00\x00'\ 96 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x6e\x49\x24\x91\xb9'\ 97 | b'\x24\x92\x49\x1b\x6d\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 98 | b'\x00\x00\x00\x01\xb6\xe4\x91\xb9\x24\x6d\xb6\xc0\x00\x00\x00\x00'\ 99 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xb6\xe4\x91\xb9'\ 100 | b'\x24\x6d\xb6\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 101 | b'\x00\x00\x00\x00\x00\x1b\x6d\xb6\xdb\x00\x00\x00\x00\x00\x00\x00'\ 102 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x6d\xb6'\ 103 | b'\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 104 | BITMAP = memoryview(_bitmap) 105 | -------------------------------------------------------------------------------- /examples/toasters/t4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/examples/toasters/t4.png -------------------------------------------------------------------------------- /examples/toasters/t4.py: -------------------------------------------------------------------------------- 1 | HEIGHT = 64 2 | WIDTH = 64 3 | COLORS = 7 4 | BITS = 12288 5 | BPP = 3 6 | PALETTE = [0x0000,0xffff,0xb6b5,0x00b0,0x6d6b,0x4082,0x494a] 7 | _bitmap =\ 8 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 9 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 10 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 11 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 12 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 13 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 14 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 15 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 16 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 17 | b'\x00\x00\x00\x00\x00\x00\x00\x02\x49\x00\x00\x00\x49\x24\x92\x00'\ 18 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02'\ 19 | b'\x49\x00\x00\x00\x49\x24\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 20 | b'\x00\x00\x00\x00\x00\x00\x24\x92\x49\x01\x24\x92\x49\x24\x92\x49'\ 21 | b'\x24\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92'\ 22 | b'\x49\x01\x24\x92\x49\x24\x92\x49\x24\x80\x00\x00\x00\x00\x00\x00'\ 23 | b'\x00\x00\x00\x00\x00\x09\x24\x04\x92\x49\x20\x00\x01\xb6\xdb\x6d'\ 24 | b'\x24\x92\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x24\x04'\ 25 | b'\x92\x49\x20\x00\x01\xb6\xdb\x6d\x24\x92\x48\x00\x00\x00\x00\x00'\ 26 | b'\x00\x00\x00\x00\x02\x49\x49\x24\x80\x00\x06\xdb\x6d\x24\x92\x49'\ 27 | b'\x24\x92\x49\x24\x80\x00\x00\x00\x00\x00\x00\x00\x02\x49\x49\x24'\ 28 | b'\x80\x00\x06\xdb\x6d\x24\x92\x49\x24\x92\x49\x24\x80\x00\x00\x00'\ 29 | b'\x00\x00\x00\x00\x94\x92\x48\x00\x00\x6d\xb4\x92\x49\x20\x00\x01'\ 30 | b'\xb6\xdb\x6d\x24\xa4\x00\x00\x00\x00\x00\x00\x00\x94\x92\x48\x00'\ 31 | b'\x00\x6d\xb4\x92\x49\x20\x00\x01\xb6\xdb\x6d\x24\xa4\x00\x00\x00'\ 32 | b'\x00\x00\x00\x49\x24\x80\x00\x06\xdb\x49\x24\x80\x00\x06\xdb\x6d'\ 33 | b'\x24\x92\x49\x24\xa4\x90\x00\x00\x00\x00\x00\x49\x24\x80\x00\x06'\ 34 | b'\xdb\x49\x24\x80\x00\x06\xdb\x6d\x24\x92\x49\x24\xa4\x90\x00\x00'\ 35 | b'\x00\x00\x12\x48\x00\x00\x6d\xb4\x92\x48\x00\x00\x6d\xb4\x92\x49'\ 36 | b'\x29\x00\x00\x00\x24\x90\x00\x00\x00\x00\x12\x48\x00\x00\x6d\xb4'\ 37 | b'\x92\x48\x00\x00\x6d\xb4\x92\x49\x29\x00\x00\x00\x24\x90\x00\x00'\ 38 | b'\x00\x04\x92\x00\x00\x1b\x49\x24\x80\x00\x06\xdb\x49\x24\xa4\x90'\ 39 | b'\x00\x24\x92\x49\x00\x90\x00\x00\x00\x04\x92\x00\x00\x1b\x49\x24'\ 40 | b'\x80\x00\x06\xdb\x49\x24\xa4\x90\x00\x24\x92\x49\x00\x90\x00\x00'\ 41 | b'\x01\x24\x80\x00\x06\xd2\x48\x00\x00\x6d\xb4\x92\x4a\x49\x24\x92'\ 42 | b'\x49\x24\x92\x49\x24\x90\x00\x00\x01\x24\x80\x00\x06\xd2\x48\x00'\ 43 | b'\x00\x6d\xb4\x92\x4a\x49\x24\x92\x49\x24\x92\x49\x24\x90\x00\x00'\ 44 | b'\x01\x24\x92\x49\xb4\x92\x00\x00\x1b\x49\x24\xa4\x92\x49\x24\x90'\ 45 | b'\x00\x00\x00\x00\x00\x90\x00\x00\x01\x24\x92\x49\xb4\x92\x00\x00'\ 46 | b'\x1b\x49\x24\xa4\x92\x49\x24\x90\x00\x00\x00\x00\x00\x90\x00\x00'\ 47 | b'\x92\xdb\x52\x49\x24\x80\x00\x06\xd2\x4b\x69\x24\x92\x49\x00\x00'\ 48 | b'\x92\x49\x24\x92\x49\x00\x00\x00\x92\xdb\x52\x49\x24\x80\x00\x06'\ 49 | b'\xd2\x4b\x69\x24\x92\x49\x00\x00\x92\x49\x24\x92\x49\x00\x00\x00'\ 50 | b'\x92\xdb\x6d\xb5\x24\x92\x49\xb4\x92\xda\x49\x24\x92\x40\x09\x24'\ 51 | b'\x92\x49\x00\x92\x49\x24\x92\x49\x92\xdb\x6d\xb5\x24\x92\x49\xb4'\ 52 | b'\x92\xda\x49\x24\x92\x40\x09\x24\x92\x49\x00\x92\x49\x24\x92\x49'\ 53 | b'\x92\xd4\x92\xb6\xdb\x52\x49\x24\xb6\x92\x49\x24\x90\x02\x49\x24'\ 54 | b'\x92\x49\x24\x90\x09\x00\x90\x00\x92\xd4\x92\xb6\xdb\x52\x49\x24'\ 55 | b'\xb6\x92\x49\x24\x90\x02\x49\x24\x92\x49\x24\x90\x09\x00\x90\x00'\ 56 | b'\x92\xd4\xb6\x49\x2b\x6d\xb6\x49\x36\x92\x49\x24\x00\x92\x49\x24'\ 57 | b'\x92\x40\x24\x92\x49\x24\x92\x49\x92\xd4\xb6\x49\x2b\x6d\xb6\x49'\ 58 | b'\x36\x92\x49\x24\x00\x92\x49\x24\x92\x40\x24\x92\x49\x24\x92\x49'\ 59 | b'\x92\xd4\xb6\xdb\x64\x92\xb6\x4b\x64\x92\x49\x24\x00\x92\x49\x24'\ 60 | b'\x92\x49\x24\x02\x40\x00\x92\x40\x92\xd4\xb6\xdb\x64\x92\xb6\x4b'\ 61 | b'\x64\x92\x49\x24\x00\x92\x49\x24\x92\x49\x24\x02\x40\x00\x92\x40'\ 62 | b'\x92\xdb\x6d\xb7\x64\x92\xb6\x4b\x64\x92\x49\x00\x24\x92\x49\x24'\ 63 | b'\x90\x09\x24\x92\x49\x24\x00\x00\x92\xdb\x6d\xb7\x64\x92\xb6\x4b'\ 64 | b'\x64\x92\x49\x00\x24\x92\x49\x24\x90\x09\x24\x92\x49\x24\x00\x00'\ 65 | b'\x92\xdb\x6d\x4a\xd4\x92\xb6\x4b\x64\x92\x49\x00\x24\x90\x09\x00'\ 66 | b'\x92\x49\x00\x90\x2d\xb4\x00\x00\x92\xdb\x6d\x4a\xd4\x92\xb6\x4b'\ 67 | b'\x64\x92\x49\x00\x24\x90\x09\x00\x92\x49\x00\x90\x2d\xb4\x00\x00'\ 68 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\x90\x09\x00\x24\x92\x49\x00'\ 69 | b'\x00\x00\x00\x00\x2d\x90\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 70 | b'\x6d\x90\x09\x00\x24\x92\x49\x00\x00\x00\x00\x00\x2d\x90\x00\x00'\ 71 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\x92\x49\x24\x00\x92\x40\x92'\ 72 | b'\x49\x24\x92\xdb\x6d\xb4\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 73 | b'\x6d\x92\x49\x24\x00\x92\x40\x92\x49\x24\x92\xdb\x6d\xb4\x00\x00'\ 74 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\x90\x09\x24\x90\x00\x24\x92'\ 75 | b'\x49\x24\xb6\xdb\x6d\x90\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 76 | b'\x6d\x90\x09\x24\x90\x00\x24\x92\x49\x24\xb6\xdb\x6d\x90\x00\x00'\ 77 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\xb6\x40\x00\x92\x49\x24\x92'\ 78 | b'\x4b\x6d\xb6\xdb\x64\x00\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 79 | b'\x6d\xb6\x40\x00\x92\x49\x24\x92\x4b\x6d\xb6\xdb\x64\x00\x00\x00'\ 80 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xd9\x24\x92\x49\x24\xb6'\ 81 | b'\xdb\x6d\xb6\xd9\x00\x00\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 82 | b'\x6d\xb6\xd9\x24\x92\x49\x24\xb6\xdb\x6d\xb6\xd9\x00\x00\x00\x00'\ 83 | b'\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6'\ 84 | b'\xdb\x6d\x92\x40\x00\x00\x00\x00\x92\xdb\x6d\x4a\xdb\x6d\xb6\x4b'\ 85 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92\x40\x00\x00\x00\x00'\ 86 | b'\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6'\ 87 | b'\xd9\x24\x00\x00\x00\x00\x00\x00\x92\xdb\x6d\xb6\xdb\x6d\xb6\x4b'\ 88 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00\x00\x00\x00\x00\x00'\ 89 | b'\x02\x4b\x6d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92'\ 90 | b'\x40\x00\x00\x00\x00\x00\x00\x00\x02\x4b\x6d\xb6\xdb\x6d\xb6\x4b'\ 91 | b'\x6d\xb6\xdb\x6d\xb6\xdb\x6d\x92\x40\x00\x00\x00\x00\x00\x00\x00'\ 92 | b'\x00\x09\x2d\xb6\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00'\ 93 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x2d\xb6\xdb\x6d\xb6\x4b'\ 94 | b'\x6d\xb6\xdb\x6d\xb6\xd9\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 95 | b'\x00\x00\x24\x92\xdb\x6d\xb6\x4b\x6d\xb6\xdb\x64\x92\x40\x00\x00'\ 96 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92\xdb\x6d\xb6\x4b'\ 97 | b'\x6d\xb6\xdb\x64\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 98 | b'\x00\x00\x00\x02\x49\x2d\xb6\x4b\x6d\x92\x49\x00\x00\x00\x00\x00'\ 99 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x49\x2d\xb6\x4b'\ 100 | b'\x6d\x92\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 101 | b'\x00\x00\x00\x00\x00\x24\x92\x49\x24\x00\x00\x00\x00\x00\x00\x00'\ 102 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x92\x49'\ 103 | b'\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 104 | BITMAP = memoryview(_bitmap) 105 | -------------------------------------------------------------------------------- /examples/toasters/t5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/examples/toasters/t5.png -------------------------------------------------------------------------------- /examples/toasters/t5.py: -------------------------------------------------------------------------------- 1 | HEIGHT = 64 2 | WIDTH = 64 3 | COLORS = 6 4 | BITS = 12288 5 | BPP = 3 6 | PALETTE = [0x0000,0x4049,0x609b,0x4082,0xe0ff,0xffff] 7 | _bitmap =\ 8 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 9 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 10 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 11 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 12 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 13 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 14 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 15 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 16 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 17 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 18 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 19 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 20 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 21 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 22 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 23 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 24 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 25 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 26 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 27 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 28 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 29 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 30 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 31 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 32 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 33 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 34 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 35 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 36 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 37 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 38 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x49\x24\x92\x40\x00'\ 39 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 40 | b'\x00\x00\x02\x49\x24\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 41 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x94\x92\x49\x24\x89\x24'\ 42 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 43 | b'\x00\x24\x94\x92\x49\x24\x89\x24\x00\x00\x00\x00\x00\x00\x00\x00'\ 44 | b'\x00\x00\x00\x00\x00\x00\x00\x02\x49\x49\x24\x92\x49\x24\x9b\x48'\ 45 | b'\x92\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02'\ 46 | b'\x49\x49\x24\x92\x49\x24\x9b\x48\x92\x40\x00\x00\x00\x00\x00\x00'\ 47 | b'\x00\x00\x00\x00\x00\x00\x24\x94\x92\x49\x24\x9b\x49\x24\x92\x49'\ 48 | b'\x24\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x94'\ 49 | b'\x92\x49\x24\x9b\x49\x24\x92\x49\x24\x89\x00\x00\x00\x00\x00\x00'\ 50 | b'\x00\x00\x00\x00\x02\x49\x49\x24\x92\x6d\x24\x92\x49\x24\x92\x6d'\ 51 | b'\x24\x92\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x49\x49\x24'\ 52 | b'\x92\x6d\x24\x92\x49\x24\x92\x6d\x24\x92\x24\x00\x00\x00\x00\x00'\ 53 | b'\x00\x00\x00\x24\x94\x92\x49\x24\x9b\x49\x24\x92\x49\x26\xd2\x49'\ 54 | b'\x24\x92\x48\x92\x40\x00\x00\x00\x00\x00\x00\x24\x94\x92\x49\x24'\ 55 | b'\x9b\x49\x24\x92\x49\x26\xd2\x49\x24\x92\x48\x92\x40\x00\x00\x00'\ 56 | b'\x00\x02\x49\x49\x24\x92\x49\x26\xdb\x49\x24\x9b\x4a\x44\x9b\x91'\ 57 | b'\x24\x92\x49\x24\x89\x00\x00\x00\x00\x02\x49\x49\x24\x92\x49\x26'\ 58 | b'\xdb\x49\x24\x9b\x4a\x44\x9b\x91\x24\x92\x49\x24\x89\x00\x00\x00'\ 59 | b'\x00\x94\x92\x49\x24\x92\x49\x29\x12\x91\x29\x1b\x49\x24\x92\x6d'\ 60 | b'\x24\x92\x49\x24\x92\x24\x00\x00\x00\x94\x92\x49\x24\x92\x49\x29'\ 61 | b'\x12\x91\x29\x1b\x49\x24\x92\x6d\x24\x92\x49\x24\x92\x24\x00\x00'\ 62 | b'\x6c\x94\x9b\x49\x26\xd2\x49\x24\x92\x49\xb4\xa4\x49\xb4\x92\x49'\ 63 | b'\xb4\x92\x49\x24\x92\x48\x90\x00\x6c\x94\x9b\x49\x26\xd2\x49\x24'\ 64 | b'\x92\x49\xb4\xa4\x49\xb4\x92\x49\xb4\x92\x49\x24\x92\x48\x90\x00'\ 65 | b'\x6d\xb2\x52\x49\x24\x92\x49\xb4\x92\x49\x24\x9b\x49\xb4\x92\x49'\ 66 | b'\xb4\x92\x49\x24\x92\x49\x22\x40\x6d\xb2\x52\x49\x24\x92\x49\xb4'\ 67 | b'\x92\x49\x24\x9b\x49\xb4\x92\x49\xb4\x92\x49\x24\x92\x49\x22\x40'\ 68 | b'\x6d\xb6\xc9\x25\x24\x92\x6d\x26\xd2\x49\x24\x9b\x6d\x24\x92\x49'\ 69 | b'\xb6\xd2\x49\x24\x92\x49\x22\x49\x6d\xb6\xc9\x25\x24\x92\x6d\x26'\ 70 | b'\xd2\x49\x24\x9b\x6d\x24\x92\x49\xb6\xd2\x49\x24\x92\x49\x22\x49'\ 71 | b'\x6d\xb6\xdb\x6c\x96\xd2\x49\x24\x92\x49\x29\x12\x6d\xb4\xa4\x49'\ 72 | b'\x24\x92\x49\xb4\x92\x24\x96\xdb\x6d\xb6\xdb\x6c\x96\xd2\x49\x24'\ 73 | b'\x92\x49\x29\x12\x6d\xb4\xa4\x49\x24\x92\x49\xb4\x92\x24\x96\xdb'\ 74 | b'\x01\xb6\xdb\x6d\xb6\xc9\x25\x24\x92\x49\x24\x92\x49\xb4\x92\x49'\ 75 | b'\x24\x92\x49\x24\x89\x6d\xb6\xdb\x01\xb6\xdb\x6d\xb6\xc9\x25\x24'\ 76 | b'\x92\x49\x24\x92\x49\xb4\x92\x49\x24\x92\x49\x24\x89\x6d\xb6\xdb'\ 77 | b'\x00\x06\xdb\x6d\xb6\xdb\x6c\x92\x52\x49\x24\x92\x49\x24\x92\x49'\ 78 | b'\x24\x92\x24\x92\x5b\x6d\xb6\xdb\x00\x06\xdb\x6d\xb6\xdb\x6c\x92'\ 79 | b'\x52\x49\x24\x92\x49\x24\x92\x49\x24\x92\x24\x92\x5b\x6d\xb6\xdb'\ 80 | b'\x00\x00\x1b\x6d\xb6\xdb\x6d\xb6\xc9\x25\x26\xd2\x49\x24\x92\x49'\ 81 | b'\xb2\x49\x6d\xb6\xdb\x6d\xb6\xdb\x00\x00\x1b\x6d\xb6\xdb\x6d\xb6'\ 82 | b'\xc9\x25\x26\xd2\x49\x24\x92\x49\xb2\x49\x6d\xb6\xdb\x6d\xb6\xdb'\ 83 | b'\x00\x00\x00\x01\xb6\xdb\x6d\xb6\xdb\x6c\x94\x92\x49\x24\x89\x24'\ 84 | b'\x96\xdb\x6d\xb6\xdb\x6d\xb0\x00\x00\x00\x00\x01\xb6\xdb\x6d\xb6'\ 85 | b'\xdb\x6c\x94\x92\x49\x24\x89\x24\x96\xdb\x6d\xb6\xdb\x6d\xb0\x00'\ 86 | b'\x00\x00\x00\x00\x00\x1b\x6d\xb6\xdb\x6d\xb2\x49\x24\x92\x5b\x6d'\ 87 | b'\xb6\xdb\x6d\xb6\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x6d\xb6'\ 88 | b'\xdb\x6d\xb2\x49\x24\x92\x5b\x6d\xb6\xdb\x6d\xb6\xdb\x00\x00\x00'\ 89 | b'\x00\x00\x00\x00\x00\x00\x01\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d'\ 90 | b'\xb6\xdb\x6d\xb6\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xb6'\ 91 | b'\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xc0\x00\x00\x00'\ 92 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x6d\xb6\xdb\x6d\xb6\xdb\x6d'\ 93 | b'\xb6\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 94 | b'\x1b\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb6\xdb\x00\x00\x00\x00\x00\x00'\ 95 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xb6\xdb\x6d\xb6\xdb\x6d'\ 96 | b'\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 97 | b'\x00\x6d\xb6\xdb\x6d\xb6\xdb\x6d\xb0\x00\x00\x00\x00\x00\x00\x00'\ 98 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xdb\x6d\xb6\xc0\x00'\ 99 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 100 | b'\x00\x00\x06\xdb\x6d\xb6\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 101 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 102 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 103 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 104 | BITMAP = memoryview(_bitmap) 105 | -------------------------------------------------------------------------------- /examples/toasters/toasters.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/examples/toasters/toasters.bmp -------------------------------------------------------------------------------- /examples/toasters/toasters.py: -------------------------------------------------------------------------------- 1 | """ 2 | toasters.py 3 | 4 | An example using bitmap to draw sprites on the display. 5 | 6 | Spritesheet from CircuitPython_Flying_Toasters 7 | https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters 8 | 9 | """ 10 | 11 | import random 12 | from machine import Pin 13 | import st7789s3 as st7789 14 | import tft_config 15 | 16 | import t1, t2, t3, t4, t5 17 | 18 | TOASTERS = [t1, t2, t3, t4] 19 | TOAST = [t5] 20 | 21 | 22 | class toast(): 23 | ''' 24 | toast class to keep track of a sprites locaton and step 25 | ''' 26 | def __init__(self, sprites, x, y): 27 | self.sprites = sprites 28 | self.steps = len(sprites) 29 | self.x = x 30 | self.y = y 31 | self.step = random.randint(0, self.steps-1) 32 | self.speed = random.randint(2, 5) 33 | 34 | def move(self): 35 | if self.x <= 0: 36 | self.speed = random.randint(2, 5) 37 | self.x = 135 - 64 38 | 39 | self.step += 1 40 | self.step %= self.steps 41 | self.x -= self.speed 42 | 43 | 44 | def main(): 45 | """ 46 | Initialize the display and draw flying toasters and toast 47 | """ 48 | tft = tft_config.config(0) 49 | tft.fill(st7789.BLACK) 50 | 51 | # create toast spites in random positions 52 | sprites = [ 53 | toast(TOASTERS, 135-64, 0), 54 | toast(TOAST, 135-64*2, 80), 55 | toast(TOASTERS, 135-64*4, 160) 56 | ] 57 | 58 | # move and draw sprites 59 | while True: 60 | for man in sprites: 61 | bitmap = man.sprites[man.step] 62 | tft.fill_rect( 63 | man.x+bitmap.WIDTH-man.speed, 64 | man.y, 65 | man.speed, 66 | bitmap.HEIGHT, 67 | st7789.BLACK) 68 | 69 | man.move() 70 | 71 | if man.x > 0: 72 | tft.bitmap(bitmap, man.x, man.y) 73 | else: 74 | tft.fill_rect( 75 | 0, 76 | man.y, 77 | bitmap.WIDTH, 78 | bitmap.HEIGHT, 79 | st7789.BLACK) 80 | 81 | 82 | main() 83 | -------------------------------------------------------------------------------- /examples/truetype/chango.py: -------------------------------------------------------------------------------- 1 | """ 2 | chango.py 3 | 4 | Test for font2bitmap converter for the driver. 5 | See the font2bitmap program in the utils directory. 6 | """ 7 | import gc 8 | import st7789s3 as st7789 9 | import tft_config 10 | 11 | import chango_16 as font_16 12 | import chango_32 as font_32 13 | import chango_64 as font_64 14 | 15 | gc.collect() 16 | 17 | 18 | def main(): 19 | # enable display and clear screen 20 | tft = tft_config.config(1) 21 | tft.fill(st7789.BLACK) 22 | 23 | row = 0 24 | tft.write(font_16, "abcdefghijklmnopqrst", 0, row, st7789.RED) 25 | row += font_16.HEIGHT 26 | 27 | tft.write(font_32, "abcdefghij", 0, row, st7789.GREEN) 28 | row += font_32.HEIGHT 29 | 30 | tft.write(font_64, "abcd", 0, row, st7789.BLUE) 31 | row += font_64.HEIGHT 32 | 33 | 34 | main() 35 | -------------------------------------------------------------------------------- /examples/truetype/noto_fonts.py: -------------------------------------------------------------------------------- 1 | """ 2 | noto_fonts Writes the names of three Noto fonts centered on the display 3 | using the font. The fonts were converted from True Type fonts using 4 | the font2bitmap utility. 5 | """ 6 | 7 | import st7789s3 as st7789 8 | import tft_config 9 | 10 | import NotoSans_32 as noto_sans 11 | import NotoSerif_32 as noto_serif 12 | import NotoSansMono_32 as noto_mono 13 | 14 | 15 | def main(): 16 | 17 | def center(font, string, row, color=st7789.WHITE): 18 | screen = tft.width # get screen width 19 | width = tft.write_width(font, string) # get the width of the string 20 | col = tft.width // 2 - width // 2 if width and width < screen else 0 21 | tft.write(font, string, col, row, color) # and write the string 22 | 23 | # enable display and clear screen 24 | tft = tft_config.config(1) 25 | tft.fill(st7789.BLACK) 26 | 27 | row = 16 28 | 29 | # center the name of the first font, using the font 30 | center(noto_sans, "NotoSans", row, st7789.RED) 31 | row += noto_sans.HEIGHT 32 | 33 | # center the name of the second font, using the font 34 | center(noto_serif, "NotoSerif", row, st7789.GREEN) 35 | row += noto_serif.HEIGHT 36 | 37 | # center the name of the third font, using the font 38 | center(noto_mono, "NotoSansMono", row, st7789.BLUE) 39 | row += noto_mono.HEIGHT 40 | 41 | 42 | main() 43 | -------------------------------------------------------------------------------- /fonts/romfonts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/fonts/romfonts/__init__.py -------------------------------------------------------------------------------- /fonts/romfonts/vga1_8x16.py: -------------------------------------------------------------------------------- 1 | """converted from vga_8x16.bin """ 2 | WIDTH = 8 3 | HEIGHT = 16 4 | FIRST = 0x20 5 | LAST = 0x7f 6 | _FONT =\ 7 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 8 | b'\x00\x00\x18\x3c\x3c\x3c\x18\x18\x18\x00\x18\x18\x00\x00\x00\x00'\ 9 | b'\x00\x66\x66\x66\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 10 | b'\x00\x00\x00\x6c\x6c\xfe\x6c\x6c\x6c\xfe\x6c\x6c\x00\x00\x00\x00'\ 11 | b'\x18\x18\x7c\xc6\xc2\xc0\x7c\x06\x06\x86\xc6\x7c\x18\x18\x00\x00'\ 12 | b'\x00\x00\x00\x00\xc2\xc6\x0c\x18\x30\x60\xc6\x86\x00\x00\x00\x00'\ 13 | b'\x00\x00\x38\x6c\x6c\x38\x76\xdc\xcc\xcc\xcc\x76\x00\x00\x00\x00'\ 14 | b'\x00\x30\x30\x30\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 15 | b'\x00\x00\x0c\x18\x30\x30\x30\x30\x30\x30\x18\x0c\x00\x00\x00\x00'\ 16 | b'\x00\x00\x30\x18\x0c\x0c\x0c\x0c\x0c\x0c\x18\x30\x00\x00\x00\x00'\ 17 | b'\x00\x00\x00\x00\x00\x66\x3c\xff\x3c\x66\x00\x00\x00\x00\x00\x00'\ 18 | b'\x00\x00\x00\x00\x00\x18\x18\x7e\x18\x18\x00\x00\x00\x00\x00\x00'\ 19 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x18\x18\x30\x00\x00\x00'\ 20 | b'\x00\x00\x00\x00\x00\x00\x00\xfe\x00\x00\x00\x00\x00\x00\x00\x00'\ 21 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x18\x00\x00\x00\x00'\ 22 | b'\x00\x00\x00\x00\x02\x06\x0c\x18\x30\x60\xc0\x80\x00\x00\x00\x00'\ 23 | b'\x00\x00\x38\x6c\xc6\xc6\xd6\xd6\xc6\xc6\x6c\x38\x00\x00\x00\x00'\ 24 | b'\x00\x00\x18\x38\x78\x18\x18\x18\x18\x18\x18\x7e\x00\x00\x00\x00'\ 25 | b'\x00\x00\x7c\xc6\x06\x0c\x18\x30\x60\xc0\xc6\xfe\x00\x00\x00\x00'\ 26 | b'\x00\x00\x7c\xc6\x06\x06\x3c\x06\x06\x06\xc6\x7c\x00\x00\x00\x00'\ 27 | b'\x00\x00\x0c\x1c\x3c\x6c\xcc\xfe\x0c\x0c\x0c\x1e\x00\x00\x00\x00'\ 28 | b'\x00\x00\xfe\xc0\xc0\xc0\xfc\x06\x06\x06\xc6\x7c\x00\x00\x00\x00'\ 29 | b'\x00\x00\x38\x60\xc0\xc0\xfc\xc6\xc6\xc6\xc6\x7c\x00\x00\x00\x00'\ 30 | b'\x00\x00\xfe\xc6\x06\x06\x0c\x18\x30\x30\x30\x30\x00\x00\x00\x00'\ 31 | b'\x00\x00\x7c\xc6\xc6\xc6\x7c\xc6\xc6\xc6\xc6\x7c\x00\x00\x00\x00'\ 32 | b'\x00\x00\x7c\xc6\xc6\xc6\x7e\x06\x06\x06\x0c\x78\x00\x00\x00\x00'\ 33 | b'\x00\x00\x00\x00\x18\x18\x00\x00\x00\x18\x18\x00\x00\x00\x00\x00'\ 34 | b'\x00\x00\x00\x00\x18\x18\x00\x00\x00\x18\x18\x30\x00\x00\x00\x00'\ 35 | b'\x00\x00\x00\x06\x0c\x18\x30\x60\x30\x18\x0c\x06\x00\x00\x00\x00'\ 36 | b'\x00\x00\x00\x00\x00\x7e\x00\x00\x7e\x00\x00\x00\x00\x00\x00\x00'\ 37 | b'\x00\x00\x00\x60\x30\x18\x0c\x06\x0c\x18\x30\x60\x00\x00\x00\x00'\ 38 | b'\x00\x00\x7c\xc6\xc6\x0c\x18\x18\x18\x00\x18\x18\x00\x00\x00\x00'\ 39 | b'\x00\x00\x00\x7c\xc6\xc6\xde\xde\xde\xdc\xc0\x7c\x00\x00\x00\x00'\ 40 | b'\x00\x00\x10\x38\x6c\xc6\xc6\xfe\xc6\xc6\xc6\xc6\x00\x00\x00\x00'\ 41 | b'\x00\x00\xfc\x66\x66\x66\x7c\x66\x66\x66\x66\xfc\x00\x00\x00\x00'\ 42 | b'\x00\x00\x3c\x66\xc2\xc0\xc0\xc0\xc0\xc2\x66\x3c\x00\x00\x00\x00'\ 43 | b'\x00\x00\xf8\x6c\x66\x66\x66\x66\x66\x66\x6c\xf8\x00\x00\x00\x00'\ 44 | b'\x00\x00\xfe\x66\x62\x68\x78\x68\x60\x62\x66\xfe\x00\x00\x00\x00'\ 45 | b'\x00\x00\xfe\x66\x62\x68\x78\x68\x60\x60\x60\xf0\x00\x00\x00\x00'\ 46 | b'\x00\x00\x3c\x66\xc2\xc0\xc0\xde\xc6\xc6\x66\x3a\x00\x00\x00\x00'\ 47 | b'\x00\x00\xc6\xc6\xc6\xc6\xfe\xc6\xc6\xc6\xc6\xc6\x00\x00\x00\x00'\ 48 | b'\x00\x00\x3c\x18\x18\x18\x18\x18\x18\x18\x18\x3c\x00\x00\x00\x00'\ 49 | b'\x00\x00\x1e\x0c\x0c\x0c\x0c\x0c\xcc\xcc\xcc\x78\x00\x00\x00\x00'\ 50 | b'\x00\x00\xe6\x66\x66\x6c\x78\x78\x6c\x66\x66\xe6\x00\x00\x00\x00'\ 51 | b'\x00\x00\xf0\x60\x60\x60\x60\x60\x60\x62\x66\xfe\x00\x00\x00\x00'\ 52 | b'\x00\x00\xc6\xee\xfe\xfe\xd6\xc6\xc6\xc6\xc6\xc6\x00\x00\x00\x00'\ 53 | b'\x00\x00\xc6\xe6\xf6\xfe\xde\xce\xc6\xc6\xc6\xc6\x00\x00\x00\x00'\ 54 | b'\x00\x00\x7c\xc6\xc6\xc6\xc6\xc6\xc6\xc6\xc6\x7c\x00\x00\x00\x00'\ 55 | b'\x00\x00\xfc\x66\x66\x66\x7c\x60\x60\x60\x60\xf0\x00\x00\x00\x00'\ 56 | b'\x00\x00\x7c\xc6\xc6\xc6\xc6\xc6\xc6\xd6\xde\x7c\x0c\x0e\x00\x00'\ 57 | b'\x00\x00\xfc\x66\x66\x66\x7c\x6c\x66\x66\x66\xe6\x00\x00\x00\x00'\ 58 | b'\x00\x00\x7c\xc6\xc6\x60\x38\x0c\x06\xc6\xc6\x7c\x00\x00\x00\x00'\ 59 | b'\x00\x00\x7e\x7e\x5a\x18\x18\x18\x18\x18\x18\x3c\x00\x00\x00\x00'\ 60 | b'\x00\x00\xc6\xc6\xc6\xc6\xc6\xc6\xc6\xc6\xc6\x7c\x00\x00\x00\x00'\ 61 | b'\x00\x00\xc6\xc6\xc6\xc6\xc6\xc6\xc6\x6c\x38\x10\x00\x00\x00\x00'\ 62 | b'\x00\x00\xc6\xc6\xc6\xc6\xd6\xd6\xd6\xfe\xee\x6c\x00\x00\x00\x00'\ 63 | b'\x00\x00\xc6\xc6\x6c\x7c\x38\x38\x7c\x6c\xc6\xc6\x00\x00\x00\x00'\ 64 | b'\x00\x00\x66\x66\x66\x66\x3c\x18\x18\x18\x18\x3c\x00\x00\x00\x00'\ 65 | b'\x00\x00\xfe\xc6\x86\x0c\x18\x30\x60\xc2\xc6\xfe\x00\x00\x00\x00'\ 66 | b'\x00\x00\x3c\x30\x30\x30\x30\x30\x30\x30\x30\x3c\x00\x00\x00\x00'\ 67 | b'\x00\x00\x00\x80\xc0\xe0\x70\x38\x1c\x0e\x06\x02\x00\x00\x00\x00'\ 68 | b'\x00\x00\x3c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x3c\x00\x00\x00\x00'\ 69 | b'\x10\x38\x6c\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 70 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00'\ 71 | b'\x00\x30\x18\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 72 | b'\x00\x00\x00\x00\x00\x78\x0c\x7c\xcc\xcc\xcc\x76\x00\x00\x00\x00'\ 73 | b'\x00\x00\xe0\x60\x60\x78\x6c\x66\x66\x66\x66\x7c\x00\x00\x00\x00'\ 74 | b'\x00\x00\x00\x00\x00\x7c\xc6\xc0\xc0\xc0\xc6\x7c\x00\x00\x00\x00'\ 75 | b'\x00\x00\x1c\x0c\x0c\x3c\x6c\xcc\xcc\xcc\xcc\x76\x00\x00\x00\x00'\ 76 | b'\x00\x00\x00\x00\x00\x7c\xc6\xfe\xc0\xc0\xc6\x7c\x00\x00\x00\x00'\ 77 | b'\x00\x00\x1c\x36\x32\x30\x78\x30\x30\x30\x30\x78\x00\x00\x00\x00'\ 78 | b'\x00\x00\x00\x00\x00\x76\xcc\xcc\xcc\xcc\xcc\x7c\x0c\xcc\x78\x00'\ 79 | b'\x00\x00\xe0\x60\x60\x6c\x76\x66\x66\x66\x66\xe6\x00\x00\x00\x00'\ 80 | b'\x00\x00\x18\x18\x00\x38\x18\x18\x18\x18\x18\x3c\x00\x00\x00\x00'\ 81 | b'\x00\x00\x06\x06\x00\x0e\x06\x06\x06\x06\x06\x06\x66\x66\x3c\x00'\ 82 | b'\x00\x00\xe0\x60\x60\x66\x6c\x78\x78\x6c\x66\xe6\x00\x00\x00\x00'\ 83 | b'\x00\x00\x38\x18\x18\x18\x18\x18\x18\x18\x18\x3c\x00\x00\x00\x00'\ 84 | b'\x00\x00\x00\x00\x00\xec\xfe\xd6\xd6\xd6\xd6\xc6\x00\x00\x00\x00'\ 85 | b'\x00\x00\x00\x00\x00\xdc\x66\x66\x66\x66\x66\x66\x00\x00\x00\x00'\ 86 | b'\x00\x00\x00\x00\x00\x7c\xc6\xc6\xc6\xc6\xc6\x7c\x00\x00\x00\x00'\ 87 | b'\x00\x00\x00\x00\x00\xdc\x66\x66\x66\x66\x66\x7c\x60\x60\xf0\x00'\ 88 | b'\x00\x00\x00\x00\x00\x76\xcc\xcc\xcc\xcc\xcc\x7c\x0c\x0c\x1e\x00'\ 89 | b'\x00\x00\x00\x00\x00\xdc\x76\x66\x60\x60\x60\xf0\x00\x00\x00\x00'\ 90 | b'\x00\x00\x00\x00\x00\x7c\xc6\x60\x38\x0c\xc6\x7c\x00\x00\x00\x00'\ 91 | b'\x00\x00\x10\x30\x30\xfc\x30\x30\x30\x30\x36\x1c\x00\x00\x00\x00'\ 92 | b'\x00\x00\x00\x00\x00\xcc\xcc\xcc\xcc\xcc\xcc\x76\x00\x00\x00\x00'\ 93 | b'\x00\x00\x00\x00\x00\xc6\xc6\xc6\xc6\xc6\x6c\x38\x00\x00\x00\x00'\ 94 | b'\x00\x00\x00\x00\x00\xc6\xc6\xd6\xd6\xd6\xfe\x6c\x00\x00\x00\x00'\ 95 | b'\x00\x00\x00\x00\x00\xc6\x6c\x38\x38\x38\x6c\xc6\x00\x00\x00\x00'\ 96 | b'\x00\x00\x00\x00\x00\xc6\xc6\xc6\xc6\xc6\xc6\x7e\x06\x0c\xf8\x00'\ 97 | b'\x00\x00\x00\x00\x00\xfe\xcc\x18\x30\x60\xc6\xfe\x00\x00\x00\x00'\ 98 | b'\x00\x00\x0e\x18\x18\x18\x70\x18\x18\x18\x18\x0e\x00\x00\x00\x00'\ 99 | b'\x00\x00\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x00\x00\x00\x00'\ 100 | b'\x00\x00\x70\x18\x18\x18\x0e\x18\x18\x18\x18\x70\x00\x00\x00\x00'\ 101 | b'\x00\x76\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ 102 | b'\x00\x00\x00\x00\x10\x38\x6c\xc6\xc6\xc6\xfe\x00\x00\x00\x00\x00'\ 103 | 104 | FONT = memoryview(_FONT) 105 | -------------------------------------------------------------------------------- /fonts/romfonts/vga1_8x8.py: -------------------------------------------------------------------------------- 1 | """converted from vga_8x8.bin """ 2 | WIDTH = 8 3 | HEIGHT = 8 4 | FIRST = 0x20 5 | LAST = 0x7f 6 | _FONT =\ 7 | b'\x00\x00\x00\x00\x00\x00\x00\x00'\ 8 | b'\x18\x3c\x3c\x18\x18\x00\x18\x00'\ 9 | b'\x66\x66\x24\x00\x00\x00\x00\x00'\ 10 | b'\x6c\x6c\xfe\x6c\xfe\x6c\x6c\x00'\ 11 | b'\x18\x3e\x60\x3c\x06\x7c\x18\x00'\ 12 | b'\x00\xc6\xcc\x18\x30\x66\xc6\x00'\ 13 | b'\x38\x6c\x38\x76\xdc\xcc\x76\x00'\ 14 | b'\x18\x18\x30\x00\x00\x00\x00\x00'\ 15 | b'\x0c\x18\x30\x30\x30\x18\x0c\x00'\ 16 | b'\x30\x18\x0c\x0c\x0c\x18\x30\x00'\ 17 | b'\x00\x66\x3c\xff\x3c\x66\x00\x00'\ 18 | b'\x00\x18\x18\x7e\x18\x18\x00\x00'\ 19 | b'\x00\x00\x00\x00\x00\x18\x18\x30'\ 20 | b'\x00\x00\x00\x7e\x00\x00\x00\x00'\ 21 | b'\x00\x00\x00\x00\x00\x18\x18\x00'\ 22 | b'\x06\x0c\x18\x30\x60\xc0\x80\x00'\ 23 | b'\x38\x6c\xc6\xd6\xc6\x6c\x38\x00'\ 24 | b'\x18\x38\x18\x18\x18\x18\x7e\x00'\ 25 | b'\x7c\xc6\x06\x1c\x30\x66\xfe\x00'\ 26 | b'\x7c\xc6\x06\x3c\x06\xc6\x7c\x00'\ 27 | b'\x1c\x3c\x6c\xcc\xfe\x0c\x1e\x00'\ 28 | b'\xfe\xc0\xc0\xfc\x06\xc6\x7c\x00'\ 29 | b'\x38\x60\xc0\xfc\xc6\xc6\x7c\x00'\ 30 | b'\xfe\xc6\x0c\x18\x30\x30\x30\x00'\ 31 | b'\x7c\xc6\xc6\x7c\xc6\xc6\x7c\x00'\ 32 | b'\x7c\xc6\xc6\x7e\x06\x0c\x78\x00'\ 33 | b'\x00\x18\x18\x00\x00\x18\x18\x00'\ 34 | b'\x00\x18\x18\x00\x00\x18\x18\x30'\ 35 | b'\x06\x0c\x18\x30\x18\x0c\x06\x00'\ 36 | b'\x00\x00\x7e\x00\x00\x7e\x00\x00'\ 37 | b'\x60\x30\x18\x0c\x18\x30\x60\x00'\ 38 | b'\x7c\xc6\x0c\x18\x18\x00\x18\x00'\ 39 | b'\x7c\xc6\xde\xde\xde\xc0\x78\x00'\ 40 | b'\x38\x6c\xc6\xfe\xc6\xc6\xc6\x00'\ 41 | b'\xfc\x66\x66\x7c\x66\x66\xfc\x00'\ 42 | b'\x3c\x66\xc0\xc0\xc0\x66\x3c\x00'\ 43 | b'\xf8\x6c\x66\x66\x66\x6c\xf8\x00'\ 44 | b'\xfe\x62\x68\x78\x68\x62\xfe\x00'\ 45 | b'\xfe\x62\x68\x78\x68\x60\xf0\x00'\ 46 | b'\x3c\x66\xc0\xc0\xce\x66\x3a\x00'\ 47 | b'\xc6\xc6\xc6\xfe\xc6\xc6\xc6\x00'\ 48 | b'\x3c\x18\x18\x18\x18\x18\x3c\x00'\ 49 | b'\x1e\x0c\x0c\x0c\xcc\xcc\x78\x00'\ 50 | b'\xe6\x66\x6c\x78\x6c\x66\xe6\x00'\ 51 | b'\xf0\x60\x60\x60\x62\x66\xfe\x00'\ 52 | b'\xc6\xee\xfe\xfe\xd6\xc6\xc6\x00'\ 53 | b'\xc6\xe6\xf6\xde\xce\xc6\xc6\x00'\ 54 | b'\x7c\xc6\xc6\xc6\xc6\xc6\x7c\x00'\ 55 | b'\xfc\x66\x66\x7c\x60\x60\xf0\x00'\ 56 | b'\x7c\xc6\xc6\xc6\xc6\xce\x7c\x0e'\ 57 | b'\xfc\x66\x66\x7c\x6c\x66\xe6\x00'\ 58 | b'\x3c\x66\x30\x18\x0c\x66\x3c\x00'\ 59 | b'\x7e\x7e\x5a\x18\x18\x18\x3c\x00'\ 60 | b'\xc6\xc6\xc6\xc6\xc6\xc6\x7c\x00'\ 61 | b'\xc6\xc6\xc6\xc6\xc6\x6c\x38\x00'\ 62 | b'\xc6\xc6\xc6\xd6\xd6\xfe\x6c\x00'\ 63 | b'\xc6\xc6\x6c\x38\x6c\xc6\xc6\x00'\ 64 | b'\x66\x66\x66\x3c\x18\x18\x3c\x00'\ 65 | b'\xfe\xc6\x8c\x18\x32\x66\xfe\x00'\ 66 | b'\x3c\x30\x30\x30\x30\x30\x3c\x00'\ 67 | b'\xc0\x60\x30\x18\x0c\x06\x02\x00'\ 68 | b'\x3c\x0c\x0c\x0c\x0c\x0c\x3c\x00'\ 69 | b'\x10\x38\x6c\xc6\x00\x00\x00\x00'\ 70 | b'\x00\x00\x00\x00\x00\x00\x00\xff'\ 71 | b'\x30\x18\x0c\x00\x00\x00\x00\x00'\ 72 | b'\x00\x00\x78\x0c\x7c\xcc\x76\x00'\ 73 | b'\xe0\x60\x7c\x66\x66\x66\xdc\x00'\ 74 | b'\x00\x00\x7c\xc6\xc0\xc6\x7c\x00'\ 75 | b'\x1c\x0c\x7c\xcc\xcc\xcc\x76\x00'\ 76 | b'\x00\x00\x7c\xc6\xfe\xc0\x7c\x00'\ 77 | b'\x3c\x66\x60\xf8\x60\x60\xf0\x00'\ 78 | b'\x00\x00\x76\xcc\xcc\x7c\x0c\xf8'\ 79 | b'\xe0\x60\x6c\x76\x66\x66\xe6\x00'\ 80 | b'\x18\x00\x38\x18\x18\x18\x3c\x00'\ 81 | b'\x06\x00\x06\x06\x06\x66\x66\x3c'\ 82 | b'\xe0\x60\x66\x6c\x78\x6c\xe6\x00'\ 83 | b'\x38\x18\x18\x18\x18\x18\x3c\x00'\ 84 | b'\x00\x00\xec\xfe\xd6\xd6\xd6\x00'\ 85 | b'\x00\x00\xdc\x66\x66\x66\x66\x00'\ 86 | b'\x00\x00\x7c\xc6\xc6\xc6\x7c\x00'\ 87 | b'\x00\x00\xdc\x66\x66\x7c\x60\xf0'\ 88 | b'\x00\x00\x76\xcc\xcc\x7c\x0c\x1e'\ 89 | b'\x00\x00\xdc\x76\x60\x60\xf0\x00'\ 90 | b'\x00\x00\x7e\xc0\x7c\x06\xfc\x00'\ 91 | b'\x30\x30\xfc\x30\x30\x36\x1c\x00'\ 92 | b'\x00\x00\xcc\xcc\xcc\xcc\x76\x00'\ 93 | b'\x00\x00\xc6\xc6\xc6\x6c\x38\x00'\ 94 | b'\x00\x00\xc6\xd6\xd6\xfe\x6c\x00'\ 95 | b'\x00\x00\xc6\x6c\x38\x6c\xc6\x00'\ 96 | b'\x00\x00\xc6\xc6\xc6\x7e\x06\xfc'\ 97 | b'\x00\x00\x7e\x4c\x18\x32\x7e\x00'\ 98 | b'\x0e\x18\x18\x70\x18\x18\x0e\x00'\ 99 | b'\x18\x18\x18\x18\x18\x18\x18\x00'\ 100 | b'\x70\x18\x18\x0e\x18\x18\x70\x00'\ 101 | b'\x76\xdc\x00\x00\x00\x00\x00\x00'\ 102 | b'\x00\x10\x38\x6c\xc6\xc6\xfe\x00'\ 103 | 104 | FONT = memoryview(_FONT) 105 | -------------------------------------------------------------------------------- /fonts/romfonts/vga2_8x8.py: -------------------------------------------------------------------------------- 1 | """converted from vga_8x8.bin """ 2 | WIDTH = 8 3 | HEIGHT = 8 4 | FIRST = 0x00 5 | LAST = 0xff 6 | _FONT =\ 7 | b'\x00\x00\x00\x00\x00\x00\x00\x00'\ 8 | b'\x7e\x81\xa5\x81\xbd\x99\x81\x7e'\ 9 | b'\x7e\xff\xdb\xff\xc3\xe7\xff\x7e'\ 10 | b'\x6c\xfe\xfe\xfe\x7c\x38\x10\x00'\ 11 | b'\x10\x38\x7c\xfe\x7c\x38\x10\x00'\ 12 | b'\x38\x7c\x38\xfe\xfe\xd6\x10\x38'\ 13 | b'\x10\x38\x7c\xfe\xfe\x7c\x10\x38'\ 14 | b'\x00\x00\x18\x3c\x3c\x18\x00\x00'\ 15 | b'\xff\xff\xe7\xc3\xc3\xe7\xff\xff'\ 16 | b'\x00\x3c\x66\x42\x42\x66\x3c\x00'\ 17 | b'\xff\xc3\x99\xbd\xbd\x99\xc3\xff'\ 18 | b'\x0f\x07\x0f\x7d\xcc\xcc\xcc\x78'\ 19 | b'\x3c\x66\x66\x66\x3c\x18\x7e\x18'\ 20 | b'\x3f\x33\x3f\x30\x30\x70\xf0\xe0'\ 21 | b'\x7f\x63\x7f\x63\x63\x67\xe6\xc0'\ 22 | b'\x18\xdb\x3c\xe7\xe7\x3c\xdb\x18'\ 23 | b'\x80\xe0\xf8\xfe\xf8\xe0\x80\x00'\ 24 | b'\x02\x0e\x3e\xfe\x3e\x0e\x02\x00'\ 25 | b'\x18\x3c\x7e\x18\x18\x7e\x3c\x18'\ 26 | b'\x66\x66\x66\x66\x66\x00\x66\x00'\ 27 | b'\x7f\xdb\xdb\x7b\x1b\x1b\x1b\x00'\ 28 | b'\x3e\x61\x3c\x66\x66\x3c\x86\x7c'\ 29 | b'\x00\x00\x00\x00\x7e\x7e\x7e\x00'\ 30 | b'\x18\x3c\x7e\x18\x7e\x3c\x18\xff'\ 31 | b'\x18\x3c\x7e\x18\x18\x18\x18\x00'\ 32 | b'\x18\x18\x18\x18\x7e\x3c\x18\x00'\ 33 | b'\x00\x18\x0c\xfe\x0c\x18\x00\x00'\ 34 | b'\x00\x30\x60\xfe\x60\x30\x00\x00'\ 35 | b'\x00\x00\xc0\xc0\xc0\xfe\x00\x00'\ 36 | b'\x00\x24\x66\xff\x66\x24\x00\x00'\ 37 | b'\x00\x18\x3c\x7e\xff\xff\x00\x00'\ 38 | b'\x00\xff\xff\x7e\x3c\x18\x00\x00'\ 39 | b'\x00\x00\x00\x00\x00\x00\x00\x00'\ 40 | b'\x18\x3c\x3c\x18\x18\x00\x18\x00'\ 41 | b'\x66\x66\x24\x00\x00\x00\x00\x00'\ 42 | b'\x6c\x6c\xfe\x6c\xfe\x6c\x6c\x00'\ 43 | b'\x18\x3e\x60\x3c\x06\x7c\x18\x00'\ 44 | b'\x00\xc6\xcc\x18\x30\x66\xc6\x00'\ 45 | b'\x38\x6c\x38\x76\xdc\xcc\x76\x00'\ 46 | b'\x18\x18\x30\x00\x00\x00\x00\x00'\ 47 | b'\x0c\x18\x30\x30\x30\x18\x0c\x00'\ 48 | b'\x30\x18\x0c\x0c\x0c\x18\x30\x00'\ 49 | b'\x00\x66\x3c\xff\x3c\x66\x00\x00'\ 50 | b'\x00\x18\x18\x7e\x18\x18\x00\x00'\ 51 | b'\x00\x00\x00\x00\x00\x18\x18\x30'\ 52 | b'\x00\x00\x00\x7e\x00\x00\x00\x00'\ 53 | b'\x00\x00\x00\x00\x00\x18\x18\x00'\ 54 | b'\x06\x0c\x18\x30\x60\xc0\x80\x00'\ 55 | b'\x38\x6c\xc6\xd6\xc6\x6c\x38\x00'\ 56 | b'\x18\x38\x18\x18\x18\x18\x7e\x00'\ 57 | b'\x7c\xc6\x06\x1c\x30\x66\xfe\x00'\ 58 | b'\x7c\xc6\x06\x3c\x06\xc6\x7c\x00'\ 59 | b'\x1c\x3c\x6c\xcc\xfe\x0c\x1e\x00'\ 60 | b'\xfe\xc0\xc0\xfc\x06\xc6\x7c\x00'\ 61 | b'\x38\x60\xc0\xfc\xc6\xc6\x7c\x00'\ 62 | b'\xfe\xc6\x0c\x18\x30\x30\x30\x00'\ 63 | b'\x7c\xc6\xc6\x7c\xc6\xc6\x7c\x00'\ 64 | b'\x7c\xc6\xc6\x7e\x06\x0c\x78\x00'\ 65 | b'\x00\x18\x18\x00\x00\x18\x18\x00'\ 66 | b'\x00\x18\x18\x00\x00\x18\x18\x30'\ 67 | b'\x06\x0c\x18\x30\x18\x0c\x06\x00'\ 68 | b'\x00\x00\x7e\x00\x00\x7e\x00\x00'\ 69 | b'\x60\x30\x18\x0c\x18\x30\x60\x00'\ 70 | b'\x7c\xc6\x0c\x18\x18\x00\x18\x00'\ 71 | b'\x7c\xc6\xde\xde\xde\xc0\x78\x00'\ 72 | b'\x38\x6c\xc6\xfe\xc6\xc6\xc6\x00'\ 73 | b'\xfc\x66\x66\x7c\x66\x66\xfc\x00'\ 74 | b'\x3c\x66\xc0\xc0\xc0\x66\x3c\x00'\ 75 | b'\xf8\x6c\x66\x66\x66\x6c\xf8\x00'\ 76 | b'\xfe\x62\x68\x78\x68\x62\xfe\x00'\ 77 | b'\xfe\x62\x68\x78\x68\x60\xf0\x00'\ 78 | b'\x3c\x66\xc0\xc0\xce\x66\x3a\x00'\ 79 | b'\xc6\xc6\xc6\xfe\xc6\xc6\xc6\x00'\ 80 | b'\x3c\x18\x18\x18\x18\x18\x3c\x00'\ 81 | b'\x1e\x0c\x0c\x0c\xcc\xcc\x78\x00'\ 82 | b'\xe6\x66\x6c\x78\x6c\x66\xe6\x00'\ 83 | b'\xf0\x60\x60\x60\x62\x66\xfe\x00'\ 84 | b'\xc6\xee\xfe\xfe\xd6\xc6\xc6\x00'\ 85 | b'\xc6\xe6\xf6\xde\xce\xc6\xc6\x00'\ 86 | b'\x7c\xc6\xc6\xc6\xc6\xc6\x7c\x00'\ 87 | b'\xfc\x66\x66\x7c\x60\x60\xf0\x00'\ 88 | b'\x7c\xc6\xc6\xc6\xc6\xce\x7c\x0e'\ 89 | b'\xfc\x66\x66\x7c\x6c\x66\xe6\x00'\ 90 | b'\x3c\x66\x30\x18\x0c\x66\x3c\x00'\ 91 | b'\x7e\x7e\x5a\x18\x18\x18\x3c\x00'\ 92 | b'\xc6\xc6\xc6\xc6\xc6\xc6\x7c\x00'\ 93 | b'\xc6\xc6\xc6\xc6\xc6\x6c\x38\x00'\ 94 | b'\xc6\xc6\xc6\xd6\xd6\xfe\x6c\x00'\ 95 | b'\xc6\xc6\x6c\x38\x6c\xc6\xc6\x00'\ 96 | b'\x66\x66\x66\x3c\x18\x18\x3c\x00'\ 97 | b'\xfe\xc6\x8c\x18\x32\x66\xfe\x00'\ 98 | b'\x3c\x30\x30\x30\x30\x30\x3c\x00'\ 99 | b'\xc0\x60\x30\x18\x0c\x06\x02\x00'\ 100 | b'\x3c\x0c\x0c\x0c\x0c\x0c\x3c\x00'\ 101 | b'\x10\x38\x6c\xc6\x00\x00\x00\x00'\ 102 | b'\x00\x00\x00\x00\x00\x00\x00\xff'\ 103 | b'\x30\x18\x0c\x00\x00\x00\x00\x00'\ 104 | b'\x00\x00\x78\x0c\x7c\xcc\x76\x00'\ 105 | b'\xe0\x60\x7c\x66\x66\x66\xdc\x00'\ 106 | b'\x00\x00\x7c\xc6\xc0\xc6\x7c\x00'\ 107 | b'\x1c\x0c\x7c\xcc\xcc\xcc\x76\x00'\ 108 | b'\x00\x00\x7c\xc6\xfe\xc0\x7c\x00'\ 109 | b'\x3c\x66\x60\xf8\x60\x60\xf0\x00'\ 110 | b'\x00\x00\x76\xcc\xcc\x7c\x0c\xf8'\ 111 | b'\xe0\x60\x6c\x76\x66\x66\xe6\x00'\ 112 | b'\x18\x00\x38\x18\x18\x18\x3c\x00'\ 113 | b'\x06\x00\x06\x06\x06\x66\x66\x3c'\ 114 | b'\xe0\x60\x66\x6c\x78\x6c\xe6\x00'\ 115 | b'\x38\x18\x18\x18\x18\x18\x3c\x00'\ 116 | b'\x00\x00\xec\xfe\xd6\xd6\xd6\x00'\ 117 | b'\x00\x00\xdc\x66\x66\x66\x66\x00'\ 118 | b'\x00\x00\x7c\xc6\xc6\xc6\x7c\x00'\ 119 | b'\x00\x00\xdc\x66\x66\x7c\x60\xf0'\ 120 | b'\x00\x00\x76\xcc\xcc\x7c\x0c\x1e'\ 121 | b'\x00\x00\xdc\x76\x60\x60\xf0\x00'\ 122 | b'\x00\x00\x7e\xc0\x7c\x06\xfc\x00'\ 123 | b'\x30\x30\xfc\x30\x30\x36\x1c\x00'\ 124 | b'\x00\x00\xcc\xcc\xcc\xcc\x76\x00'\ 125 | b'\x00\x00\xc6\xc6\xc6\x6c\x38\x00'\ 126 | b'\x00\x00\xc6\xd6\xd6\xfe\x6c\x00'\ 127 | b'\x00\x00\xc6\x6c\x38\x6c\xc6\x00'\ 128 | b'\x00\x00\xc6\xc6\xc6\x7e\x06\xfc'\ 129 | b'\x00\x00\x7e\x4c\x18\x32\x7e\x00'\ 130 | b'\x0e\x18\x18\x70\x18\x18\x0e\x00'\ 131 | b'\x18\x18\x18\x18\x18\x18\x18\x00'\ 132 | b'\x70\x18\x18\x0e\x18\x18\x70\x00'\ 133 | b'\x76\xdc\x00\x00\x00\x00\x00\x00'\ 134 | b'\x00\x10\x38\x6c\xc6\xc6\xfe\x00'\ 135 | b'\x7c\xc6\xc0\xc0\xc6\x7c\x0c\x78'\ 136 | b'\xcc\x00\xcc\xcc\xcc\xcc\x76\x00'\ 137 | b'\x0c\x18\x7c\xc6\xfe\xc0\x7c\x00'\ 138 | b'\x7c\x82\x78\x0c\x7c\xcc\x76\x00'\ 139 | b'\xc6\x00\x78\x0c\x7c\xcc\x76\x00'\ 140 | b'\x30\x18\x78\x0c\x7c\xcc\x76\x00'\ 141 | b'\x30\x30\x78\x0c\x7c\xcc\x76\x00'\ 142 | b'\x00\x00\x7e\xc0\xc0\x7e\x0c\x38'\ 143 | b'\x7c\x82\x7c\xc6\xfe\xc0\x7c\x00'\ 144 | b'\xc6\x00\x7c\xc6\xfe\xc0\x7c\x00'\ 145 | b'\x30\x18\x7c\xc6\xfe\xc0\x7c\x00'\ 146 | b'\x66\x00\x38\x18\x18\x18\x3c\x00'\ 147 | b'\x7c\x82\x38\x18\x18\x18\x3c\x00'\ 148 | b'\x30\x18\x00\x38\x18\x18\x3c\x00'\ 149 | b'\xc6\x38\x6c\xc6\xfe\xc6\xc6\x00'\ 150 | b'\x38\x6c\x7c\xc6\xfe\xc6\xc6\x00'\ 151 | b'\x18\x30\xfe\xc0\xf8\xc0\xfe\x00'\ 152 | b'\x00\x00\x7e\x18\x7e\xd8\x7e\x00'\ 153 | b'\x3e\x6c\xcc\xfe\xcc\xcc\xce\x00'\ 154 | b'\x7c\x82\x7c\xc6\xc6\xc6\x7c\x00'\ 155 | b'\xc6\x00\x7c\xc6\xc6\xc6\x7c\x00'\ 156 | b'\x30\x18\x7c\xc6\xc6\xc6\x7c\x00'\ 157 | b'\x78\x84\x00\xcc\xcc\xcc\x76\x00'\ 158 | b'\x60\x30\xcc\xcc\xcc\xcc\x76\x00'\ 159 | b'\xc6\x00\xc6\xc6\xc6\x7e\x06\xfc'\ 160 | b'\xc6\x38\x6c\xc6\xc6\x6c\x38\x00'\ 161 | b'\xc6\x00\xc6\xc6\xc6\xc6\x7c\x00'\ 162 | b'\x18\x18\x7e\xc0\xc0\x7e\x18\x18'\ 163 | b'\x38\x6c\x64\xf0\x60\x66\xfc\x00'\ 164 | b'\x66\x66\x3c\x7e\x18\x7e\x18\x18'\ 165 | b'\xf8\xcc\xcc\xfa\xc6\xcf\xc6\xc7'\ 166 | b'\x0e\x1b\x18\x3c\x18\xd8\x70\x00'\ 167 | b'\x18\x30\x78\x0c\x7c\xcc\x76\x00'\ 168 | b'\x0c\x18\x00\x38\x18\x18\x3c\x00'\ 169 | b'\x0c\x18\x7c\xc6\xc6\xc6\x7c\x00'\ 170 | b'\x18\x30\xcc\xcc\xcc\xcc\x76\x00'\ 171 | b'\x76\xdc\x00\xdc\x66\x66\x66\x00'\ 172 | b'\x76\xdc\x00\xe6\xf6\xde\xce\x00'\ 173 | b'\x3c\x6c\x6c\x3e\x00\x7e\x00\x00'\ 174 | b'\x38\x6c\x6c\x38\x00\x7c\x00\x00'\ 175 | b'\x18\x00\x18\x18\x30\x63\x3e\x00'\ 176 | b'\x00\x00\x00\xfe\xc0\xc0\x00\x00'\ 177 | b'\x00\x00\x00\xfe\x06\x06\x00\x00'\ 178 | b'\x63\xe6\x6c\x7e\x33\x66\xcc\x0f'\ 179 | b'\x63\xe6\x6c\x7a\x36\x6a\xdf\x06'\ 180 | b'\x18\x00\x18\x18\x3c\x3c\x18\x00'\ 181 | b'\x00\x33\x66\xcc\x66\x33\x00\x00'\ 182 | b'\x00\xcc\x66\x33\x66\xcc\x00\x00'\ 183 | b'\x22\x88\x22\x88\x22\x88\x22\x88'\ 184 | b'\x55\xaa\x55\xaa\x55\xaa\x55\xaa'\ 185 | b'\x77\xdd\x77\xdd\x77\xdd\x77\xdd'\ 186 | b'\x18\x18\x18\x18\x18\x18\x18\x18'\ 187 | b'\x18\x18\x18\x18\xf8\x18\x18\x18'\ 188 | b'\x18\x18\xf8\x18\xf8\x18\x18\x18'\ 189 | b'\x36\x36\x36\x36\xf6\x36\x36\x36'\ 190 | b'\x00\x00\x00\x00\xfe\x36\x36\x36'\ 191 | b'\x00\x00\xf8\x18\xf8\x18\x18\x18'\ 192 | b'\x36\x36\xf6\x06\xf6\x36\x36\x36'\ 193 | b'\x36\x36\x36\x36\x36\x36\x36\x36'\ 194 | b'\x00\x00\xfe\x06\xf6\x36\x36\x36'\ 195 | b'\x36\x36\xf6\x06\xfe\x00\x00\x00'\ 196 | b'\x36\x36\x36\x36\xfe\x00\x00\x00'\ 197 | b'\x18\x18\xf8\x18\xf8\x00\x00\x00'\ 198 | b'\x00\x00\x00\x00\xf8\x18\x18\x18'\ 199 | b'\x18\x18\x18\x18\x1f\x00\x00\x00'\ 200 | b'\x18\x18\x18\x18\xff\x00\x00\x00'\ 201 | b'\x00\x00\x00\x00\xff\x18\x18\x18'\ 202 | b'\x18\x18\x18\x18\x1f\x18\x18\x18'\ 203 | b'\x00\x00\x00\x00\xff\x00\x00\x00'\ 204 | b'\x18\x18\x18\x18\xff\x18\x18\x18'\ 205 | b'\x18\x18\x1f\x18\x1f\x18\x18\x18'\ 206 | b'\x36\x36\x36\x36\x37\x36\x36\x36'\ 207 | b'\x36\x36\x37\x30\x3f\x00\x00\x00'\ 208 | b'\x00\x00\x3f\x30\x37\x36\x36\x36'\ 209 | b'\x36\x36\xf7\x00\xff\x00\x00\x00'\ 210 | b'\x00\x00\xff\x00\xf7\x36\x36\x36'\ 211 | b'\x36\x36\x37\x30\x37\x36\x36\x36'\ 212 | b'\x00\x00\xff\x00\xff\x00\x00\x00'\ 213 | b'\x36\x36\xf7\x00\xf7\x36\x36\x36'\ 214 | b'\x18\x18\xff\x00\xff\x00\x00\x00'\ 215 | b'\x36\x36\x36\x36\xff\x00\x00\x00'\ 216 | b'\x00\x00\xff\x00\xff\x18\x18\x18'\ 217 | b'\x00\x00\x00\x00\xff\x36\x36\x36'\ 218 | b'\x36\x36\x36\x36\x3f\x00\x00\x00'\ 219 | b'\x18\x18\x1f\x18\x1f\x00\x00\x00'\ 220 | b'\x00\x00\x1f\x18\x1f\x18\x18\x18'\ 221 | b'\x00\x00\x00\x00\x3f\x36\x36\x36'\ 222 | b'\x36\x36\x36\x36\xff\x36\x36\x36'\ 223 | b'\x18\x18\xff\x18\xff\x18\x18\x18'\ 224 | b'\x18\x18\x18\x18\xf8\x00\x00\x00'\ 225 | b'\x00\x00\x00\x00\x1f\x18\x18\x18'\ 226 | b'\xff\xff\xff\xff\xff\xff\xff\xff'\ 227 | b'\x00\x00\x00\x00\xff\xff\xff\xff'\ 228 | b'\xf0\xf0\xf0\xf0\xf0\xf0\xf0\xf0'\ 229 | b'\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f'\ 230 | b'\xff\xff\xff\xff\x00\x00\x00\x00'\ 231 | b'\x00\x00\x76\xdc\xc8\xdc\x76\x00'\ 232 | b'\x78\xcc\xcc\xd8\xcc\xc6\xcc\x00'\ 233 | b'\xfe\xc6\xc0\xc0\xc0\xc0\xc0\x00'\ 234 | b'\x00\x00\xfe\x6c\x6c\x6c\x6c\x00'\ 235 | b'\xfe\xc6\x60\x30\x60\xc6\xfe\x00'\ 236 | b'\x00\x00\x7e\xd8\xd8\xd8\x70\x00'\ 237 | b'\x00\x00\x66\x66\x66\x66\x7c\xc0'\ 238 | b'\x00\x76\xdc\x18\x18\x18\x18\x00'\ 239 | b'\x7e\x18\x3c\x66\x66\x3c\x18\x7e'\ 240 | b'\x38\x6c\xc6\xfe\xc6\x6c\x38\x00'\ 241 | b'\x38\x6c\xc6\xc6\x6c\x6c\xee\x00'\ 242 | b'\x0e\x18\x0c\x3e\x66\x66\x3c\x00'\ 243 | b'\x00\x00\x7e\xdb\xdb\x7e\x00\x00'\ 244 | b'\x06\x0c\x7e\xdb\xdb\x7e\x60\xc0'\ 245 | b'\x1e\x30\x60\x7e\x60\x30\x1e\x00'\ 246 | b'\x00\x7c\xc6\xc6\xc6\xc6\xc6\x00'\ 247 | b'\x00\xfe\x00\xfe\x00\xfe\x00\x00'\ 248 | b'\x18\x18\x7e\x18\x18\x00\x7e\x00'\ 249 | b'\x30\x18\x0c\x18\x30\x00\x7e\x00'\ 250 | b'\x0c\x18\x30\x18\x0c\x00\x7e\x00'\ 251 | b'\x0e\x1b\x1b\x18\x18\x18\x18\x18'\ 252 | b'\x18\x18\x18\x18\x18\xd8\xd8\x70'\ 253 | b'\x00\x18\x00\x7e\x00\x18\x00\x00'\ 254 | b'\x00\x76\xdc\x00\x76\xdc\x00\x00'\ 255 | b'\x38\x6c\x6c\x38\x00\x00\x00\x00'\ 256 | b'\x00\x00\x00\x18\x18\x00\x00\x00'\ 257 | b'\x00\x00\x00\x18\x00\x00\x00\x00'\ 258 | b'\x0f\x0c\x0c\x0c\xec\x6c\x3c\x1c'\ 259 | b'\x6c\x36\x36\x36\x36\x00\x00\x00'\ 260 | b'\x78\x0c\x18\x30\x7c\x00\x00\x00'\ 261 | b'\x00\x00\x3c\x3c\x3c\x3c\x00\x00'\ 262 | b'\x00\x00\x00\x00\x00\x00\x00\x00'\ 263 | 264 | FONT = memoryview(_FONT) 265 | -------------------------------------------------------------------------------- /fonts/truetype/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/fonts/truetype/__init__.py -------------------------------------------------------------------------------- /lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/lib/__init__.py -------------------------------------------------------------------------------- /sphinx/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = source 8 | BUILDDIR = build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 20 | 21 | update: 22 | # Update documentation on my webserver using rsync over ssh 23 | # /usr/bin/rsync --progress --delete -e 'ssh -i ~/.ssh/id_rsa' -avz build/html/ penfold.owt.com:/htdocs/st7789s3/ 24 | # update docs directory of this repo using rsync 25 | /usr/bin/rsync --progress --delete -avz build/html/ ../docs/ 26 | -------------------------------------------------------------------------------- /sphinx/requires.txt: -------------------------------------------------------------------------------- 1 | # additional sphinx plug-ins, install using pip3 2 | sphinx 3 | sphinx-prompt 4 | sphinxcontrib.napoleon 5 | sphinxcontrib.napoleon 6 | sphinxcontrib.globalsubs 7 | sphinx_rtd_theme 8 | -------------------------------------------------------------------------------- /sphinx/source/_static/vga1_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga1_16x16.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga1_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga1_16x32.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga1_8x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga1_8x16.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga1_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga1_8x8.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga1_bold_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga1_bold_16x16.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga1_bold_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga1_bold_16x32.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga2_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga2_16x16.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga2_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga2_16x32.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga2_8x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga2_8x16.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga2_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga2_8x8.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga2_bold_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga2_bold_16x16.png -------------------------------------------------------------------------------- /sphinx/source/_static/vga2_bold_16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/russhughes/t-display-s3/0ac7440b83f6c42dca597f0b1b3ff2454526d61e/sphinx/source/_static/vga2_bold_16x32.png -------------------------------------------------------------------------------- /sphinx/source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Configuration file for the Sphinx documentation builder. 4 | # 5 | # This file does only contain a selection of the most common options. For a 6 | # full list see the documentation: 7 | # http://www.sphinx-doc.org/en/master/config 8 | 9 | # -- Path setup -------------------------------------------------------------- 10 | 11 | # If extensions (or modules to document with autodoc) are in another directory, 12 | # add these directories to sys.path here. If the directory is relative to the 13 | # documentation root, use os.path.abspath to make it absolute, like shown here. 14 | # 15 | import os 16 | import sys 17 | sys.path.insert(0, os.path.abspath('../../examples')) 18 | sys.path.insert(0, os.path.abspath('../../lib')) 19 | 20 | autodoc_mock_imports = [ 21 | 'micropython', 22 | 'ustruct', 23 | 'machine', 24 | 'board', 25 | 'network', 26 | 'esp', 27 | 'uos', 28 | 'btree', 29 | ] 30 | autodoc_member_order = 'bysource' 31 | # -- Project information ----------------------------------------------------- 32 | 33 | project = u'st7789s3' 34 | copyright = u'2022, Russ Hughes' 35 | author = u'Russ Hughes' 36 | 37 | # The short X.Y version 38 | version = u'' 39 | # The full version, including alpha/beta/rc tags 40 | release = u'0.1.0' 41 | 42 | 43 | # -- General configuration --------------------------------------------------- 44 | 45 | # If your documentation needs a minimal Sphinx version, state it here. 46 | # 47 | # needs_sphinx = '1.0' 48 | 49 | # Add any Sphinx extension module names here, as strings. They can be 50 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 51 | # ones. 52 | extensions = [ 53 | 'sphinx.ext.autodoc', 54 | 'sphinx.ext.doctest', 55 | 'sphinxcontrib.napoleon', 56 | 'sphinxcontrib.globalsubs', 57 | 'sphinx.ext.autosummary', 58 | 'sphinx.ext.autosectionlabel', 59 | 'sphinx-prompt', 60 | 'sphinx_rtd_theme', 61 | 'sphinx.ext.todo', 62 | 'sphinx.ext.coverage', 63 | 'sphinx.ext.viewcode', 64 | 'sphinx.ext.githubpages', 65 | ] 66 | 67 | # Add any paths that contain templates here, relative to this directory. 68 | templates_path = ['_templates'] 69 | 70 | # The suffix(es) of source filenames. 71 | # You can specify multiple suffix as a list of string: 72 | # 73 | # source_suffix = ['.rst', '.md'] 74 | source_suffix = '.rst' 75 | 76 | # The master toctree document. 77 | master_doc = 'index' 78 | 79 | # The language for content autogenerated by Sphinx. Refer to documentation 80 | # for a list of supported languages. 81 | # 82 | # This is also used if you do content translation via gettext catalogs. 83 | # Usually you set "language" from the command line for these cases. 84 | language = None 85 | 86 | # List of patterns, relative to source directory, that match files and 87 | # directories to ignore when looking for source files. 88 | # This pattern also affects html_static_path and html_extra_path. 89 | exclude_patterns = [] 90 | 91 | # The name of the Pygments (syntax highlighting) style to use. 92 | pygments_style = None 93 | 94 | 95 | # -- Options for HTML output ------------------------------------------------- 96 | 97 | # The theme to use for HTML and HTML Help pages. See the documentation for 98 | # a list of builtin themes. 99 | # 100 | #html_theme = 'alabaster'] 101 | html_show_copyright = False 102 | html_theme = 'sphinx_rtd_theme' 103 | html_theme_options = { 104 | 'canonical_url': '', 105 | 'logo_only': False, 106 | 'display_version': True, 107 | 'prev_next_buttons_location': 'bottom', 108 | 'style_external_links': True, 109 | 'style_nav_header_background': '#2980B9', 110 | # Toc options 111 | 'collapse_navigation': False, 112 | 'sticky_navigation': True, 113 | 'navigation_depth': 4, 114 | 'includehidden': True, 115 | 'titles_only': False 116 | } 117 | # Theme options are theme-specific and customize the look and feel of a theme 118 | # further. For a list of options available for each theme, see the 119 | # documentation. 120 | # 121 | # html_theme_options = {} 122 | 123 | # Add any paths that contain custom static files (such as style sheets) here, 124 | # relative to this directory. They are copied after the builtin static files, 125 | # so a file named "default.css" will overwrite the builtin "default.css". 126 | html_static_path = ['_static'] 127 | 128 | # Custom sidebar templates, must be a dictionary that maps document names 129 | # to template names. 130 | # 131 | # The default sidebars (for documents that don't match any pattern) are 132 | # defined by theme itself. Builtin themes are using these templates by 133 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 134 | # 'searchbox.html']``. 135 | # 136 | # html_sidebars = {} 137 | 138 | 139 | # -- Options for HTMLHelp output --------------------------------------------- 140 | 141 | # Output file base name for HTML help builder. 142 | htmlhelp_basename = 'st7789s3doc' 143 | 144 | 145 | # -- Options for LaTeX output ------------------------------------------------ 146 | 147 | latex_elements = { 148 | # The paper size ('letterpaper' or 'a4paper'). 149 | # 150 | # 'papersize': 'letterpaper', 151 | 152 | # The font size ('10pt', '11pt' or '12pt'). 153 | # 154 | # 'pointsize': '10pt', 155 | 156 | # Additional stuff for the LaTeX preamble. 157 | # 158 | # 'preamble': '', 159 | 160 | # Latex figure (float) alignment 161 | # 162 | # 'figure_align': 'htbp', 163 | } 164 | 165 | # Grouping the document tree into LaTeX files. List of tuples 166 | # (source start file, target name, title, 167 | # author, documentclass [howto, manual, or own class]). 168 | latex_documents = [ 169 | (master_doc, 'st7789s3.tex', u'st7789s3 Documentation', 170 | u'Russ Hughes', 'manual'), 171 | ] 172 | 173 | 174 | # -- Options for manual page output ------------------------------------------ 175 | 176 | # One entry per manual page. List of tuples 177 | # (source start file, name, description, authors, manual section). 178 | man_pages = [ 179 | (master_doc, 'st7789s3', u'st7789s3 Documentation', 180 | [author], 1) 181 | ] 182 | 183 | 184 | # -- Options for Texinfo output ---------------------------------------------- 185 | 186 | # Grouping the document tree into Texinfo files. List of tuples 187 | # (source start file, target name, title, author, 188 | # dir menu entry, description, category) 189 | texinfo_documents = [ 190 | (master_doc, 'st7789s3', u'st7789s3 Documentation', 191 | author, 'st7789s3', 'Dispaly driver for T-Display-S3.', 192 | 'Miscellaneous'), 193 | ] 194 | 195 | 196 | # -- Options for Epub output ------------------------------------------------- 197 | 198 | # Bibliographic Dublin Core info. 199 | epub_title = project 200 | 201 | # The unique identifier of the text. This can be a ISBN number 202 | # or the project homepage. 203 | # 204 | # epub_identifier = '' 205 | 206 | # A unique identification for the text. 207 | # 208 | # epub_uid = '' 209 | 210 | # A list of files that should not be packed into the epub file. 211 | epub_exclude_files = ['search.html'] 212 | 213 | 214 | # -- Extension configuration ------------------------------------------------- 215 | 216 | # -- Options for todo extension ---------------------------------------------- 217 | 218 | # If true, `todo` and `todoList` produce output, else they produce nothing. 219 | todo_include_todos = True 220 | -------------------------------------------------------------------------------- /sphinx/source/examples.rst: -------------------------------------------------------------------------------- 1 | **************** 2 | Example Programs 3 | **************** 4 | 5 | These examples run on the LilyGo TTGO T-Display-S3 available from the usual 6 | locations. See https://github.com/Xinyuan-LilyGO/T-Display-S3 for more 7 | information. 8 | 9 | 10 | lines.py 11 | -------- 12 | 13 | .. literalinclude:: ../../examples/lines.py 14 | :linenos: 15 | :language: python 16 | 17 | 18 | hello.py 19 | -------- 20 | 21 | .. literalinclude:: ../../examples/hello.py 22 | :linenos: 23 | :language: python 24 | 25 | feathers.py 26 | ----------- 27 | 28 | .. literalinclude:: ../../examples/feathers.py 29 | :linenos: 30 | :language: python 31 | 32 | 33 | fonts.py 34 | -------- 35 | 36 | .. literalinclude:: ../../examples/fonts.py 37 | :linenos: 38 | :language: python 39 | 40 | 41 | scroll.py 42 | --------- 43 | 44 | .. literalinclude:: ../../examples/scroll.py 45 | :linenos: 46 | :language: python 47 | 48 | 49 | toasters.py 50 | ----------- 51 | 52 | Flying toasters sprite demo using bitmaps created from spritesheet using the imgtobitmap.py utility. 53 | See the maketoast script in the utils directory for details. See the 320x240 toasters example for 54 | a more advanced example that uses the sprites2bitmap utility and indexed bitmaps. 55 | 56 | .. literalinclude:: ../../examples/toasters/toasters.py 57 | :linenos: 58 | :language: python 59 | 60 | 61 | chango.py 62 | --------- 63 | 64 | Test for font2bitmap converter for the driver. 65 | See the font2bitmap program in the utils directory. 66 | 67 | .. literalinclude:: ../../examples/truetype/chango.py 68 | :linenos: 69 | :language: python 70 | 71 | 72 | noto_fonts.py 73 | ------------- 74 | 75 | Test for font2bitmap converter for the driver. 76 | See the font2bitmap program in the utils directory. 77 | 78 | .. literalinclude:: ../../examples/truetype/noto_fonts.py 79 | :linenos: 80 | :language: python 81 | 82 | -------------------------------------------------------------------------------- /sphinx/source/fonts.rst: -------------------------------------------------------------------------------- 1 | Fonts 2 | ===== 3 | 4 | Two type of fonts are supported by this driver fixed size bitmap fonts 5 | converted from PC Bios images using the font_from_romfont utility and fixed or proportional fonts converted from True-Type fonts using the font2bitmap utility. 6 | 7 | The rom fonts are available in 128 and 256 PC character sets in 8x8, 8x16, 16x6 and 16x32 pixel sizes. They written using the text method. 8 | 9 | The True-Type fonts can be converted to any size as long as the widest 10 | character is 256 pixels or less. They are written using the write method. 11 | 12 | Pre-compiling the font files to .mpy files will significantly reduce the memory required for the fonts. 13 | 14 | Rom Font Conversion 15 | ------------------- 16 | 17 | The `utils` directory contains the font_from_romfont.py program used to convert PC BIOS bitmap fonts from the font-bin directory of spacerace's 18 | https://github.com/spacerace/romfont repo. 19 | 20 | The utility converts all romfont bin files in the specified -input-directory (-i) and writes python font files to the specified -output-directory (-o). 21 | 22 | Characters included can be limited by using the -first-char (-f) and -last-char (-l) options. 23 | 24 | Example: 25 | 26 | font_from_romfont -i font-bin -o fonts -f 32 -l 127 27 | 28 | 29 | .. literalinclude:: romfont.py 30 | :linenos: 31 | :language: python 32 | :caption: Sample converted romfont font module. 33 | 34 | 35 | True-Type Font Conversion 36 | ------------------------- 37 | 38 | The `utils` directory contains the `font2bitmap.py` program used to convert True-Type font into bitmap font modules. Use the -h option to see details of the available options. The `font2bitmap.py` program uses font handling classes from Dan Bader blog post on using freetype 39 | http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python and 40 | the negative glyph.left fix from peterhinch's font conversion program 41 | https://github.com/peterhinch/micropython-font-to-py. 42 | 43 | The utility requires the python freetype module. 44 | 45 | Example use: 46 | 47 | - ./font2bitmap NotoSans-Regular.ttf 32 -s "0123456789ABCEDF" 48 | - ./font2bitmap.py Chango-Regular.ttf 16 -c 0x20-0x7f 49 | 50 | 51 | .. literalinclude:: truetype.py 52 | :linenos: 53 | :language: python 54 | :caption: Sample converted TrueType font module. 55 | 56 | 57 | 58 | 8x8 Rom Fonts 59 | ------------- 60 | 61 | .. figure:: _static/vga1_8x8.png 62 | :align: center 63 | 64 | vga1_8x8.py: 128 Character 8x8 Font 65 | 66 | | 67 | 68 | .. figure:: _static/vga2_8x8.png 69 | :align: center 70 | 71 | vga2_8x8.py: 256 Character 8x8 Font 72 | 73 | | 74 | 75 | 8x16 Rom Fonts 76 | -------------- 77 | 78 | .. figure:: _static/vga1_8x16.png 79 | :align: center 80 | 81 | vga1_8x16.py: 128 Character 8x16 Font 82 | 83 | | 84 | 85 | .. figure:: _static/vga2_8x16.png 86 | :align: center 87 | 88 | vga2_8x16.py: 256 Character 8x16 Font 89 | 90 | | 91 | 92 | 16x16 Rom Fonts 93 | --------------- 94 | 95 | .. figure:: _static/vga1_16x16.png 96 | :align: center 97 | 98 | vga1_16x16.py: 128 Character 16x16 Thin Font 99 | 100 | | 101 | 102 | .. figure:: _static/vga1_bold_16x16.png 103 | :align: center 104 | 105 | vga1_bold_16x16.py: 128 Character 16x16 Bold Font 106 | 107 | | 108 | 109 | .. figure:: _static/vga2_16x16.png 110 | :align: center 111 | 112 | vga2_16x16.py: 256 Character 16x16 Thin Font 113 | 114 | | 115 | 116 | .. figure:: _static/vga2_bold_16x16.png 117 | :align: center 118 | 119 | vga2_bold_16x16.py: 256 Character 16x16 Bold Font 120 | 121 | | 122 | 123 | 16x32 Rom Fonts 124 | --------------- 125 | 126 | .. figure:: _static/vga1_16x32.png 127 | :align: center 128 | 129 | vga1_16x32.py: 128 Character 16x32 Thin Font 130 | 131 | | 132 | 133 | .. figure:: _static/vga1_bold_16x32.png 134 | :align: center 135 | 136 | vga1_bold_16x32.py: 128 Character 16x32 Bold Font 137 | 138 | | 139 | 140 | .. figure:: _static/vga2_16x32.png 141 | :align: center 142 | 143 | vga2_16x32.py: 256 Character 16x32 Thin Font 144 | 145 | | 146 | 147 | .. figure:: _static/vga2_bold_16x32.png 148 | :align: center 149 | 150 | vga2_bold_16x32.py: 256 Character 16x32 Bold Font 151 | 152 | | 153 | -------------------------------------------------------------------------------- /sphinx/source/index.rst: -------------------------------------------------------------------------------- 1 | st7789s3 Driver 2 | =============== 3 | 4 | st7789 tft driver in MicroPython based on devbis' st7789py_mpy module from 5 | https://github.com/devbis/st7789py_mpy. 6 | 7 | I added support for display rotation, scrolling and drawing text using 8 and 16 8 | bit wide bitmap fonts with heights that are multiples of 8. Included are 12 9 | bitmap fonts derived from classic pc text mode fonts. 10 | 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | :caption: Contents: 15 | 16 | self 17 | st7789s3 18 | examples 19 | fonts 20 | 21 | Index 22 | ===== 23 | 24 | * :ref:`genindex` 25 | -------------------------------------------------------------------------------- /sphinx/source/romfont.py: -------------------------------------------------------------------------------- 1 | """converted from vga_8x8.bin """ 2 | 3 | # font width 4 | WIDTH = 8 5 | 6 | # font height 7 | HEIGHT = 8 8 | 9 | # first character in front 10 | FIRST = 0x20 11 | 12 | # last character in font 13 | LAST = 0x7f 14 | 15 | # bitmap of each character from FIRST to LAST 16 | _FONT =\ 17 | b'\x00\x00\x00\x00\x00\x00\x00\x00'\ 18 | b'\x18\x3c\x3c\x18\x18\x00\x18\x00'\ 19 | b'\x66\x66\x24\x00\x00\x00\x00\x00'\ 20 | 21 | ... many more lines of data... 22 | 23 | b'\x70\x18\x18\x0e\x18\x18\x70\x00'\ 24 | b'\x76\xdc\x00\x00\x00\x00\x00\x00'\ 25 | b'\x00\x10\x38\x6c\xc6\xc6\xfe\x00'\ 26 | 27 | FONT = memoryview(_FONT) 28 | -------------------------------------------------------------------------------- /sphinx/source/st7789s3.rst: -------------------------------------------------------------------------------- 1 | st7789s3 Reference 2 | ================== 3 | 4 | .. automodule:: st7789s3 5 | :members: 6 | -------------------------------------------------------------------------------- /sphinx/source/truetype.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Converted from Chango-Regular.ttf using: 3 | # ./font2bitmap.py Chango-Regular.ttf 16 -c 0x20-0x7f 4 | 5 | # Maps the order of the character data 6 | MAP = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" 7 | 8 | # Number of color bits per pixel, currently only 1 is used but could be 9 | # increased to support antialiased or smoothed fonts in the future. 10 | BPP = 1 11 | 12 | # Font height 13 | HEIGHT = 17 14 | 15 | # Font max width 16 | MAX_WIDTH = 24 17 | 18 | # one byte per character table of widths in the same order as the MAP string 19 | _WIDTHS = \ 20 | b'\x06\x08\x0a\x0e\x0d\x18\x10\x06\x08\x08\x0a\x0d\x06\x08\x06\x0b'\ 21 | 22 | ... more lines of data... 23 | 24 | b'\x0d\x0d\x0b\x0a\x0b\x0e\x0c\x12\x0d\x0c\x0b\x09\x06\x09\x0e\x0b' 25 | 26 | # OFFSET_WIDTH bytes per character in the same order as the MAP string 27 | # to the start of each character in bits. 28 | OFFSET_WIDTH = 2 29 | _OFFSETS = \ 30 | b'\x00\x00\x00\x66\x00\xee\x01\x98\x02\x86\x03\x63\x04\xfb\x06\x0b'\ 31 | 32 | ... more lines of data... 33 | 34 | b'\x49\x94\x4a\x71\x4b\x3d\x4b\xf8\x4c\x91\x4c\xf7\x4d\x90\x4e\x7e' 35 | 36 | # character bitmaps per character in the same order as the MAP string. 37 | # Note: character data may not start on byte boundaries 38 | _BITMAPS =\ 39 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61'\ 40 | 41 | ... many more lines of data... 42 | 43 | b'\x3d\xe3\xfc\x00\x00\x00\x00\x00' 44 | 45 | WIDTHS = memoryview(_WIDTHS) 46 | OFFSETS = memoryview(_OFFSETS) 47 | BITMAPS = memoryview(_BITMAPS) 48 | -------------------------------------------------------------------------------- /utils/font_from_romfont.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Convert fonts from the font-bin directory of spacerace's 4 | https://github.com/spacerace/romfont repo. 5 | 6 | Reads all romfont bin files from the specified -input-directory (-i) and writes 7 | python font files to the specified -output-directory (-o). Optionally limiting 8 | characters included to -first-char (-f) thru -last-char (-l). 9 | 10 | Example: 11 | 12 | font_from_romfont -i font-bin -o pyfont -f 32 -l 127 13 | 14 | requires argparse 15 | """ 16 | import os 17 | import re 18 | import argparse 19 | 20 | def convert_font(file_in, file_out, width, height, first=0x0, last=0xff): 21 | chunk_size = height 22 | with open(file_in, "rb") as bin_file: 23 | bin_file.seek(first * height) 24 | current = first 25 | with open(file_out, 'wt') as font_file: 26 | print(f'"""converted from {file_in} """', file=font_file) 27 | print(f'WIDTH = {width}', file=font_file) 28 | print(f'HEIGHT = {height}', file=font_file) 29 | print(f'FIRST = 0x{first:02x}', file=font_file) 30 | print(f'LAST = 0x{last:02x}', file=font_file) 31 | print(f'_FONT =\\\n', sep='', end='', file=font_file) 32 | for chunk in iter(lambda: bin_file.read(chunk_size), b''): 33 | print('b\'', sep='', end='', file=font_file) 34 | for data in chunk: 35 | print(f'\\x{data:02x}', end='', file=font_file) 36 | print('\'\\', file=font_file) 37 | current += 1 38 | if current > last: 39 | break 40 | 41 | print('', file=font_file) 42 | print('FONT = memoryview(_FONT)', file=font_file) 43 | 44 | def auto_int(x): 45 | return int(x, 0) 46 | 47 | def main(): 48 | 49 | parser = argparse.ArgumentParser( 50 | description='Convert fomfont.bin font files in input to python in font_directory.') 51 | parser.add_argument('input', help='file or directory containing binary font file(s).') 52 | parser.add_argument('output', help='file or directory to contain python font file(s).') 53 | parser.add_argument('-f', '--first-char', type=auto_int, default=0x20) 54 | parser.add_argument('-l', '--last-char', type=auto_int, default=0x7f) 55 | args = parser.parse_args() 56 | 57 | file_re = re.compile(r'^(.*)(\d+)x(\d+)\.bin$') 58 | 59 | is_dir = os.path.isdir(args.input) 60 | if is_dir: 61 | bin_files = os.listdir(args.input) 62 | else: 63 | bin_files = [args.input] 64 | 65 | for bin_file_name in bin_files: 66 | match = file_re.match(bin_file_name) 67 | if match: 68 | font_width = int(match.group(2)) 69 | font_height = int(match.group(3)) 70 | 71 | if is_dir: 72 | bin_file_name = args.input+'/'+bin_file_name 73 | 74 | if is_dir: 75 | font_file_name = ( 76 | args.font_directory + '/' + 77 | match.group(1).rstrip('_').lower()+ 78 | f'_{font_width}x{font_height}.py') 79 | else: 80 | font_file_name = args.output 81 | 82 | print("converting", bin_file_name, 'to', font_file_name) 83 | 84 | convert_font( 85 | bin_file_name, 86 | font_file_name, 87 | font_width, 88 | font_height, 89 | args.first_char, 90 | args.last_char) 91 | main() -------------------------------------------------------------------------------- /utils/imgtobitmap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | ''' 3 | Convert image file to python module for use with blit_bitmap. 4 | 5 | Usage imgtobitmap image_file bits_per_pixel >image.py 6 | ''' 7 | 8 | import sys 9 | from PIL import Image 10 | import argparse 11 | 12 | 13 | def main(): 14 | 15 | parser = argparse.ArgumentParser( 16 | prog='imgtobitmap', 17 | description='Convert image file to python module for use with bitmap method.') 18 | 19 | parser.add_argument( 20 | 'image_file', 21 | help='Name of file containing image to convert') 22 | 23 | parser.add_argument( 24 | 'bits_per_pixel', 25 | type=int, 26 | choices=range(1, 9), 27 | default=1, 28 | metavar='bits_per_pixel', 29 | help='The number of bits to use per pixel (1..8)') 30 | 31 | args = parser.parse_args() 32 | bits = args.bits_per_pixel 33 | colors_requested = 1 << bits 34 | img = Image.open(args.image_file) 35 | img = img.convert("P", palette=Image.Palette.ADAPTIVE, colors=colors_requested) 36 | palette = img.getpalette() # Make copy of palette colors 37 | palette_colors = len(palette) // 3 38 | bits_required = palette_colors.bit_length() 39 | if (bits_required < bits): 40 | print(f'\nNOTE: Quantization reduced colors to {palette_colors} from the {colors_requested} ' 41 | f'requested, reconverting using {bits_required} bit per pixel could save memory.\n''', file=sys.stderr) 42 | 43 | # Convert palette to RGB565 44 | #palette = [((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3) for r, g, b in zip(palette[::3], palette[1::3], palette[2::3])] 45 | 46 | 47 | # For all the colors in the palette 48 | colors = [] 49 | 50 | for color in range(palette_colors): 51 | 52 | # get rgb values and convert to 565 53 | color565 = ( 54 | ((palette[color*3] & 0xF8) << 8) 55 | | ((palette[color*3+1] & 0xFC) << 3) 56 | | ((palette[color*3+2] & 0xF8) >> 3)) 57 | 58 | # swap bytes in 565 59 | color = ((color565 & 0xff) << 8) + ((color565 & 0xff00) >> 8) 60 | 61 | # append byte swapped 565 color to colors 62 | colors.append(f'{color:04x}') 63 | 64 | image_bitstring = '' 65 | max_colors = palette_colors 66 | 67 | # Run through the image and create a string with the ascii binary 68 | # representation of the color of each pixel. 69 | for y in range(img.height): 70 | for x in range(img.width): 71 | pixel = img.getpixel((x, y)) 72 | color = pixel 73 | bstring = ''.join( 74 | '1' if (color & (1 << bit - 1)) else '0' 75 | for bit in range(bits, 0, -1) 76 | ) 77 | 78 | image_bitstring += bstring 79 | 80 | bitmap_bits = len(image_bitstring) 81 | 82 | # Create python source with image parameters 83 | print(f'HEIGHT = {img.height}') 84 | print(f'WIDTH = {img.width}') 85 | print(f'COLORS = {max_colors}') 86 | print(f'BITS = {bitmap_bits}') 87 | print(f'BPP = {bits}') 88 | print('PALETTE = [', sep='', end='') 89 | 90 | for color, rgb in enumerate(colors): 91 | if color: 92 | print(',', sep='', end='') 93 | print(f'0x{rgb}', sep='', end='') 94 | print("]") 95 | 96 | # Run though image bit string 8 bits at a time 97 | # and create python array source for memoryview 98 | 99 | print("_bitmap =\\", sep='') 100 | print("b'", sep='', end='') 101 | 102 | for i in range(0, bitmap_bits, 8): 103 | 104 | if i and i % (16*8) == 0: 105 | print("'\\\nb'", end='', sep='') 106 | 107 | value = image_bitstring[i:i+8] 108 | color = int(value, 2) 109 | print(f'\\x{color:02x}', sep='', end='') 110 | 111 | print("'\nBITMAP = memoryview(_bitmap)") 112 | 113 | 114 | main() 115 | -------------------------------------------------------------------------------- /utils/png_from_font.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | Imports all the python font files from the specified -input-directory (-i) and 5 | creates png samples of each font in the specified -output-directory (-o). 6 | 7 | Example: 8 | png_from_font.py font_directory png_directory 9 | 10 | Requires argparse, importlib and pypng 11 | """ 12 | 13 | import os 14 | import importlib 15 | import png 16 | import argparse 17 | 18 | def create_png(font_file_name, png_file_name): 19 | 20 | module_spec = importlib.util.spec_from_file_location('font', font_file_name) 21 | font = importlib.util.module_from_spec(module_spec) 22 | module_spec.loader.exec_module(font) 23 | char_count = font.LAST - font.FIRST 24 | column_count = 16 25 | row_count = (char_count // column_count) 26 | 27 | with open(png_file_name, 'wb') as png_file: 28 | image = png.Writer((16+2) * font.WIDTH, (row_count+3) * font.HEIGHT, bitdepth=1) 29 | image_data = [[0 for j in range((16+2) * font.WIDTH)] for i in range((row_count+3)* font.HEIGHT)] 30 | font_count = len(font.FONT)+1 31 | for chart_row in range(row_count+2): 32 | for chart_col in range(16): 33 | chart_idx = chart_row * 16 + chart_col 34 | for char_line in range(font.HEIGHT): 35 | for char_byte in range(font.WIDTH//8): 36 | ch_idx = chart_idx * font.HEIGHT * font.WIDTH//8 + char_byte + char_line * font.WIDTH//8 37 | print(chart_idx, char_count) 38 | if (chart_idx <= char_count): 39 | data = font.FONT[ch_idx] 40 | else: 41 | data = 0 42 | 43 | for bit in range(8): 44 | png_row = (chart_row+1)*font.HEIGHT+char_line 45 | png_col = (chart_col+1)*font.WIDTH+char_byte*8+bit 46 | if data & 1 << 7-bit: 47 | image_data[png_row][png_col] = 1 48 | else: 49 | image_data[png_row][png_col] = 0 50 | 51 | print("Creating", png_file_name) 52 | image.write(png_file, image_data) 53 | 54 | def main(): 55 | parser = argparse.ArgumentParser( 56 | description='Convert 8bit font-bin.bin font files in bin_directory to python in font_directory.') 57 | parser.add_argument( 58 | 'font_directory', help='directory containing python font files. (input)') 59 | parser.add_argument( 60 | 'png_directory', help='directory to contain binary font files. (output)') 61 | args = parser.parse_args() 62 | 63 | for file_name in os.listdir(args.font_directory): 64 | if file_name.endswith('.py'): 65 | font_file_name = args.font_directory+'/'+file_name 66 | png_file_name = args.png_directory+'/'+os.path.splitext(file_name)[0]+'.png' 67 | create_png(font_file_name, png_file_name) 68 | 69 | main() 70 | -------------------------------------------------------------------------------- /utils/sprites2bitmap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | ''' 4 | Convert a sprite sheet image to python a module for use with indexed bitmap method. 5 | Sprite sheet width and height should be a multiple of sprite width and height. There 6 | should be no extra pixels between sprites. All sprites will share the same palette. 7 | 8 | Usage: 9 | sprites2bitmap image_file spite_width sprite_height bits_per_pixel >sprites.py 10 | 11 | MicroPython: 12 | import sprites 13 | ... tft config and init code ... 14 | tft.bitmap(sprites, x, y, index) 15 | 16 | ''' 17 | 18 | from os import setpriority 19 | from PIL import Image 20 | import argparse 21 | 22 | def main(): 23 | 24 | parser = argparse.ArgumentParser( 25 | prog='imgtobitmap', 26 | description='Convert image file to python module for use with bitmap method.') 27 | 28 | parser.add_argument( 29 | 'image_file', 30 | help='Name of file containing image to convert') 31 | 32 | parser.add_argument( 33 | 'sprite_width', 34 | type=int, 35 | help='width of sprites in pixels') 36 | 37 | parser.add_argument( 38 | 'sprite_height', 39 | type=int, 40 | help='height of sprites in pixels') 41 | 42 | parser.add_argument( 43 | 'bits_per_pixel', 44 | type=int, 45 | choices=range(1, 9), 46 | default=1, 47 | metavar='bits_per_pixel', 48 | help='The number of bits to use per pixel (1..8)') 49 | 50 | args = parser.parse_args() 51 | 52 | bits = args.bits_per_pixel 53 | img = Image.open(args.image_file) 54 | img = img.convert("P", palette=Image.ADAPTIVE, colors=2**bits) 55 | palette = img.getpalette() # Make copy of palette colors 56 | 57 | # For all the colors in the palette 58 | colors = [] 59 | for color in range(1 << bits): 60 | 61 | # get rgb values and convert to 565 62 | color565 = ( 63 | ((palette[color*3] & 0xF8) << 8) | 64 | ((palette[color*3+1] & 0xFC) << 3) | 65 | ((palette[color*3+2] & 0xF8) >> 3)) 66 | 67 | # swap bytes in 565 68 | color = ((color565 & 0xff) << 8) + ((color565 & 0xff00) >> 8) 69 | 70 | # append byte swapped 565 color to colors 71 | colors.append(f'{color:04x}') 72 | 73 | image_bitstring = '' 74 | max_colors = 1 << bits 75 | bitmaps = 0 76 | # Run through the image and create a string with the ascii binary 77 | # representation of the color of each pixel. 78 | for y in range(0, img.height, args.sprite_height): 79 | for x in range(0, img.width, args.sprite_width): 80 | bitmaps += 1 81 | for yy in range(y, y + args.sprite_height): 82 | for xx in range(x, x + args.sprite_width): 83 | pixel = img.getpixel((xx, yy)) 84 | color = pixel 85 | image_bitstring += ''.join( 86 | '1' if (color & (1 << bit - 1)) else '0' for bit in range(bits, 0, -1)) 87 | 88 | bitmap_bits = len(image_bitstring) 89 | 90 | # Create python source with image parameters 91 | print(f'BITMAPS = {bitmaps}') 92 | print(f'HEIGHT = {args.sprite_height}') 93 | print(f'WIDTH = {args.sprite_width}') 94 | print(f'COLORS = {max_colors}') 95 | print(f'BITS = {bitmap_bits}') 96 | print(f'BPP = {bits}') 97 | print('PALETTE = [', sep='', end='') 98 | 99 | for color, rgb in enumerate(colors): 100 | if color: 101 | print(',', sep='', end='') 102 | print(f'0x{rgb}', sep='', end='') 103 | print("]") 104 | 105 | # Run though image bit string 8 bits at a time 106 | # and create python array source for memoryview 107 | 108 | print("_bitmap =\\", sep='') 109 | print("b'", sep='', end='') 110 | 111 | for i in range(0, bitmap_bits, 8): 112 | 113 | if i and i % (16*8) == 0: 114 | print("'\\\nb'", end='', sep='') 115 | 116 | value = image_bitstring[i:i+8] 117 | color = int(value, 2) 118 | print(f'\\x{color:02x}', sep='', end='') 119 | 120 | print("'\nBITMAP = memoryview(_bitmap)") 121 | 122 | 123 | main() 124 | --------------------------------------------------------------------------------