Add some optional header includes, to make per-target changes to config easier (#851)

This commit is contained in:
Graham Sanderson 2022-06-08 12:59:45 -05:00 committed by GitHub
parent d3dcbb8292
commit 6389927cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -16,9 +16,18 @@
* This header may be included by assembly code * This header may be included by assembly code
*/ */
#define __PICO_STRING(x) #x
#define __PICO_XSTRING(x) __PICO_STRING(x)
#include "pico/types.h" #include "pico/types.h"
#include "pico/version.h" #include "pico/version.h"
// PICO_CONFIG: PICO_CONFIG_HEADER, unquoted path to header include in place of the default pico/config.h which may be desirable for build systems which can't easily generate the config_autogen header, default=none, group=pico_base
#ifdef PICO_CONFIG_HEADER
#include __PICO_XSTRING(PICO_CONFIG_HEADER)
#else
#include "pico/config.h" #include "pico/config.h"
#endif
#include "pico/platform.h" #include "pico/platform.h"
#include "pico/error.h" #include "pico/error.h"

View File

@ -18,4 +18,9 @@
#include "pico/config_autogen.h" #include "pico/config_autogen.h"
// PICO_CONFIG: PICO_CONFIG_RTOS_ADAPTER_HEADER, unquoted path to header include in the default pico/config.h for RTOS integration defines that must be included in all sources, default=none, group=pico_base
#ifdef PICO_CONFIG_RTOS_ADAPTER_HEADER
#include __PICO_XSTRING(PICO_CONFIG_RTOS_ADAPTER_HEADER)
#endif
#endif #endif