raspberrypi / pico-extras

BSD 3-Clause "New" or "Revised" License
480 stars 120 forks source link

Allow configuration of timing pins #34

Closed coliniuliano closed 1 year ago

coliniuliano commented 2 years ago

I wanted to change the location of some pins to make PCB routing simpler for my application, so I made these changes. I figure this may be useful to someone else.

The clock pin is no longer required to be beside the other timing pins. HSYNC, VSYNC, and DE pins must still be sequential but their order is now configurable.

I use the following configuration in my project to change the timing pin order:

add_compile_definitions(PICO_SCANVIDEO_ENABLE_CLOCK_PIN=1 PICO_SCANVIDEO_ENABLE_DEN_PIN=1)
add_compile_definitions(PICO_SCANVIDEO_CLOCK_PIN=22)
add_compile_definitions(PICO_SCANVIDEO_SYNC_PIN_BASE=26)
add_compile_definitions(PICO_SCANVIDEO_HSYNC_PIN_OFFSET=2 PICO_SCANVIDEO_VSYNC_PIN_OFFSET=1 PICO_SCANVIDEO_DEN_PIN_OFFSET=0)