Skip to content

Conversation

patricksurry
Copy link

I needed a few extra gpio pins, so reduced the color depth by adding some definitions to CMakeLists:

add_definitions(
         # -DPICO_SCANVIDEO_48MHZ=1
        -DPICO_SCANVIDEO_COLOR_PIN_BASE=0
        -DPICO_SCANVIDEO_COLOR_PIN_COUNT=12
        -DPICO_SCANVIDEO_DPI_PIXEL_RSHIFT=0u
        -DPICO_SCANVIDEO_DPI_PIXEL_GSHIFT=4u
        -DPICO_SCANVIDEO_DPI_PIXEL_BSHIFT=8u
        -DPICO_SCANVIDEO_DPI_PIXEL_RCOUNT=4
        -DPICO_SCANVIDEO_DPI_PIXEL_GCOUNT=4
        -DPICO_SCANVIDEO_DPI_PIXEL_BCOUNT=4
    )

This works but the PICO_SCANVIDEO_PIXEL_FROM_RGB8 macro is broken since it assumes 5 bit values so colors are messed up.

This PR fixes it and some related macros.

btw, loving this library, thanks for sharing!

@kilograham
Copy link
Contributor

ooh, excellent, this has needed fixing for years ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants