DEFAULT_DVI_SERIAL_CONFIG -> DVI_DEFAULT_SERIAL_CONFIG

pull/17/head
Luke Wren 2021-06-16 08:55:05 +01:00
rodzic d5658b8276
commit 8a03ddc733
14 zmienionych plików z 17 dodań i 17 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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.

Wyświetl plik

@ -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);

Wyświetl plik

@ -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) {

Wyświetl plik

@ -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;

Wyświetl plik

@ -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

Wyświetl plik

@ -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");

Wyświetl plik

@ -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());

Wyświetl plik

@ -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);

Wyświetl plik

@ -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");

Wyświetl plik

@ -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());

Wyświetl plik

@ -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");

Wyświetl plik

@ -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");

Wyświetl plik

@ -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
// ----------------------------------------------------------------------------