docs/library: Fix framebuf monochrome 1-bit modes, swapping HLSB/HMSB.

This fix can be demonstrated by the following:

    b = bytearray(32)
    f = framebuf.FrameBuffer(b, 32, 8, framebuf.MONO_HLSB)
    f.pixel(0, 0, 1)
    print('MONO_HLSB', hex(b[0]))

    b = bytearray(32)
    f = framebuf.FrameBuffer(b, 32, 8, framebuf.MONO_HMSB)
    f.pixel(0, 0, 1)
    print('MONO_HMSB', hex(b[0]))

Outcome:

    MONO_HLSB 0x80
    MONO_HMSB 0x1
pull/5628/head
Peter Hinch 2020-02-09 16:07:39 +00:00 zatwierdzone przez Damien George
rodzic ce40abcf21
commit 88cbfd791a
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -130,7 +130,7 @@ Constants
Monochrome (1-bit) color format Monochrome (1-bit) color format
This defines a mapping where the bits in a byte are horizontally mapped. This defines a mapping where the bits in a byte are horizontally mapped.
Each byte occupies 8 horizontal pixels with bit 0 being the leftmost. Each byte occupies 8 horizontal pixels with bit 7 being the leftmost.
Subsequent bytes appear at successive horizontal locations until the Subsequent bytes appear at successive horizontal locations until the
rightmost edge is reached. Further bytes are rendered on the next row, one rightmost edge is reached. Further bytes are rendered on the next row, one
pixel lower. pixel lower.
@ -139,7 +139,7 @@ Constants
Monochrome (1-bit) color format Monochrome (1-bit) color format
This defines a mapping where the bits in a byte are horizontally mapped. This defines a mapping where the bits in a byte are horizontally mapped.
Each byte occupies 8 horizontal pixels with bit 7 being the leftmost. Each byte occupies 8 horizontal pixels with bit 0 being the leftmost.
Subsequent bytes appear at successive horizontal locations until the Subsequent bytes appear at successive horizontal locations until the
rightmost edge is reached. Further bytes are rendered on the next row, one rightmost edge is reached. Further bytes are rendered on the next row, one
pixel lower. pixel lower.