Skip to content

Commit 8ee6dab

Browse files
author
Sebastien Bourdeauducq
committedMar 25, 2013
fb: better ordering of pixels within ASMI words
1 parent fdf7f10 commit 8ee6dab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎milkymist/framebuffer/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
_bpp = 32
1414
_bpc = 10
1515
_pixel_layout = [
16-
("b", _bpc),
17-
("g", _bpc),
1816
("r", _bpc),
17+
("g", _bpc),
18+
("b", _bpc),
1919
("pad", _bpp-3*_bpc)
2020
]
2121

2222
_bpc_dac = 8
2323
_dac_layout = [
2424
("hsync", 1),
2525
("vsync", 1),
26-
("b", _bpc_dac),
26+
("r", _bpc_dac),
2727
("g", _bpc_dac),
28-
("r", _bpc_dac)
28+
("b", _bpc_dac)
2929
]
3030

3131
class _FrameInitiator(spi.SingleGenerator):
@@ -173,7 +173,7 @@ def __init__(self, asmiport, simulation=False):
173173
adrbuffer = AbstractActor(plumbing.Buffer)
174174
dma = dma_asmi.Reader(asmiport)
175175
datbuffer = AbstractActor(plumbing.Buffer)
176-
cast = structuring.Cast(asmiport.hub.dw, packed_pixels)
176+
cast = structuring.Cast(asmiport.hub.dw, packed_pixels, reverse_to=True)
177177
unpack = structuring.Unpack(pack_factor, _pixel_layout)
178178
vtg = VTG()
179179
if simulation:

0 commit comments

Comments
 (0)
Please sign in to comment.