Add sharp display driver.

ili9341
Peter Hinch 2020-10-04 18:11:29 +01:00
rodzic 557fc92d63
commit c3f444dadb
7 zmienionych plików z 1190 dodań i 3 usunięć

Wyświetl plik

@ -454,9 +454,13 @@ def clock(ssd, wri):
# 4. Device drivers
For a driver to support `nanogui` it must be subclassed from `framebuf` and
provide `height` and `width` bound variables defining the display size in
pixels. This is all that is required for monochrome drivers.
Device drivers capable of supporting `nanogui` can be extremely simple: see the
`drivers/sharp/sharp.py` for a minimal example.
For a driver to support `nanogui` it must be subclassed from
`framebuf.FrameBuffer` and provide `height` and `width` bound variables being
the display size in pixels. This, and a `show` method, are all that is required
for monochrome drivers.
For color drivers, to conserve RAM it is suggested that 8-bit color is used
for the `framebuf`. If the hardware does not support this, conversion to the
@ -472,6 +476,10 @@ form acceptable to the driver. For 8-bit rrrgggbb this can be:
```
This should be amended if the hardware uses a different 8-bit format.
Refresh must be handled by a `show` method taking no arguments; when called,
the contents of the buffer underlying the `FrameBuffer` must be copied to the
hardware.
The `Writer` (monochrome) or `CWriter` (color) classes and the `nanogui` module
should then work automatically.
@ -479,4 +487,5 @@ If a display uses I2C note that owing to
[this issue](https://github.com/micropython/micropython/pull/4020) soft I2C
may be required, depending on the detailed specification of the chip.
###### [Contents](./README.md#contents)

Wyświetl plik

@ -0,0 +1,87 @@
# A MICROPYTHON DRIVER FOR SHARP DISPLAYS
These monochrome SPI displays exist in three variants from Adafruit.
1. [2.7 inch 400x240 pixels](https://www.adafruit.com/product/4694)
2. [1.3 inch 144x168](https://www.adafruit.com/product/3502)
3. [1.3 inch 96x96](https://www.adafruit.com/product/1393) - Discontinued.
I have tested on the first of these. However the
[Adfruit driver](https://github.com/adafruit/Adafruit_CircuitPython_SharpMemoryDisplay)
supports all of these and I would expect this one to do so.
# 1. Display characteristics
These displays have extremely low current consumption: I measured ~90μA on the
2.7" board when in use. Refresh is fast, visually excellent and can run at up
to 20Hz. This contrasts with ePaper (eInk) displays where refresh is slow
(seconds) and visually intrusive; an alternative fast mode overcomes this, but
at the expense of ghosting.
On the other hand the power consumption of ePaper can be zero (you can switch
them off and the display is retained). If you power down a Sharp display the
image is retained, but only for a few seconds. In a Pyboard context 90μA is low
in comparison to stop mode and battery powered applications should be easily
realised.
The 2.7" display has excellent resolution and can display fine lines and small
fonts. However the display quality is not as good as ePaper. For good contrast
best results are achieved if the viewing angle and the direction of the light
source are positioned to achieve reflection.
## 1.1 The VCOM bit
The significance of this is somewhat glossed-over in the Adafruit docs, and a
study of the datasheet is confusing in the absence of prior knowledge of LCD
technology.
The signals applied to an LCD display should have no DC component. This is
because DC can cause gradual electrolysis and deterioration of of the liquid
crystal material. Display driver hardware typically has an oscillator driving
exclusive-or gates such that antiphase signals are applied for ON pixels, and
in-phase for OFF pixels. The oscillator typically drives a D-type flip-flop to
ensure an accurate 1:1 mark space ratio and hence zero DC component.
These displays offer two ways of achieving this, in the device driver or using
an external 1:1 mark space logic signal. The bit controlling this is known as
`VCOM` and the external pins supporting it are `EXTMODE` and `EXTCOMIN`.
`EXTMODE` determines whether a hardware input is used (`Vcc`) or software
control is required (`Gnd`). It is pulled low.
The driver supports software control, in that `VCOM` is complemented each time
the display is refreshed. The Adafruit driver also does this.
Sofware control implies that, in long running applications, the display should
regularly be refreshed. The datasheet incicates that the maximum rate is 20Hz,
but a 1Hz rate is sufficient.
If hardware control is to be used, `EXTMODE` should be linked to `Vcc` and a
1:1 logic signal applied to `EXTCOMIN`. A frequency range of 0.5-10Hz is
specified, and the datasheet also specifies "`EXTCOMIN` frequency should be
made lower than frame frequency".
In my opinion the easiest way to deal with this is usually to use software
control, ensuring that the driver's `show` method is called at regular
intervals of at least 1Hz.
# 2. Test scripts
1. `sharptest.py` Basic functionality test.
2. `clocktest.py` Digital and analog clock display.
`sharptest` should not be run for long periods as it does not regularly refresh
the display. It tests `writer.py` and some `framebuffer` graphics primitives.
`clocktest` tests `nanogui.py`.
To run the tests the fonts in the directory, `writer.py` and `nanogui.py` must
be copied to the device or frozen as bytecode. Testing was done on a Pyboard D
SF6W: frozen bytecode was not required. I suspect a Pyboard 1.x would require
it to prevent memory errors.
# 3. Resources
[Schematic for 2.7" unit](https://learn.adafruit.com/assets/94077)
[Datasheet 2.7"](https://cdn-learn.adafruit.com/assets/assets/000/094/215/original/LS027B7DH01_Rev_Jun_2010.pdf?1597872422)
[Datasheet 1.3"](http://www.adafruit.com/datasheets/LS013B4DN04-3V_FPC-204284.pdf)

Wyświetl plik

@ -0,0 +1,671 @@
# Code generated by font_to_py.py.
# Font: Arial.ttf
# Cmd: ./font_to_py.py Arial.ttf 35 arial35.py -x
version = '0.33'
def height():
return 35
def baseline():
return 27
def max_width():
return 37
def hmap():
return True
def reverse():
return False
def monospaced():
return False
def min_ch():
return 32
def max_ch():
return 126
_font =\
b'\x14\x00\x00\x00\x00\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f'\
b'\x80\x1c\x03\xc0\x38\x01\xc0\x38\x01\xc0\x00\x01\xc0\x00\x01\xc0'\
b'\x00\x03\x80\x00\x07\x80\x00\x0f\x00\x00\x1e\x00\x00\x3c\x00\x00'\
b'\x78\x00\x00\x70\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\xe0\x00'\
b'\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x0b\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00'\
b'\x00\x00\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x70'\
b'\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x20'\
b'\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x14\x00\x00\x00\x00\x01\xc1\xc0\x01\xc1\xc0\x01\xc3'\
b'\xc0\x03\x83\x80\x03\x83\x80\x03\x83\x80\x03\x83\x80\xff\xff\xf0'\
b'\xff\xff\xf0\xff\xff\xf0\x07\x07\x00\x07\x07\x00\x07\x07\x00\x0e'\
b'\x0e\x00\x0e\x0e\x00\x0e\x0e\x00\xff\xff\xf0\xff\xff\xf0\xff\xff'\
b'\xf0\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x3c\x38\x00'\
b'\x38\x38\x00\x38\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00'\
b'\x00\x60\x00\x03\xf8\x00\x0f\xfe\x00\x1f\xff\x00\x1e\x67\x00\x3c'\
b'\x63\x80\x38\x63\x80\x38\x60\x00\x38\x60\x00\x38\x60\x00\x1c\x60'\
b'\x00\x1f\xe0\x00\x0f\xf8\x00\x03\xfe\x00\x00\xff\x00\x00\x6f\x80'\
b'\x00\x63\x80\x00\x61\xc0\x00\x61\xc0\x70\x61\xc0\x70\x61\xc0\x78'\
b'\x63\xc0\x3c\x63\x80\x3e\x67\x80\x1f\xff\x00\x0f\xfe\x00\x01\xf8'\
b'\x00\x00\x60\x00\x00\x60\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x07'\
b'\xc0\x03\x80\x0f\xe0\x07\x80\x1c\x70\x07\x00\x1c\x70\x0f\x00\x38'\
b'\x38\x0e\x00\x38\x38\x1c\x00\x38\x38\x3c\x00\x38\x38\x38\x00\x38'\
b'\x38\x78\x00\x38\x38\x70\x00\x18\x70\xf0\x00\x1c\x70\xe0\x00\x0f'\
b'\xe1\xc3\xe0\x07\xc1\xc7\xf0\x00\x03\x8e\x38\x00\x07\x8e\x38\x00'\
b'\x07\x1c\x1c\x00\x0f\x1c\x1c\x00\x0e\x1c\x1c\x00\x1e\x1c\x1c\x00'\
b'\x1c\x1c\x1c\x00\x38\x1c\x1c\x00\x78\x0c\x38\x00\x70\x0e\x38\x00'\
b'\xf0\x07\xf0\x00\xe0\x03\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x7c\x00\x01'\
b'\xfe\x00\x03\xff\x00\x07\x87\x80\x07\x03\x80\x07\x03\x80\x07\x03'\
b'\x80\x07\x83\x80\x03\x87\x00\x03\xde\x00\x01\xfc\x00\x01\xf8\x00'\
b'\x03\xf0\x00\x0f\xb8\x00\x1e\x3c\x20\x1c\x1e\x38\x3c\x0f\x78\x38'\
b'\x07\x70\x38\x03\xf0\x38\x03\xe0\x3c\x01\xe0\x1c\x03\xf0\x1f\x0f'\
b'\xf8\x0f\xff\xbe\x07\xfe\x1c\x01\xf8\x08\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x07\x00\x00\x38\x38\x38\x38\x38\x38\x38\x38\x10\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\xc0\x01\x80\x03'\
b'\x80\x03\x00\x07\x00\x06\x00\x0e\x00\x0c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38'\
b'\x00\x38\x00\x38\x00\x18\x00\x1c\x00\x1c\x00\x1c\x00\x0c\x00\x0e'\
b'\x00\x06\x00\x07\x00\x03\x00\x03\x80\x01\x80\x00\xc0\x00\x00\x0c'\
b'\x00\x00\x00\x30\x00\x18\x00\x1c\x00\x0c\x00\x0e\x00\x06\x00\x07'\
b'\x00\x03\x00\x03\x80\x03\x80\x03\x80\x01\x80\x01\xc0\x01\xc0\x01'\
b'\xc0\x01\xc0\x01\xc0\x01\xc0\x01\xc0\x01\xc0\x01\xc0\x01\x80\x03'\
b'\x80\x03\x80\x03\x80\x07\x00\x07\x00\x06\x00\x0e\x00\x0c\x00\x1c'\
b'\x00\x18\x00\x30\x00\x00\x00\x0e\x00\x00\x00\x03\x80\x03\x80\x03'\
b'\x80\x3b\xb8\x7f\xfc\x1f\xf0\x07\xc0\x0e\xe0\x1e\xf0\x1c\x70\x08'\
b'\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00'\
b'\x70\x00\x00\x70\x00\x00\x70\x00\x3f\xff\xe0\x3f\xff\xe0\x3f\xff'\
b'\xe0\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00'\
b'\x00\x70\x00\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00'\
b'\x1c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x18\x00\x18\x00\x00\x00'\
b'\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x7f\xe0\x7f\xe0\x7f\xe0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00'\
b'\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x0a\x00\x00\x00\x01\xc0\x01\xc0\x03\x80\x03\x80\x03\x80'\
b'\x03\x80\x07\x00\x07\x00\x07\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00'\
b'\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x38\x00\x38\x00\x38\x00\x78\x00'\
b'\x70\x00\x70\x00\x70\x00\xe0\x00\xe0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x01'\
b'\xf8\x00\x07\xfe\x00\x0f\xff\x00\x0f\x0f\x00\x1e\x07\x80\x1c\x03'\
b'\x80\x1c\x03\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38'\
b'\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\x80\x1c\x03\x80\x1e\x07'\
b'\x80\x0f\x0f\x00\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x18\x00\x00\x38\x00'\
b'\x00\x78\x00\x00\xf8\x00\x01\xf8\x00\x03\xf8\x00\x0f\xb8\x00\x0f'\
b'\x38\x00\x0c\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00'\
b'\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00'\
b'\x38\x00\x00\x38\x00\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x14\x00\x00\x00\x00\x03\xf8\x00\x0f\xfe\x00\x1f\xff\x00\x3e\x0f'\
b'\x80\x38\x03\x80\x70\x03\xc0\x70\x01\xc0\x00\x01\xc0\x00\x01\xc0'\
b'\x00\x01\xc0\x00\x03\x80\x00\x07\x80\x00\x07\x00\x00\x0e\x00\x00'\
b'\x1c\x00\x00\x38\x00\x00\xf0\x00\x01\xe0\x00\x03\xc0\x00\x07\x80'\
b'\x00\x0f\x00\x00\x1c\x00\x00\x38\x00\x00\x3f\xff\xc0\x7f\xff\xc0'\
b'\x7f\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00'\
b'\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1e\x0f\x00\x1c\x07\x80\x38'\
b'\x03\x80\x38\x03\x80\x00\x03\x80\x00\x07\x00\x00\x0f\x00\x00\xfe'\
b'\x00\x00\xfe\x00\x00\xff\x00\x00\x07\x80\x00\x03\x80\x00\x01\xc0'\
b'\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x38\x01\xc0\x38\x03\xc0\x1c'\
b'\x03\x80\x1e\x0f\x80\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x0e\x00\x00\x1e'\
b'\x00\x00\x3e\x00\x00\x3e\x00\x00\x7e\x00\x00\xfe\x00\x00\xee\x00'\
b'\x01\xee\x00\x03\xce\x00\x03\x8e\x00\x07\x8e\x00\x07\x0e\x00\x0e'\
b'\x0e\x00\x1e\x0e\x00\x1c\x0e\x00\x38\x0e\x00\x78\x0e\x00\x7f\xff'\
b'\xc0\x7f\xff\xc0\x7f\xff\xc0\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00'\
b'\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x14\x00\x00\x00\x00\x07\xff\x80\x07\xff\x80\x0f\xff\x80\x0e'\
b'\x00\x00\x0e\x00\x00\x0e\x00\x00\x1e\x00\x00\x1c\x00\x00\x1c\xf8'\
b'\x00\x1f\xfe\x00\x1f\xff\x00\x3e\x0f\x80\x38\x03\x80\x00\x03\xc0'\
b'\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x38'\
b'\x01\xc0\x38\x03\x80\x1c\x03\x80\x1e\x0f\x00\x0f\xff\x00\x07\xfc'\
b'\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00'\
b'\x00\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f\x80\x1c\x03\x80'\
b'\x3c\x03\xc0\x38\x01\xc0\x38\x00\x00\x70\x00\x00\x70\xf8\x00\x73'\
b'\xfe\x00\x77\xff\x00\x7e\x0f\x80\x7c\x03\x80\x78\x03\xc0\x70\x01'\
b'\xc0\x70\x01\xc0\x70\x01\xc0\x70\x01\xc0\x30\x01\xc0\x38\x03\x80'\
b'\x3c\x03\x80\x1e\x0f\x80\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x7f\xff\xc0\x7f'\
b'\xff\xc0\x7f\xff\xc0\x00\x01\x80\x00\x03\x00\x00\x07\x00\x00\x0e'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x38\x00\x00\x38\x00\x00\x70\x00'\
b'\x00\x70\x00\x00\xe0\x00\x00\xe0\x00\x01\xc0\x00\x01\xc0\x00\x01'\
b'\xc0\x00\x03\x80\x00\x03\x80\x00\x03\x80\x00\x03\x80\x00\x07\x00'\
b'\x00\x07\x00\x00\x07\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x14\x00\x00\x00\x00\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00'\
b'\x0f\x0f\x00\x1e\x07\x80\x1c\x03\x80\x1c\x03\x80\x1c\x03\x80\x1e'\
b'\x07\x80\x0f\x0f\x00\x07\xfe\x00\x03\xfc\x00\x0f\xff\x00\x1e\x07'\
b'\x80\x1c\x03\x80\x38\x03\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x03\xc0\x1c\x03\x80\x1f\x07\x80\x0f\xff\x00\x07'\
b'\xfe\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00'\
b'\x00\x00\x01\xf0\x00\x07\xfc\x00\x0f\xfe\x00\x1f\x07\x00\x1c\x03'\
b'\x80\x3c\x03\x80\x38\x01\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x3c\x03\xc0\x1c\x03\xc0\x1e\x0f\xc0\x0f\xfd\xc0\x07'\
b'\xf9\xc0\x01\xf1\xc0\x00\x01\xc0\x00\x03\x80\x38\x03\x80\x38\x03'\
b'\x80\x1c\x07\x00\x1e\x0f\x00\x0f\xfe\x00\x07\xfc\x00\x03\xf0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00\x1c\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00\x1c\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x1c\x00\x1c\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x1c\x00\x1c\x00\x1c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00'\
b'\x18\x00\x10\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00'\
b'\x01\xe0\x00\x07\xe0\x00\x3f\xc0\x00\xfe\x00\x03\xf8\x00\x1f\xc0'\
b'\x00\x3f\x00\x00\x38\x00\x00\x3f\x00\x00\x1f\xc0\x00\x03\xf8\x00'\
b'\x00\xfe\x00\x00\x3f\xc0\x00\x07\xe0\x00\x01\xe0\x00\x00\x20\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x3f\xff\xe0\x3f\xff\xe0\x3f\xff\xe0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\xe0\x3f\xff\xe0\x3f\xff'\
b'\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x20\x00\x00\x3c\x00\x00\x3f\x00\x00\x1f\xe0\x00\x03\xf8'\
b'\x00\x00\xfe\x00\x00\x1f\xc0\x00\x07\xe0\x00\x00\xe0\x00\x07\xe0'\
b'\x00\x1f\xc0\x00\xfe\x00\x03\xf8\x00\x1f\xe0\x00\x3f\x00\x00\x3c'\
b'\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x01\xf8'\
b'\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f\x80\x1c\x03\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x03\x80\x00\x07\x80\x00'\
b'\x0f\x00\x00\x1e\x00\x00\x3c\x00\x00\x78\x00\x00\x70\x00\x00\xe0'\
b'\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00'\
b'\x00\x0f\xff\xc0\x00\x00\x3f\xff\xf0\x00\x00\xfe\x01\xf8\x00\x01'\
b'\xf8\x00\x7c\x00\x03\xe0\x00\x1e\x00\x03\xc0\x00\x0f\x00\x07\x80'\
b'\xf8\xe7\x80\x0f\x03\xfc\xe3\x80\x0e\x07\xfe\xc3\x80\x1e\x0f\x07'\
b'\xc3\xc0\x1c\x1e\x03\xc1\xc0\x1c\x1c\x01\xc1\xc0\x3c\x38\x01\xc1'\
b'\xc0\x38\x38\x01\x81\xc0\x38\x70\x01\x81\xc0\x38\x70\x01\x81\xc0'\
b'\x38\x70\x01\x83\x80\x38\x70\x03\x83\x80\x38\x70\x03\x07\x80\x38'\
b'\x70\x07\x07\x00\x38\x38\x0f\x0e\x00\x1c\x3c\x3f\x3e\x00\x1c\x1f'\
b'\xff\xfc\x00\x1e\x0f\xe7\xf8\x00\x0e\x07\xc3\xe0\x00\x0f\x00\x00'\
b'\x00\xe0\x07\x80\x00\x01\xc0\x07\xc0\x00\x07\x80\x03\xf0\x00\x0f'\
b'\x00\x00\xfe\x00\x7e\x00\x00\x7f\xff\xfc\x00\x00\x1f\xff\xf0\x00'\
b'\x00\x01\xff\x80\x00\x17\x00\x00\x00\x00\x00\x7c\x00\x00\x7c\x00'\
b'\x00\x7c\x00\x00\xee\x00\x00\xee\x00\x01\xef\x00\x01\xc7\x00\x01'\
b'\xc7\x00\x03\x83\x80\x03\x83\x80\x03\x83\x80\x07\x01\xc0\x07\x01'\
b'\xc0\x0f\x01\xe0\x0e\x00\xe0\x0f\xff\xe0\x1f\xff\xf0\x1f\xff\xf0'\
b'\x1c\x00\x70\x38\x00\x38\x38\x00\x38\x78\x00\x3c\x70\x00\x1c\x70'\
b'\x00\x1c\xf0\x00\x1e\xe0\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x18\x00\x00\x00\x00\x1f\xff\x00\x1f\xff\xc0\x1f\xff\xf0\x1c\x00'\
b'\xf0\x1c\x00\x78\x1c\x00\x38\x1c\x00\x38\x1c\x00\x38\x1c\x00\x38'\
b'\x1c\x00\x70\x1c\x00\xf0\x1f\xff\xe0\x1f\xff\xe0\x1f\xff\xf0\x1c'\
b'\x00\xf8\x1c\x00\x38\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00'\
b'\x1c\x1c\x00\x1c\x1c\x00\x38\x1c\x00\xf8\x1f\xff\xf0\x1f\xff\xe0'\
b'\x1f\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00'\
b'\x00\x00\x3f\x80\x00\x00\xff\xe0\x00\x03\xff\xf0\x00\x07\xc0\xf8'\
b'\x00\x0f\x00\x3c\x00\x0e\x00\x1c\x00\x1c\x00\x1e\x00\x1c\x00\x0e'\
b'\x00\x3c\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00'\
b'\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00'\
b'\x00\x38\x00\x00\x00\x1c\x00\x07\x00\x1c\x00\x0f\x00\x1e\x00\x0e'\
b'\x00\x0e\x00\x1e\x00\x0f\x00\x3c\x00\x07\xc0\xfc\x00\x03\xff\xf8'\
b'\x00\x01\xff\xe0\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x1f'\
b'\xff\x80\x00\x1f\xff\xe0\x00\x1f\xff\xf0\x00\x1c\x00\xf8\x00\x1c'\
b'\x00\x3c\x00\x1c\x00\x1c\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0f\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c'\
b'\x00\x07\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c'\
b'\x00\x07\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x3c\x00\x1c\x00\xf8\x00\x1f\xff\xf0\x00\x1f'\
b'\xff\xe0\x00\x1f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x1f\xff\xf8\x1f'\
b'\xff\xf8\x1f\xff\xf8\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1f\xff\xf0'\
b'\x1f\xff\xf0\x1f\xff\xf0\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1f\xff\xfc\x1f\xff\xfc\x1f\xff\xfc\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x16\x00\x00\x00\x00\x1f\xff\xf0\x1f\xff\xf0\x1f\xff\xf0'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1f\xff\xc0\x1f\xff\xc0\x1f\xff'\
b'\xc0\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00'\
b'\x00\x00\x00\x00\x1f\xe0\x00\x00\xff\xf8\x00\x01\xff\xfe\x00\x03'\
b'\xe0\x3f\x00\x07\x80\x0f\x00\x0f\x00\x07\x80\x1e\x00\x03\x80\x1c'\
b'\x00\x01\xc0\x1c\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38'\
b'\x00\x00\x00\x38\x00\x00\x00\x38\x01\xff\xc0\x38\x01\xff\xc0\x38'\
b'\x01\xff\xc0\x38\x00\x01\xc0\x1c\x00\x01\xc0\x1c\x00\x01\xc0\x1e'\
b'\x00\x01\xc0\x0f\x00\x01\xc0\x07\x80\x07\xc0\x03\xf0\x1f\xc0\x01'\
b'\xff\xff\x00\x00\xff\xfc\x00\x00\x1f\xe0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1f\xff\xfe'\
b'\x00\x1f\xff\xfe\x00\x1f\xff\xfe\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x12\x00\x00\x00\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00'\
b'\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e'\
b'\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00'\
b'\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x70\x0e\x00\x70'\
b'\x0e\x00\x70\x0e\x00\x78\x1e\x00\x3c\x3c\x00\x3f\xfc\x00\x1f\xf8'\
b'\x00\x07\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00'\
b'\x00\x1c\x00\x1e\x1c\x00\x3c\x1c\x00\x78\x1c\x00\xf0\x1c\x01\xe0'\
b'\x1c\x03\xc0\x1c\x07\x80\x1c\x0f\x00\x1c\x1e\x00\x1c\x3c\x00\x1c'\
b'\x78\x00\x1c\xf8\x00\x1d\xfc\x00\x1f\xde\x00\x1f\x8e\x00\x1f\x07'\
b'\x00\x1e\x07\x80\x1c\x03\xc0\x1c\x01\xc0\x1c\x00\xe0\x1c\x00\xf0'\
b'\x1c\x00\x78\x1c\x00\x38\x1c\x00\x1c\x1c\x00\x1e\x1c\x00\x0f\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1f\xff\xe0\x1f\xff\xe0\x1f\xff\xe0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x1d\x00\x00\x00\x00\x00\x1f\x00\x07\xc0\x1f\x80\x0f\xc0'\
b'\x1f\x80\x0f\xc0\x1f\x80\x0f\xc0\x1f\xc0\x0f\xc0\x1d\xc0\x1d\xc0'\
b'\x1d\xc0\x1d\xc0\x1d\xc0\x1d\xc0\x1c\xe0\x39\xc0\x1c\xe0\x39\xc0'\
b'\x1c\xe0\x39\xc0\x1c\xf0\x39\xc0\x1c\x70\x71\xc0\x1c\x70\x71\xc0'\
b'\x1c\x70\x71\xc0\x1c\x38\xe1\xc0\x1c\x38\xe1\xc0\x1c\x38\xe1\xc0'\
b'\x1c\x3d\xc1\xc0\x1c\x1d\xc1\xc0\x1c\x1d\xc1\xc0\x1c\x1d\xc1\xc0'\
b'\x1c\x0f\x81\xc0\x1c\x0f\x81\xc0\x1c\x0f\x81\xc0\x1c\x0f\x01\xc0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x1a\x00\x00\x00\x00\x00\x1e\x00\x0e\x00\x1e\x00\x0e\x00\x1f\x00'\
b'\x0e\x00\x1f\x80\x0e\x00\x1f\x80\x0e\x00\x1f\xc0\x0e\x00\x1d\xc0'\
b'\x0e\x00\x1c\xe0\x0e\x00\x1c\xf0\x0e\x00\x1c\x70\x0e\x00\x1c\x38'\
b'\x0e\x00\x1c\x3c\x0e\x00\x1c\x1c\x0e\x00\x1c\x0e\x0e\x00\x1c\x0f'\
b'\x0e\x00\x1c\x07\x0e\x00\x1c\x03\x8e\x00\x1c\x03\xce\x00\x1c\x01'\
b'\xce\x00\x1c\x00\xee\x00\x1c\x00\xfe\x00\x1c\x00\x7e\x00\x1c\x00'\
b'\x7e\x00\x1c\x00\x3e\x00\x1c\x00\x1e\x00\x1c\x00\x1e\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00'\
b'\x00\x00\x00\x00\x00\x3f\xc0\x00\x00\xff\xf0\x00\x03\xff\xf8\x00'\
b'\x07\xe0\x7e\x00\x07\x80\x1e\x00\x0f\x00\x0f\x00\x1e\x00\x07\x80'\
b'\x1c\x00\x03\x80\x1c\x00\x03\x80\x38\x00\x01\xc0\x38\x00\x01\xc0'\
b'\x38\x00\x01\xc0\x38\x00\x01\xc0\x38\x00\x01\xc0\x38\x00\x01\xc0'\
b'\x38\x00\x01\xc0\x38\x00\x01\xc0\x1c\x00\x03\x80\x1c\x00\x03\x80'\
b'\x1e\x00\x07\x80\x0f\x00\x0f\x00\x07\x80\x1e\x00\x07\xe0\x7e\x00'\
b'\x01\xff\xfc\x00\x00\xff\xf0\x00\x00\x3f\xc0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00'\
b'\x00\x1f\xff\x80\x1f\xff\xe0\x1f\xff\xf0\x1c\x00\x78\x1c\x00\x38'\
b'\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c'\
b'\x00\x38\x1c\x00\xf8\x1f\xff\xf0\x1f\xff\xe0\x1f\xff\x80\x1c\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x3f\x80'\
b'\x00\x00\xff\xe0\x00\x03\xff\xf8\x00\x07\xe0\xfc\x00\x0f\x80\x3e'\
b'\x00\x0e\x00\x1e\x00\x1e\x00\x0f\x00\x1c\x00\x07\x00\x1c\x00\x07'\
b'\x00\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03'\
b'\x80\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03'\
b'\x80\x1c\x00\x07\x00\x1c\x02\x07\x00\x1e\x03\x8f\x00\x0e\x03\xfe'\
b'\x00\x0f\x81\xfe\x00\x07\xe0\xfc\x00\x03\xff\xfe\x00\x00\xff\xff'\
b'\x80\x00\x3f\xcf\xc0\x00\x00\x03\x80\x00\x00\x00\x80\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x1f\xff\xc0\x00\x1f'\
b'\xff\xf0\x00\x1f\xff\xf8\x00\x1c\x00\x7c\x00\x1c\x00\x1e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x1e\x00\x1c\x00\x7c\x00\x1f\xff\xf8\x00\x1f\xff\xf0\x00\x1f'\
b'\xff\xc0\x00\x1c\x0f\x00\x00\x1c\x07\xc0\x00\x1c\x03\xc0\x00\x1c'\
b'\x01\xe0\x00\x1c\x00\xf0\x00\x1c\x00\xf0\x00\x1c\x00\x78\x00\x1c'\
b'\x00\x3c\x00\x1c\x00\x3c\x00\x1c\x00\x1e\x00\x1c\x00\x1e\x00\x1c'\
b'\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x18\x00\x00\x00\x00\x00\xfe\x00\x03\xff\xc0\x07\xff'\
b'\xe0\x0f\x81\xf0\x1e\x00\xf0\x1c\x00\x78\x1c\x00\x38\x1c\x00\x38'\
b'\x1e\x00\x00\x0f\x00\x00\x0f\xe0\x00\x07\xfe\x00\x01\xff\xc0\x00'\
b'\x7f\xf0\x00\x07\xf8\x00\x00\xf8\x00\x00\x3c\x38\x00\x1c\x38\x00'\
b'\x1c\x3c\x00\x1c\x1c\x00\x3c\x1e\x00\x38\x0f\x80\xf8\x07\xff\xf0'\
b'\x03\xff\xe0\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00'\
b'\x00\x00\x00\x7f\xff\xf0\x7f\xff\xf0\x7f\xff\xf0\x00\x70\x00\x00'\
b'\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70'\
b'\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00'\
b'\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00'\
b'\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1e\x00\x1e\x00\x0e'\
b'\x00\x1c\x00\x0f\x00\x3c\x00\x07\xc0\xf8\x00\x07\xff\xf0\x00\x01'\
b'\xff\xe0\x00\x00\x7f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x70\x00\x07\x78'\
b'\x00\x0f\x38\x00\x0e\x38\x00\x0e\x3c\x00\x1e\x1c\x00\x1c\x1e\x00'\
b'\x3c\x0e\x00\x38\x0e\x00\x38\x0f\x00\x78\x07\x00\x70\x07\x00\x70'\
b'\x03\x80\xe0\x03\x80\xe0\x03\xc1\xe0\x01\xc1\xc0\x01\xc1\xc0\x01'\
b'\xe3\xc0\x00\xe3\x80\x00\xe7\x80\x00\x77\x00\x00\x77\x00\x00\x7f'\
b'\x00\x00\x3e\x00\x00\x3e\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x24\x00\x00\x00\x00\x00\x00\xe0\x01\xf0\x00\xe0\xe0\x01'\
b'\xf0\x00\xe0\x70\x01\xf0\x01\xc0\x70\x03\xb8\x01\xc0\x70\x03\xb8'\
b'\x01\xc0\x70\x03\xb8\x01\xc0\x38\x07\x1c\x03\x80\x38\x07\x1c\x03'\
b'\x80\x38\x07\x1c\x03\x80\x38\x0f\x1e\x03\x80\x1c\x0e\x0e\x07\x00'\
b'\x1c\x0e\x0e\x07\x00\x1c\x1e\x0e\x07\x00\x1c\x1c\x07\x07\x00\x0e'\
b'\x1c\x07\x0e\x00\x0e\x1c\x07\x0e\x00\x0e\x38\x03\x8e\x00\x0e\x38'\
b'\x03\x8e\x00\x0f\x38\x03\x9e\x00\x07\x78\x01\xdc\x00\x07\x70\x01'\
b'\xdc\x00\x07\x70\x01\xdc\x00\x07\xf0\x01\xfc\x00\x03\xe0\x00\xf8'\
b'\x00\x03\xe0\x00\xf8\x00\x03\xe0\x00\xf8\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x17\x00\x00\x00\x00\x78\x00\x3c\x3c\x00\x78\x1c\x00'\
b'\x70\x1e\x00\xf0\x0f\x01\xe0\x07\x01\xc0\x03\x83\x80\x03\xc7\x80'\
b'\x01\xef\x00\x00\xee\x00\x00\xfe\x00\x00\x7c\x00\x00\x38\x00\x00'\
b'\x7c\x00\x00\xfe\x00\x01\xef\x00\x01\xc7\x00\x03\xc7\x80\x07\x83'\
b'\xc0\x07\x01\xc0\x0e\x00\xe0\x1e\x00\xf0\x3c\x00\x78\x38\x00\x38'\
b'\x78\x00\x3c\xf0\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00'\
b'\x00\x00\x00\xf0\x00\x1e\x70\x00\x1c\x38\x00\x38\x3c\x00\x78\x1c'\
b'\x00\x70\x0e\x00\xe0\x0f\x01\xe0\x07\x01\xc0\x03\x83\x80\x03\xc7'\
b'\x80\x01\xc7\x00\x00\xee\x00\x00\xfe\x00\x00\x7c\x00\x00\x38\x00'\
b'\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00'\
b'\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x00\x1f\xff'\
b'\xf0\x1f\xff\xf0\x1f\xff\xf0\x00\x00\xf0\x00\x01\xe0\x00\x03\xc0'\
b'\x00\x03\x80\x00\x07\x80\x00\x0f\x00\x00\x1e\x00\x00\x1c\x00\x00'\
b'\x38\x00\x00\x78\x00\x00\xf0\x00\x01\xe0\x00\x01\xc0\x00\x03\xc0'\
b'\x00\x07\x80\x00\x0f\x00\x00\x0e\x00\x00\x1c\x00\x00\x3c\x00\x00'\
b'\x78\x00\x00\x7f\xff\xf8\x7f\xff\xf8\x7f\xff\xf8\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x0a\x00\x00\x00\x3f\x80\x3f\x80\x3f\x80\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x3f\x80\x3f\x80\x3f\x80\x00\x00\x0a\x00\x00\x00'\
b'\xe0\x00\xe0\x00\x70\x00\x70\x00\x70\x00\x70\x00\x38\x00\x38\x00'\
b'\x38\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x0e\x00\x0e\x00\x0e\x00'\
b'\x0e\x00\x07\x00\x07\x00\x07\x00\x07\x80\x03\x80\x03\x80\x03\x80'\
b'\x01\xc0\x01\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x0a\x00\x00\x00\x7f\x00\x7f\x00\x7f\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x7f\x00\x7f\x00\x7f\x00\x00\x00\x11\x00\x00\x00'\
b'\x00\x01\xc0\x00\x03\xe0\x00\x03\xe0\x00\x07\x70\x00\x07\x70\x00'\
b'\x06\x30\x00\x0e\x38\x00\x0e\x38\x00\x1c\x1c\x00\x1c\x1c\x00\x38'\
b'\x0e\x00\x38\x0e\x00\x38\x0e\x00\x70\x07\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xf8\xff\xff\xf8'\
b'\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x0c\x00\x00\x00\x78\x00\x3c\x00\x1c\x00\x0c\x00\x06\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x01\xfc\x00\x07\xff\x00\x0f\xff\x80\x1e\x07\xc0'\
b'\x3c\x01\xc0\x38\x01\xc0\x00\x01\xc0\x00\x07\xc0\x01\xff\xc0\x0f'\
b'\xff\xc0\x1f\xf9\xc0\x1e\x01\xc0\x38\x01\xc0\x38\x03\xc0\x38\x07'\
b'\xc0\x3c\x0f\xc0\x1f\xff\xc0\x0f\xfd\xc0\x07\xf0\xe0\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x38\x00\x00\x38\x00\x00'\
b'\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\xf8\x00\x3b\xfe\x00\x3f\xff\x00\x3f\x0f\x80\x3e\x07\x80\x3c\x03'\
b'\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x3c\x03\x80\x3c\x07\x80\x3f\x0f\x00\x3f'\
b'\xff\x00\x3b\xfe\x00\x38\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xf0\x00\x07\xfc\x00'\
b'\x0f\xfe\x00\x1e\x0f\x00\x3c\x07\x80\x38\x03\x80\x70\x00\x00\x70'\
b'\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x03'\
b'\x80\x38\x03\x80\x3c\x07\x00\x3e\x0f\x00\x1f\xfe\x00\x0f\xfc\x00'\
b'\x03\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00'\
b'\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00'\
b'\x01\xc0\x00\x01\xc0\x01\xf1\xc0\x07\xfd\xc0\x0f\xff\xc0\x1f\x0f'\
b'\xc0\x1c\x07\xc0\x1c\x03\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\xc0\x1e'\
b'\x07\xc0\x0f\x0f\xc0\x0f\xff\xc0\x07\xfd\xc0\x01\xf1\xc0\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x0f\x0f\x80\x1c\x03\x80\x18'\
b'\x01\x80\x38\x01\xc0\x3f\xff\xc0\x3f\xff\xc0\x3f\xff\xc0\x38\x00'\
b'\x00\x38\x00\x00\x38\x00\x00\x1c\x01\xc0\x1e\x03\x80\x1f\x07\x80'\
b'\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x0b\x00\x00\x00\x07\xe0\x0f\xe0\x1f\xe0\x1e\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\xff\xc0\xff\xc0\xff\xc0\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x01\xf1\xc0\x07\xfd\xc0\x0f\xff\xc0\x0f\x0f\xc0\x1e'\
b'\x07\xc0\x1c\x03\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01'\
b'\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\xc0\x1e\x07\xc0'\
b'\x0f\x0f\xc0\x0f\xff\xc0\x07\xfd\xc0\x01\xf9\xc0\x00\x01\xc0\x38'\
b'\x01\xc0\x3c\x03\x80\x3e\x07\x80\x1f\xff\x00\x0f\xfe\x00\x03\xf8'\
b'\x00\x00\x00\x00\x13\x00\x00\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\xf8'\
b'\x00\x3b\xfe\x00\x3f\xff\x00\x3f\x0f\x80\x3c\x07\x80\x3c\x03\x80'\
b'\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38'\
b'\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03'\
b'\x80\x38\x03\x80\x38\x03\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07'\
b'\x00\x00\x38\x38\x38\x00\x00\x00\x00\x38\x38\x38\x38\x38\x38\x38'\
b'\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x0b\x00\x00\x00\x07\x00\x07\x00\x07\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x0f\x00\x7e\x00\x7e\x00\xfc\x00\x00\x00\x13\x00\x00\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x03\xc0\x1c\x07\x80\x1c\x0f\x00\x1c'\
b'\x1e\x00\x1c\x7c\x00\x1c\xf8\x00\x1d\xe0\x00\x1f\xc0\x00\x1f\xe0'\
b'\x00\x1f\xf0\x00\x1e\x78\x00\x1c\x78\x00\x1c\x3c\x00\x1c\x1e\x00'\
b'\x1c\x0f\x00\x1c\x0f\x00\x1c\x07\x80\x1c\x03\xc0\x1c\x01\xe0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x38\x38\x38\x38\x38\x38'\
b'\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38'\
b'\x38\x38\x38\x38\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x7c'\
b'\x0f\x80\x1d\xfe\x3f\xc0\x1d\xff\x7f\xe0\x1f\x87\xe0\xf0\x1e\x07'\
b'\xc0\x70\x1e\x03\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03'\
b'\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03'\
b'\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03'\
b'\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x38\xf8\x00\x3b\xfe\x00\x3f\xff\x00\x3f\x0f\x80'\
b'\x3c\x07\x80\x3c\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38'\
b'\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03'\
b'\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'\
b'\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f\x80\x1e\x07\x80\x1c\x03'\
b'\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x1c\x03\x80\x1e\x07\x80\x1f\x0f\x80\x0f'\
b'\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\xf8\x00\x3b\xfe\x00'\
b'\x3b\xff\x00\x3f\x0f\x80\x3e\x07\x80\x3c\x03\x80\x38\x01\xc0\x38'\
b'\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01'\
b'\xc0\x3c\x03\x80\x3c\x07\x80\x3f\x0f\x00\x3f\xff\x00\x3b\xfc\x00'\
b'\x38\xf8\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x38\x00\x00\x38\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x01\xf1\xc0\x07\xfd\xc0\x0f\xfd\xc0\x1f\x0f'\
b'\xc0\x1e\x07\xc0\x1c\x03\xc0\x38\x03\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\xc0\x1e'\
b'\x07\xc0\x0f\x0f\xc0\x0f\xff\xc0\x03\xfd\xc0\x01\xf1\xc0\x00\x01'\
b'\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0'\
b'\x00\x01\xc0\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x39\xf0\x3b\xf0\x3f\xe0\x3e\x00'\
b'\x3c\x00\x3c\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x07\xf0\x00\x1f\xfc\x00\x3f\xfe'\
b'\x00\x78\x0f\x00\x70\x07\x00\x70\x00\x00\x78\x00\x00\x3f\x00\x00'\
b'\x3f\xf0\x00\x0f\xfe\x00\x01\xff\x00\x00\x1f\x80\x00\x07\x80\x70'\
b'\x03\x80\x78\x03\x80\x3c\x0f\x00\x3f\xff\x00\x0f\xfe\x00\x03\xf8'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x0c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\xff\xc0\xff\xc0\xff'\
b'\xc0\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1f\xc0\x0f\xc0\x07'\
b'\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x03\x80\x38\x03'\
b'\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80'\
b'\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38'\
b'\x03\x80\x38\x07\x80\x3c\x07\x80\x3e\x1f\x80\x1f\xfb\x80\x0f\xf3'\
b'\x80\x03\xe3\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\xe0\x03\x80\x70\x07\x00\x70\x07\x00\x70'\
b'\x07\x00\x38\x0e\x00\x38\x0e\x00\x3c\x1e\x00\x1c\x1c\x00\x1c\x1c'\
b'\x00\x0e\x38\x00\x0e\x38\x00\x0e\x38\x00\x07\x70\x00\x07\x70\x00'\
b'\x07\x70\x00\x03\xe0\x00\x03\xe0\x00\x01\xc0\x00\x01\xc0\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x0e\x01\xc0\x70\x0e\x01'\
b'\xc0\x70\x1f\x01\xc0\x38\x1f\x03\x80\x38\x1b\x03\x80\x38\x1b\x07'\
b'\x80\x1c\x3b\x87\x00\x1c\x39\x87\x00\x0e\x31\x8e\x00\x0e\x31\x8e'\
b'\x00\x0e\x31\x8e\x00\x07\x71\xdc\x00\x07\x60\xdc\x00\x07\x60\xdc'\
b'\x00\x03\x60\xd8\x00\x03\xe0\xf8\x00\x03\xc0\x70\x00\x01\xc0\x70'\
b'\x00\x01\xc0\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xf0\x07\x70\x0e\x38\x1e\x3c\x1c\x1c'\
b'\x38\x0e\x78\x0f\x70\x07\xe0\x03\xe0\x03\xc0\x03\xc0\x07\xe0\x0f'\
b'\xf0\x0e\x70\x1e\x38\x3c\x3c\x38\x1c\x70\x0e\xf0\x0f\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xe0\x03\x80\x70\x07\x80\x70\x07\x00'\
b'\x78\x07\x00\x38\x0f\x00\x38\x0e\x00\x3c\x0e\x00\x1c\x1c\x00\x1c'\
b'\x1c\x00\x0e\x3c\x00\x0e\x38\x00\x0f\x38\x00\x07\x78\x00\x07\x70'\
b'\x00\x07\xf0\x00\x03\xe0\x00\x03\xe0\x00\x01\xe0\x00\x01\xc0\x00'\
b'\x01\xc0\x00\x03\xc0\x00\x03\x80\x00\x07\x80\x00\x3f\x00\x00\x3e'\
b'\x00\x00\x3c\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x7f\xff\x00\x7f\xff\x00\x7f\xff\x00\x00\x1e\x00\x00\x3c'\
b'\x00\x00\x78\x00\x00\x70\x00\x00\xf0\x00\x01\xe0\x00\x03\xc0\x00'\
b'\x07\x80\x00\x0f\x00\x00\x1e\x00\x00\x3c\x00\x00\x78\x00\x00\x70'\
b'\x00\x00\xff\xff\x00\xff\xff\x00\xff\xff\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x0c\x00\x00\x00\x00\xf0\x03\xf0\x03\xf0\x07\x80\x07'\
b'\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07'\
b'\x00\x0e\x00\x1e\x00\x7c\x00\x70\x00\x7c\x00\x1e\x00\x0e\x00\x07'\
b'\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07'\
b'\x00\x07\x80\x03\xf0\x03\xf0\x00\xf0\x00\x00\x09\x00\x00\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x0c\x00\x00\x00\xf0\x00\xfc\x00\xfc\x00\x1e\x00\x0e'\
b'\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x07\x00\x07\x80\x03\xe0\x00\xe0\x03\xe0\x07\x80\x0f\x00\x0e'\
b'\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x1e\x00\xfc\x00\xfc\x00\xf0\x00\x00\x00\x15\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x80'\
b'\x00\x1f\xf0\x10\x3f\xfc\x70\x38\x7f\xf0\x20\x1f\xe0\x00\x07\x80'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00'
_index =\
b'\x00\x00\x6b\x00\xb3\x00\xfb\x00\x43\x01\xae\x01\x19\x02\xa7\x02'\
b'\x12\x03\x37\x03\x7f\x03\xc7\x03\x0f\x04\x7a\x04\xc2\x04\x0a\x05'\
b'\x52\x05\x9a\x05\x05\x06\x70\x06\xdb\x06\x46\x07\xb1\x07\x1c\x08'\
b'\x87\x08\xf2\x08\x5d\x09\xc8\x09\x10\x0a\x58\x0a\xc3\x0a\x2e\x0b'\
b'\x99\x0b\x04\x0c\xb5\x0c\x20\x0d\x8b\x0d\x19\x0e\xa7\x0e\x12\x0f'\
b'\x7d\x0f\x0b\x10\x99\x10\xe1\x10\x4c\x11\xb7\x11\x22\x12\xb0\x12'\
b'\x3e\x13\xcc\x13\x37\x14\xc5\x14\x53\x15\xbe\x15\x29\x16\xb7\x16'\
b'\x22\x17\xd3\x17\x3e\x18\xa9\x18\x14\x19\x5c\x19\xa4\x19\xec\x19'\
b'\x57\x1a\xc2\x1a\x0a\x1b\x75\x1b\xe0\x1b\x4b\x1c\xb6\x1c\x21\x1d'\
b'\x69\x1d\xd4\x1d\x3f\x1e\x64\x1e\xac\x1e\x17\x1f\x3c\x1f\xca\x1f'\
b'\x35\x20\xa0\x20\x0b\x21\x76\x21\xbe\x21\x29\x22\x71\x22\xdc\x22'\
b'\x47\x23\xd5\x23\x1d\x24\x88\x24\xf3\x24\x3b\x25\x83\x25\xcb\x25'\
b'\x36\x26'
_mvfont = memoryview(_font)
_mvi = memoryview(_index)
ifb = lambda l : l[0] | (l[1] << 8)
def get_ch(ch):
oc = ord(ch)
ioff = 2 * (oc - 32 + 1) if oc >= 32 and oc <= 126 else 0
doff = ifb(_mvi[ioff : ])
width = ifb(_mvfont[doff : ])
next_offs = doff + 2 + ((width - 1)//8 + 1) * 35
return _mvfont[doff + 2:next_offs], 35, width

Wyświetl plik

@ -0,0 +1,232 @@
# Code generated by font_to_py.py.
# Font: Arial.ttf Char set: 0123456789:
# Cmd: ./font_to_py.py Arial.ttf 50 arial_50.py -x -c 0123456789:
version = '0.33'
def height():
return 50
def baseline():
return 49
def max_width():
return 37
def hmap():
return True
def reverse():
return False
def monospaced():
return False
def min_ch():
return 48
def max_ch():
return 63
_font =\
b'\x25\x00\x00\x03\xfe\x00\x00\x00\x1f\xff\xc0\x00\x00\x7f\xff\xf0'\
b'\x00\x00\xff\xff\xf8\x00\x01\xff\xff\xfc\x00\x03\xff\xff\xfe\x00'\
b'\x07\xfe\x03\xff\x00\x07\xf8\x00\xff\x80\x0f\xf0\x00\x7f\x80\x0f'\
b'\xe0\x00\x3f\x80\x0f\xc0\x00\x1f\xc0\x1f\xc0\x00\x1f\xc0\x1f\xc0'\
b'\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x03\x80\x00\x0f\xc0\x00\x00\x00'\
b'\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00\x00\x1f\x80\x00\x00\x00\x3f'\
b'\x80\x00\x00\x00\x7f\x00\x00\x00\x00\xff\x00\x00\x00\x01\xfe\x00'\
b'\x00\x00\x03\xfc\x00\x00\x00\x07\xf8\x00\x00\x00\x0f\xf0\x00\x00'\
b'\x00\x1f\xe0\x00\x00\x00\x3f\xc0\x00\x00\x00\x7f\x80\x00\x00\x00'\
b'\x7f\x00\x00\x00\x00\xfe\x00\x00\x00\x00\xfc\x00\x00\x00\x01\xfc'\
b'\x00\x00\x00\x01\xfc\x00\x00\x00\x01\xf8\x00\x00\x00\x01\xf8\x00'\
b'\x00\x00\x01\xf8\x00\x00\x00\x01\xf8\x00\x00\x00\x01\xf8\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xf8\x00\x00\x00\x01'\
b'\xf8\x00\x00\x00\x01\xf8\x00\x00\x00\x01\xf8\x00\x00\x00\x01\xf8'\
b'\x00\x00\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x25\x00\x00\x00'\
b'\x00\x00\x00\x00\x03\xfe\x00\x00\x00\x0f\xff\x80\x00\x00\x3f\xff'\
b'\xe0\x00\x00\x7f\xff\xf0\x00\x00\xff\xff\xf8\x00\x01\xff\xff\xfc'\
b'\x00\x03\xfe\x07\xfc\x00\x03\xfc\x01\xfe\x00\x07\xf0\x00\xfe\x00'\
b'\x07\xf0\x00\x7f\x00\x07\xe0\x00\x3f\x00\x0f\xe0\x00\x3f\x00\x0f'\
b'\xc0\x00\x1f\x80\x0f\xc0\x00\x1f\x80\x0f\xc0\x00\x1f\x80\x0f\xc0'\
b'\x00\x1f\x80\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00'\
b'\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f'\
b'\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0'\
b'\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f'\
b'\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80'\
b'\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x0f\xc0\x00\x1f\x80\x0f\xc0\x00'\
b'\x1f\x80\x0f\xc0\x00\x1f\x80\x0f\xc0\x00\x1f\x80\x0f\xe0\x00\x3f'\
b'\x80\x07\xe0\x00\x3f\x00\x07\xf0\x00\x7f\x00\x07\xf8\x00\xff\x00'\
b'\x03\xfc\x01\xfe\x00\x03\xff\x07\xfe\x00\x01\xff\xff\xfc\x00\x00'\
b'\xff\xff\xf8\x00\x00\x7f\xff\xf0\x00\x00\x3f\xff\xe0\x00\x00\x0f'\
b'\xff\x80\x00\x00\x03\xfe\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x07\x80\x00\x00\x00\x0f\x80\x00\x00\x00\x0f\x80\x00\x00\x00'\
b'\x1f\x80\x00\x00\x00\x3f\x80\x00\x00\x00\x7f\x80\x00\x00\x00\xff'\
b'\x80\x00\x00\x03\xff\x80\x00\x00\x07\xff\x80\x00\x00\x0f\xff\x80'\
b'\x00\x00\x3f\xff\x80\x00\x00\xff\xdf\x80\x00\x01\xff\x9f\x80\x00'\
b'\x01\xfe\x1f\x80\x00\x01\xfc\x1f\x80\x00\x01\xf0\x1f\x80\x00\x01'\
b'\xc0\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00'\
b'\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f'\
b'\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80'\
b'\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00'\
b'\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00'\
b'\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00'\
b'\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f'\
b'\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80'\
b'\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00'\
b'\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00'\
b'\x00\x00\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00\x03\xfe\x00\x00'\
b'\x00\x1f\xff\xc0\x00\x00\x7f\xff\xe0\x00\x01\xff\xff\xf8\x00\x03'\
b'\xff\xff\xfc\x00\x03\xff\xff\xfc\x00\x07\xfe\x07\xfe\x00\x0f\xf0'\
b'\x00\xff\x00\x0f\xe0\x00\x7f\x00\x0f\xc0\x00\x3f\x00\x1f\xc0\x00'\
b'\x3f\x80\x1f\x80\x00\x1f\x80\x1f\x80\x00\x1f\x80\x03\x80\x00\x1f'\
b'\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80'\
b'\x00\x00\x00\x3f\x00\x00\x00\x00\x3f\x00\x00\x00\x00\x7f\x00\x00'\
b'\x00\x00\xfe\x00\x00\x00\x01\xfe\x00\x00\x00\x03\xfc\x00\x00\x00'\
b'\x07\xf8\x00\x00\x00\x0f\xf0\x00\x00\x00\x1f\xe0\x00\x00\x00\x3f'\
b'\xe0\x00\x00\x00\x7f\xc0\x00\x00\x00\xff\x80\x00\x00\x01\xfe\x00'\
b'\x00\x00\x03\xfc\x00\x00\x00\x07\xf8\x00\x00\x00\x1f\xf0\x00\x00'\
b'\x00\x3f\xe0\x00\x00\x00\x7f\xc0\x00\x00\x00\xff\x80\x00\x00\x01'\
b'\xfe\x00\x00\x00\x03\xfc\x00\x00\x00\x07\xf8\x00\x00\x00\x07\xf0'\
b'\x00\x00\x00\x0f\xe0\x00\x00\x00\x0f\xe0\x00\x00\x00\x1f\xff\xff'\
b'\xff\x80\x1f\xff\xff\xff\x80\x3f\xff\xff\xff\x80\x3f\xff\xff\xff'\
b'\x80\x3f\xff\xff\xff\x80\x3f\xff\xff\xff\x80\x00\x00\x00\x00\x00'\
b'\x25\x00\x00\x00\x00\x00\x00\x00\x07\xfc\x00\x00\x00\x1f\xff\x80'\
b'\x00\x00\x7f\xff\xe0\x00\x00\xff\xff\xf0\x00\x01\xff\xff\xf8\x00'\
b'\x03\xff\xff\xfc\x00\x07\xfc\x07\xfe\x00\x0f\xf0\x01\xfe\x00\x0f'\
b'\xe0\x00\xfe\x00\x0f\xc0\x00\x7f\x00\x1f\xc0\x00\x3f\x00\x1f\x80'\
b'\x00\x3f\x00\x03\x80\x00\x3f\x00\x00\x00\x00\x3f\x00\x00\x00\x00'\
b'\x3f\x00\x00\x00\x00\x7e\x00\x00\x00\x00\xfe\x00\x00\x00\x01\xfc'\
b'\x00\x00\x00\x0f\xf8\x00\x00\x01\xff\xf0\x00\x00\x01\xff\xe0\x00'\
b'\x00\x01\xff\xe0\x00\x00\x01\xff\xf8\x00\x00\x01\xff\xfc\x00\x00'\
b'\x01\x8f\xfe\x00\x00\x00\x01\xff\x00\x00\x00\x00\x7f\x00\x00\x00'\
b'\x00\x3f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\xc0\x00\x00\x00'\
b'\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00\x00\x0f'\
b'\xc0\x00\x00\x00\x0f\xc0\x03\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0'\
b'\x1f\xc0\x00\x1f\x80\x1f\xc0\x00\x1f\x80\x0f\xe0\x00\x3f\x80\x0f'\
b'\xf0\x00\x7f\x00\x07\xf8\x00\xff\x00\x07\xfe\x03\xfe\x00\x03\xff'\
b'\xff\xfc\x00\x01\xff\xff\xf8\x00\x00\xff\xff\xf0\x00\x00\x7f\xff'\
b'\xe0\x00\x00\x1f\xff\x80\x00\x00\x03\xfc\x00\x00\x25\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xf0\x00\x00\x00\x03'\
b'\xf0\x00\x00\x00\x07\xf0\x00\x00\x00\x0f\xf0\x00\x00\x00\x0f\xf0'\
b'\x00\x00\x00\x1f\xf0\x00\x00\x00\x3f\xf0\x00\x00\x00\x7f\xf0\x00'\
b'\x00\x00\x7f\xf0\x00\x00\x00\xff\xf0\x00\x00\x01\xff\xf0\x00\x00'\
b'\x01\xff\xf0\x00\x00\x03\xfb\xf0\x00\x00\x07\xf3\xf0\x00\x00\x0f'\
b'\xf3\xf0\x00\x00\x0f\xe3\xf0\x00\x00\x1f\xc3\xf0\x00\x00\x3f\x83'\
b'\xf0\x00\x00\x7f\x83\xf0\x00\x00\x7f\x03\xf0\x00\x00\xfe\x03\xf0'\
b'\x00\x01\xfc\x03\xf0\x00\x03\xfc\x03\xf0\x00\x03\xf8\x03\xf0\x00'\
b'\x07\xf0\x03\xf0\x00\x0f\xf0\x03\xf0\x00\x0f\xe0\x03\xf0\x00\x1f'\
b'\xc0\x03\xf0\x00\x3f\x80\x03\xf0\x00\x7f\x80\x03\xf0\x00\x7f\xff'\
b'\xff\xff\xc0\x7f\xff\xff\xff\xc0\x7f\xff\xff\xff\xc0\x7f\xff\xff'\
b'\xff\xc0\x7f\xff\xff\xff\xc0\x7f\xff\xff\xff\xc0\x00\x00\x03\xf0'\
b'\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xf0\x00'\
b'\x00\x00\x03\xf0\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xf0\x00\x00'\
b'\x00\x03\xf0\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xf0\x00\x00\x00'\
b'\x03\xf0\x00\x00\x00\x00\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x7f\xff\xff\x00\x00\x7f\xff\xff\x00\x00\xff'\
b'\xff\xff\x00\x00\xff\xff\xff\x00\x00\xff\xff\xff\x00\x00\xff\xff'\
b'\xff\x00\x00\xfc\x00\x00\x00\x01\xfc\x00\x00\x00\x01\xf8\x00\x00'\
b'\x00\x01\xf8\x00\x00\x00\x01\xf8\x00\x00\x00\x01\xf8\x00\x00\x00'\
b'\x03\xf8\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xf0\x00\x00\x00\x03'\
b'\xf0\x7f\x00\x00\x03\xf3\xff\xc0\x00\x07\xf7\xff\xf0\x00\x07\xff'\
b'\xff\xf8\x00\x07\xff\xff\xfc\x00\x07\xff\xff\xfe\x00\x07\xfe\x03'\
b'\xff\x00\x0f\xf8\x00\xff\x00\x0f\xf0\x00\x7f\x80\x0f\xe0\x00\x3f'\
b'\x80\x01\xc0\x00\x1f\x80\x00\x00\x00\x1f\xc0\x00\x00\x00\x0f\xc0'\
b'\x00\x00\x00\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00\x00\x0f\xc0\x00'\
b'\x00\x00\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00'\
b'\x00\x0f\xc0\x1f\x80\x00\x1f\x80\x1f\x80\x00\x1f\x80\x1f\xc0\x00'\
b'\x1f\x80\x0f\xc0\x00\x3f\x00\x0f\xe0\x00\x7f\x00\x07\xf0\x00\xfe'\
b'\x00\x07\xfc\x03\xfe\x00\x03\xff\xff\xfc\x00\x01\xff\xff\xf8\x00'\
b'\x00\xff\xff\xf0\x00\x00\x7f\xff\xe0\x00\x00\x1f\xff\x80\x00\x00'\
b'\x07\xfc\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00\x01\xfe\x00\x00'\
b'\x00\x0f\xff\xc0\x00\x00\x3f\xff\xf0\x00\x00\x7f\xff\xf8\x00\x00'\
b'\xff\xff\xfc\x00\x01\xff\xff\xfe\x00\x03\xff\x03\xfe\x00\x03\xf8'\
b'\x00\xff\x00\x07\xf0\x00\x7f\x00\x07\xf0\x00\x3f\x00\x0f\xe0\x00'\
b'\x3f\x80\x0f\xc0\x00\x1f\x80\x0f\xc0\x00\x00\x00\x1f\x80\x00\x00'\
b'\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00'\
b'\x1f\x00\xff\x00\x00\x3f\x07\xff\xc0\x00\x3f\x0f\xff\xf0\x00\x3f'\
b'\x3f\xff\xf8\x00\x3f\x7f\xff\xfc\x00\x3f\x7f\xff\xfe\x00\x3f\xfe'\
b'\x03\xff\x00\x3f\xf0\x00\xff\x00\x3f\xe0\x00\x7f\x80\x3f\xc0\x00'\
b'\x3f\x80\x3f\x80\x00\x1f\x80\x3f\x80\x00\x1f\xc0\x3f\x00\x00\x0f'\
b'\xc0\x3f\x00\x00\x0f\xc0\x3f\x00\x00\x0f\xc0\x3f\x00\x00\x0f\xc0'\
b'\x1f\x00\x00\x0f\xc0\x1f\x00\x00\x0f\xc0\x1f\x00\x00\x0f\xc0\x1f'\
b'\x80\x00\x1f\xc0\x1f\x80\x00\x1f\x80\x0f\xc0\x00\x1f\x80\x0f\xc0'\
b'\x00\x3f\x80\x07\xe0\x00\x7f\x00\x07\xf8\x00\xff\x00\x03\xfe\x03'\
b'\xfe\x00\x01\xff\xff\xfc\x00\x01\xff\xff\xfc\x00\x00\x7f\xff\xf8'\
b'\x00\x00\x3f\xff\xe0\x00\x00\x0f\xff\xc0\x00\x00\x01\xfe\x00\x00'\
b'\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\xff\xff\xff'\
b'\xc0\x1f\xff\xff\xff\xc0\x1f\xff\xff\xff\xc0\x1f\xff\xff\xff\xc0'\
b'\x1f\xff\xff\xff\xc0\x1f\xff\xff\xff\x80\x00\x00\x00\x0f\x80\x00'\
b'\x00\x00\x1f\x00\x00\x00\x00\x3e\x00\x00\x00\x00\x7c\x00\x00\x00'\
b'\x00\xfc\x00\x00\x00\x01\xf8\x00\x00\x00\x01\xf0\x00\x00\x00\x03'\
b'\xf0\x00\x00\x00\x07\xe0\x00\x00\x00\x07\xc0\x00\x00\x00\x0f\xc0'\
b'\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x3f\x00\x00'\
b'\x00\x00\x3f\x00\x00\x00\x00\x7e\x00\x00\x00\x00\x7e\x00\x00\x00'\
b'\x00\xfc\x00\x00\x00\x00\xfc\x00\x00\x00\x01\xf8\x00\x00\x00\x01'\
b'\xf8\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xf0\x00\x00\x00\x03\xf0'\
b'\x00\x00\x00\x07\xe0\x00\x00\x00\x07\xe0\x00\x00\x00\x07\xe0\x00'\
b'\x00\x00\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00\x00\x0f\xc0\x00\x00'\
b'\x00\x0f\xc0\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00'\
b'\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x3f'\
b'\x00\x00\x00\x00\x3f\x00\x00\x00\x00\x3f\x00\x00\x00\x00\x3f\x00'\
b'\x00\x00\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x00\x00'\
b'\x00\x00\x00\x00\x03\xfe\x00\x00\x00\x1f\xff\x80\x00\x00\x3f\xff'\
b'\xe0\x00\x00\x7f\xff\xf0\x00\x00\xff\xff\xf8\x00\x01\xff\xff\xfc'\
b'\x00\x03\xfe\x03\xfe\x00\x03\xf8\x00\xfe\x00\x03\xf0\x00\x7e\x00'\
b'\x07\xf0\x00\x7f\x00\x07\xe0\x00\x3f\x00\x07\xe0\x00\x3f\x00\x07'\
b'\xe0\x00\x3f\x00\x07\xe0\x00\x3f\x00\x07\xe0\x00\x3f\x00\x07\xf0'\
b'\x00\x7f\x00\x03\xf0\x00\x7e\x00\x03\xf8\x00\xfe\x00\x01\xfe\x03'\
b'\xfc\x00\x00\xff\xff\xf8\x00\x00\x7f\xff\xf0\x00\x00\x1f\xff\xc0'\
b'\x00\x00\x3f\xff\xe0\x00\x00\xff\xff\xf8\x00\x01\xff\xff\xfc\x00'\
b'\x03\xfe\x03\xfe\x00\x07\xf8\x00\xff\x00\x07\xe0\x00\x7f\x00\x0f'\
b'\xe0\x00\x3f\x80\x0f\xc0\x00\x1f\x80\x1f\xc0\x00\x1f\xc0\x1f\x80'\
b'\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00'\
b'\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\xc0\x00\x1f'\
b'\xc0\x0f\xc0\x00\x1f\x80\x0f\xc0\x00\x3f\x80\x0f\xe0\x00\x3f\x80'\
b'\x07\xf8\x00\xff\x00\x07\xfe\x03\xff\x00\x03\xff\xff\xfe\x00\x01'\
b'\xff\xff\xfc\x00\x00\xff\xff\xf8\x00\x00\x7f\xff\xf0\x00\x00\x1f'\
b'\xff\xc0\x00\x00\x03\xfe\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00'\
b'\x03\xfc\x00\x00\x00\x1f\xff\x00\x00\x00\x7f\xff\xc0\x00\x00\xff'\
b'\xff\xf0\x00\x01\xff\xff\xf8\x00\x03\xff\xff\xfc\x00\x03\xfe\x03'\
b'\xfc\x00\x07\xf8\x00\xfe\x00\x0f\xf0\x00\x7e\x00\x0f\xe0\x00\x3f'\
b'\x00\x0f\xe0\x00\x1f\x00\x1f\xc0\x00\x1f\x80\x1f\xc0\x00\x0f\x80'\
b'\x1f\x80\x00\x0f\x80\x1f\x80\x00\x0f\x80\x1f\x80\x00\x0f\xc0\x1f'\
b'\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80\x00\x0f\xc0\x1f\x80'\
b'\x00\x0f\xc0\x1f\xc0\x00\x1f\xc0\x0f\xc0\x00\x1f\xc0\x0f\xe0\x00'\
b'\x3f\xc0\x0f\xf0\x00\x7f\xc0\x07\xf8\x00\xff\xc0\x07\xfe\x03\xff'\
b'\xc0\x03\xff\xff\xff\xc0\x01\xff\xff\xef\xc0\x00\xff\xff\xcf\xc0'\
b'\x00\x7f\xff\x0f\xc0\x00\x1f\xfe\x0f\xc0\x00\x07\xf0\x0f\xc0\x00'\
b'\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00\x00\x1f\x80\x00\x00'\
b'\x00\x1f\x80\x00\x00\x00\x3f\x00\x0f\xc0\x00\x3f\x00\x0f\xc0\x00'\
b'\x3f\x00\x0f\xe0\x00\x7e\x00\x07\xe0\x00\xfe\x00\x07\xf0\x01\xfc'\
b'\x00\x03\xfc\x07\xfc\x00\x03\xff\xff\xf8\x00\x01\xff\xff\xf0\x00'\
b'\x00\xff\xff\xe0\x00\x00\x7f\xff\xc0\x00\x00\x1f\xff\x00\x00\x00'\
b'\x07\xf8\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x03\xf0\x00\x03\xf0\x00\x03\xf0\x00\x03\xf0\x00\x03\xf0\x00\x03'\
b'\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x03\xf0\x00\x03\xf0\x00\x03\xf0\x00'\
b'\x03\xf0\x00\x03\xf0\x00\x03\xf0\x00\x00\x00\x00'
_index =\
b'\x00\x00\xfc\x00\xf8\x01\xf4\x02\xf0\x03\xec\x04\xe8\x05\xe4\x06'\
b'\xe0\x07\xdc\x08\xd8\x09\xd4\x0a\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x6c\x0b'
_mvfont = memoryview(_font)
_mvi = memoryview(_index)
ifb = lambda l : l[0] | (l[1] << 8)
def get_ch(ch):
oc = ord(ch)
ioff = 2 * (oc - 48 + 1) if oc >= 48 and oc <= 63 else 0
doff = ifb(_mvi[ioff : ])
width = ifb(_mvfont[doff : ])
next_offs = doff + 2 + ((width - 1)//8 + 1) * 50
return _mvfont[doff + 2:next_offs], 50, width

Wyświetl plik

@ -0,0 +1,94 @@
# clocktest.py Test/demo program for Adafruit sharp 2.7" display
# Copyright (c) 2020 Peter Hinch
# The MIT License (MIT)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# WIRING TODO
# Pyb SSD
# 3v3 Vin
# Gnd Gnd
# X1 DC
# X2 CS
# X3 Rst
# X6 CLK
# X8 DATA
# Demo of initialisation procedure designed to minimise risk of memory fail
# when instantiating the frame buffer. The aim is to do this as early as
# possible before importing other modules.
import machine
import gc
from sharp import SHARP as SSD
# Initialise hardware
pcs = machine.Pin('Y5', machine.Pin.OUT_PP, value=0) # Active high
spi = machine.SPI(2)
gc.collect() # Precaution before instantiating framebuf
ssd = SSD(spi, pcs)
from nanogui import Dial, Pointer, refresh, Label
refresh(ssd) # Initialise and clear display.
# Now import other modules
import cmath
import utime
from writer import Writer
# Font for Writer
import freesans20 as font_small
import arial35 as font_large
def aclock():
uv = lambda phi : cmath.rect(1, phi) # Return a unit vector of phase phi
pi = cmath.pi
days = ('Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat', 'Sun')
months = ('Jan', 'Feb', 'March', 'April', 'May', 'June', 'July',
'Aug', 'Sept', 'Oct', 'Nov', 'Dec')
# Instantiate Writer
Writer.set_textpos(ssd, 0, 0) # In case previous tests have altered it
wri = Writer(ssd, font_small, verbose=False)
wri.set_clip(True, True, False)
wri_tim = Writer(ssd, font_large, verbose=False)
wri_tim.set_clip(True, True, False)
# Instantiate displayable objects
dial = Dial(wri, 2, 2, height = 215, ticks = 12, bdcolor=None, pip=True)
lbltim = Label(wri_tim, 50, 230, '00.00.00')
lbldat = Label(wri, 100, 230, 100)
hrs = Pointer(dial)
mins = Pointer(dial)
secs = Pointer(dial)
hstart = 0 + 0.7j # Pointer lengths and position at top
mstart = 0 + 0.92j
sstart = 0 + 0.92j
while True:
t = utime.localtime()
hrs.value(hstart * uv(-t[3]*pi/6 - t[4]*pi/360))
mins.value(mstart * uv(-t[4] * pi/30))
secs.value(sstart * uv(-t[5] * pi/30))
lbltim.value('{:02d}.{:02d}.{:02d}'.format(t[3], t[4], t[5]))
lbldat.value('{} {} {} {}'.format(days[t[6]], t[2], months[t[1] - 1], t[0]))
refresh(ssd)
utime.sleep(1)
aclock()

Wyświetl plik

@ -0,0 +1,59 @@
# sharp.py Device driver for monochrome sharp displays
# Tested on
# https://www.adafruit.com/product/4694 2.7 inch 400x240 Monochrome
# Should also work on
# https://www.adafruit.com/product/3502 1.3 inch 144x168
# https://www.adafruit.com/product/1393 1.3 inch 96x96 Monochrome
# Copyright (c) Peter Hinch 2020
# Released under the MIT license see LICENSE
# Code checked against https://github.com/adafruit/Adafruit_CircuitPython_SharpMemoryDisplay
# Current draw on 2.7" Adafruit display ~90uA.
# 2.7" schematic https://learn.adafruit.com/assets/94077
# Datasheet 2.7" https://cdn-learn.adafruit.com/assets/assets/000/094/215/original/LS027B7DH01_Rev_Jun_2010.pdf?1597872422
# Datasheet 1.3" http://www.adafruit.com/datasheets/LS013B4DN04-3V_FPC-204284.pdf
import framebuf
import machine
from micropython import const
_WRITECMD = const(1) # Command bits
_VCOM = const(2)
class SHARP(framebuf.FrameBuffer):
def __init__(self, spi, pincs):
spi.init(baudrate=2_000_000, firstbit=machine.SPI.LSB) # Data sheet: should support 2MHz
self._spi = spi
self._pincs = pincs
self.height = 240 # Required by Writer class and nanogui
self.width = 400
self._buffer = bytearray(self.height * self.width // 8)
self._mvb = memoryview(self._buffer)
super().__init__(self._buffer, self.width, self.height, framebuf.MONO_HMSB)
self._cmd = bytearray(1) # Buffer for command. Holds current VCOM bit
self._cmd[0] = _WRITECMD
self._lno = bytearray(1) # Line no.
self._dummy = bytearray(1) # Dummy (0)
# .show should be called periodically to avoid frame inversion flag
# retaining the same value for long periods
def show(self):
spi = self._spi
bpl = self.width // 8 # Bytes per line
self._pincs(1) # CS is active high
spi.write(self._cmd)
start = 0
lno = self._lno
lno[0] = 1 # Gate line address (starts at 1)
for _ in range(self.height):
spi.write(lno)
spi.write(self._mvb[start : start + bpl])
spi.write(self._dummy)
start += bpl
lno[0] += 1 # Gate line address
spi.write(self._dummy)
self._pincs(0)
self._cmd[0] ^= _VCOM # Toggle frame inversion flag

Wyświetl plik

@ -0,0 +1,35 @@
# sharptest.py Test script for monochrome sharp displays
# Tested on
# https://www.adafruit.com/product/4694 2.7 inch 400x240 Monochrome
# Copyright (c) Peter Hinch 2020
# Released under the MIT license see LICENSE
import machine
from sharp import SHARP
import freesans20, arial_50
from writer import Writer
import time
def test():
pcs = machine.Pin('Y5', machine.Pin.OUT_PP, value=0) # Active high
spi = machine.SPI(2)
ssd = SHARP(spi, pcs)
rhs = ssd.width -1
ssd.line(rhs - 80, 0, rhs, 80, 1)
square_side = 40
ssd.fill_rect(rhs - square_side, 0, square_side, square_side, 1)
wri = Writer(ssd, freesans20)
Writer.set_textpos(ssd, 0, 0) # verbose = False to suppress console output
wri.printstring('Sunday\n')
wri.printstring('12 Aug 2018\n')
wri.printstring('10.30am')
wri = Writer(ssd, arial_50)
Writer.set_textpos(ssd, 0, 120)
wri.printstring('10:30')
ssd.show()
test()