kopia lustrzana https://github.com/Wren6991/PicoDVI
DEFAULT_DVI_SERIAL_CONFIG -> DVI_DEFAULT_SERIAL_CONFIG
rodzic
d5658b8276
commit
8a03ddc733
|
@ -9,11 +9,11 @@ pico_sdk_init()
|
|||
add_compile_options(-Wall)
|
||||
|
||||
# To change the default serial config for all apps, pass e.g.
|
||||
# cmake -DDEFAULT_DVI_SERIAL_CONFIG=pimoroni_demo_hdmi_cfg ..
|
||||
# cmake -DDVI_DEFAULT_SERIAL_CONFIG=pimoroni_demo_hdmi_cfg ..
|
||||
# then rebuild.
|
||||
set(DEFAULT_DVI_SERIAL_CONFIG "pico_sock_cfg" CACHE STRING
|
||||
set(DVI_DEFAULT_SERIAL_CONFIG "pico_sock_cfg" CACHE STRING
|
||||
"Select a default pin configuration from common_dvi_pin_configs.h")
|
||||
add_definitions(-DDEFAULT_DVI_SERIAL_CONFIG=${DEFAULT_DVI_SERIAL_CONFIG})
|
||||
add_definitions(-DDVI_DEFAULT_SERIAL_CONFIG=${DVI_DEFAULT_SERIAL_CONFIG})
|
||||
|
||||
include_directories(
|
||||
assets
|
||||
|
|
|
@ -34,7 +34,7 @@ static const struct dvi_serialiser_cfg picodvi_dvi_cfg = {
|
|||
};
|
||||
```
|
||||
|
||||
Serial configurations for a handful of boards are listed in [common_dvi_pin_configs.h](include/common_dvi_pin_configs.h). Feel free to raise a PR to add your board to this file. All of the example apps use the `DEFAULT_DVI_SERIAL_CONFIG` from this header to select their pin configuration, which has a default value of `pico_sock_cfg`. You can pass `-DDEFAULT_DVI_SERIAL_CONFIG=some_other_board` to `cmake` to override this default, so that the example apps will be built with a different serial configuration.
|
||||
Serial configurations for a handful of boards are listed in [common_dvi_pin_configs.h](include/common_dvi_pin_configs.h). Feel free to raise a PR to add your board to this file. All of the example apps use the `DVI_DEFAULT_SERIAL_CONFIG` from this header to select their pin configuration, which has a default value of `pico_sock_cfg`. You can pass `-DDVI_DEFAULT_SERIAL_CONFIG=some_other_board` to `cmake` to override this default, so that the example apps will be built with a different serial configuration.
|
||||
|
||||
As well as the DVI serial configuration, you may also want to set the `PICO_BOARD` flag for your target board to pick up things like UART and LED pin settings.
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ int main() {
|
|||
setup_default_uart();
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
dvi_register_irqs_this_core(&dvi0, DMA_IRQ_0);
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ int __not_in_flash("main") main() {
|
|||
set_sys_clock_khz(DVI_TIMING.bit_clk_khz, true);
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
for (uint y = 0; y < CHAR_ROWS; ++y) {
|
||||
|
|
|
@ -125,7 +125,7 @@ int main() {
|
|||
setup_default_uart();
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
const int BORDER = 10;
|
||||
|
|
|
@ -38,7 +38,7 @@ int main() {
|
|||
setup_default_uart();
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
// Core 1 will wait until it sees the first colour buffer, then start up the
|
||||
|
|
|
@ -143,7 +143,7 @@ int __not_in_flash("main") main() {
|
|||
printf("Configuring DVI\n");
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
printf("Core 1 start\n");
|
||||
|
|
|
@ -63,7 +63,7 @@ int main() {
|
|||
printf("Configuring DVI\n");
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi0.scanline_callback = core1_scanline_callback;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ int main() {
|
|||
setup_default_uart();
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
dvi_register_irqs_this_core(&dvi0, DMA_IRQ_0);
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ int main() {
|
|||
printf("Configuring DVI\n");
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
printf("Core 1 start\n");
|
||||
|
|
|
@ -122,7 +122,7 @@ int __not_in_flash("main") main() {
|
|||
printf("Configuring DVI\n");
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi0.scanline_callback = core1_scanline_callback;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ int __not_in_flash("main") main() {
|
|||
printf("Configuring DVI\n");
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
printf("DMA palette and setup\n");
|
||||
|
|
|
@ -100,7 +100,7 @@ int __not_in_flash("main") main() {
|
|||
printf("Configuring DVI\n");
|
||||
|
||||
dvi0.timing = &DVI_TIMING;
|
||||
dvi0.ser_cfg = DEFAULT_DVI_SERIAL_CONFIG;
|
||||
dvi0.ser_cfg = DVI_DEFAULT_SERIAL_CONFIG;
|
||||
dvi_init(&dvi0, next_striped_spin_lock_num(), next_striped_spin_lock_num());
|
||||
|
||||
printf("DMA first image line\n");
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#include "dvi_serialiser.h"
|
||||
|
||||
#ifndef DEFAULT_DVI_SERIAL_CONFIG
|
||||
#define DEFAULT_DVI_SERIAL_CONFIG pico_sock_cfg
|
||||
#ifndef DVI_DEFAULT_SERIAL_CONFIG
|
||||
#define DVI_DEFAULT_SERIAL_CONFIG pico_sock_cfg
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
Ładowanie…
Reference in New Issue