From e0872a32cceaa2f3aac5f9dcc180e62f5f3ab103 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Thu, 27 May 2021 09:55:38 -0700 Subject: [PATCH] Add missing board detection macros (#448) * add board detection macros for Sparkfun & RPi Pico / VGA Board --- src/boards/include/boards/pico.h | 3 +++ src/boards/include/boards/sparkfun_micromod.h | 3 +++ src/boards/include/boards/sparkfun_promicro.h | 3 +++ src/boards/include/boards/sparkfun_thingplus.h | 5 ++++- src/boards/include/boards/vgaboard.h | 3 +++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/boards/include/boards/pico.h b/src/boards/include/boards/pico.h index d681dc4..313d085 100644 --- a/src/boards/include/boards/pico.h +++ b/src/boards/include/boards/pico.h @@ -14,6 +14,9 @@ #ifndef _BOARDS_PICO_H #define _BOARDS_PICO_H +// For board detection +#define RASPBERRYPI_PICO + // --- UART --- #ifndef PICO_DEFAULT_UART #define PICO_DEFAULT_UART 0 diff --git a/src/boards/include/boards/sparkfun_micromod.h b/src/boards/include/boards/sparkfun_micromod.h index cc8154f..e6ef44f 100644 --- a/src/boards/include/boards/sparkfun_micromod.h +++ b/src/boards/include/boards/sparkfun_micromod.h @@ -17,6 +17,9 @@ #ifndef _BOARDS_SPARKFUN_MICROMOD_H #define _BOARDS_SPARKFUN_MICROMOD_H +// For board detection +#define SPARKFUN_MICROMOD + #ifndef PICO_DEFAULT_UART #define PICO_DEFAULT_UART 0 #endif diff --git a/src/boards/include/boards/sparkfun_promicro.h b/src/boards/include/boards/sparkfun_promicro.h index 5450f51..82e96cf 100644 --- a/src/boards/include/boards/sparkfun_promicro.h +++ b/src/boards/include/boards/sparkfun_promicro.h @@ -17,6 +17,9 @@ #ifndef _BOARDS_SPARKFUN_PROMICRO_H #define _BOARDS_SPARKFUN_PROMICRO_H +// For board detection +#define SPARKFUN_PROMICRO + #ifndef PICO_DEFAULT_UART #define PICO_DEFAULT_UART 0 #endif diff --git a/src/boards/include/boards/sparkfun_thingplus.h b/src/boards/include/boards/sparkfun_thingplus.h index 38f5e55..b2e4932 100644 --- a/src/boards/include/boards/sparkfun_thingplus.h +++ b/src/boards/include/boards/sparkfun_thingplus.h @@ -17,6 +17,9 @@ #ifndef _BOARDS_SPARKFUN_THINGPLUS_H #define _BOARDS_SPARKFUN_THINGPLUS_H +// For board detection +#define SPARKFUN_THINGPLUS + #ifndef PICO_DEFAULT_UART #define PICO_DEFAULT_UART 0 #endif @@ -69,7 +72,7 @@ #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// The thing plus has a SD Card. +// The thing plus has a SD Card. #define PICO_SD_CLK_PIN 14 #define PICO_SD_CMD_PIN 15 #define PICO_SD_DAT0_PIN 12 diff --git a/src/boards/include/boards/vgaboard.h b/src/boards/include/boards/vgaboard.h index d9cb7ac..f0b6f0e 100644 --- a/src/boards/include/boards/vgaboard.h +++ b/src/boards/include/boards/vgaboard.h @@ -12,6 +12,9 @@ #ifndef _BOARDS_VGABOARD_H #define _BOARDS_VGABOARD_H +// For board detection +#define RASPBERRYPI_VGABOARD + // Audio pins. I2S BCK, LRCK are on the same pins as PWM L/R. // - When outputting I2S, PWM sees BCK and LRCK, which should sound silent as // they are constant duty cycle, and above the filter cutoff