[nrf528xx] adapt generic sdk_config.h file from nRF5 SDK (#4511)

This commit is contained in:
Duda, Lukasz
2020-01-12 23:03:00 +01:00
committed by Jonathan Hui
parent 27128db8ee
commit b6c534ecf0
17 changed files with 33981 additions and 1013 deletions
@@ -44,6 +44,7 @@ override CXXFLAGS := $(filter-out -Wundef,$(C
COMMONCPPFLAGS = \
-DCONFIG_GPIO_AS_PINRESET \
-DNRF52811_XXAA \
-DUSE_APP_CONFIG=1 \
-I$(srcdir) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/examples/platforms \
@@ -58,6 +59,7 @@ COMMONCPPFLAGS
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch/raal \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/platform/lp_timer \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/platform/temperature \
-Wno-unused-parameter \
$(NULL)
# Only reference the SDK header files included in third_party/NordicSemiconductor
@@ -71,7 +73,10 @@ COMMONCPPFLAGS
# built using the sources in third_party/NordicSemiconductor/drivers/radio.
if OPENTHREAD_ENABLE_EXAMPLES
COMMONCPPFLAGS += \
-I$(top_srcdir)/third_party/NordicSemiconductor \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
-I$(top_srcdir)/third_party/NordicSemiconductor/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52811/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/dependencies \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/clock \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/common \
@@ -89,6 +94,7 @@ COMMONCPPFLAGS
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/drivers/include \
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/mdk \
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/soc \
-Wno-unused-parameter \
$(NULL)
endif
@@ -36,8 +36,8 @@
#define PLATFORM_CONFIG_H_
#include "nrf.h"
#include "nrf_peripherals.h"
#include "nrf_drv_clock.h"
#include "nrf_peripherals.h"
#include "hal/nrf_radio.h"
#include "hal/nrf_uart.h"
@@ -45,6 +45,7 @@ override CXXFLAGS := $(filter-out -Wundef,$(C
COMMONCPPFLAGS = \
-DCONFIG_GPIO_AS_PINRESET \
-DNRF52833_XXAA \
-DUSE_APP_CONFIG=1 \
-I$(srcdir) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/examples/platforms \
@@ -57,8 +58,10 @@ COMMONCPPFLAGS
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/mac_features/ack_generator \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch/raal \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch/raal/softdevice \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/platform/lp_timer \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/platform/temperature \
-Wno-unused-parameter \
$(NULL)
# Only reference the SDK header files included in third_party/NordicSemiconductor
@@ -72,7 +75,10 @@ COMMONCPPFLAGS
# built using the sources in third_party/NordicSemiconductor/drivers/radio.
if OPENTHREAD_ENABLE_EXAMPLES
COMMONCPPFLAGS += \
-I$(top_srcdir)/third_party/NordicSemiconductor \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
-I$(top_srcdir)/third_party/NordicSemiconductor/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52833/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/dependencies \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/clock \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/common \
@@ -97,6 +103,7 @@ COMMONCPPFLAGS
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/soc \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers/nrf52 \
-Wno-unused-parameter \
$(NULL)
endif
@@ -126,8 +133,6 @@ SOFTDEVICE_SOURCES
$(NULL)
SOFTDEVICE_CPPFLAGS = \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch/raal/softdevice \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers \
-DSOFTDEVICE_PRESENT \
-DS140 \
$(NULL)
@@ -36,8 +36,8 @@
#define PLATFORM_CONFIG_H_
#include "nrf.h"
#include "nrf_peripherals.h"
#include "nrf_drv_clock.h"
#include "nrf_peripherals.h"
#include "hal/nrf_radio.h"
#include "hal/nrf_uart.h"
@@ -45,6 +45,7 @@ override CXXFLAGS := $(filter-out -Wundef,$(C
COMMONCPPFLAGS = \
-DCONFIG_GPIO_AS_PINRESET \
-DNRF52840_XXAA \
-DUSE_APP_CONFIG=1 \
-I$(srcdir) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/examples/platforms \
@@ -57,8 +58,10 @@ COMMONCPPFLAGS
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/mac_features/ack_generator \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch/raal \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch/raal/softdevice \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/platform/lp_timer \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/platform/temperature \
-Wno-unused-parameter \
$(NULL)
# Only reference the SDK header files included in third_party/NordicSemiconductor
@@ -72,7 +75,10 @@ COMMONCPPFLAGS
# built using the sources in third_party/NordicSemiconductor/drivers/radio.
if OPENTHREAD_ENABLE_EXAMPLES
COMMONCPPFLAGS += \
-I$(top_srcdir)/third_party/NordicSemiconductor \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
-I$(top_srcdir)/third_party/NordicSemiconductor/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52840/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/dependencies \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/clock \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/common \
@@ -97,6 +103,7 @@ COMMONCPPFLAGS
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/soc \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers/nrf52 \
-Wno-unused-parameter \
$(NULL)
endif
@@ -127,8 +134,6 @@ SOFTDEVICE_SOURCES
$(NULL)
SOFTDEVICE_CPPFLAGS = \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/radio/rsch/raal/softdevice \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers \
-DSOFTDEVICE_PRESENT \
-DS140 \
$(NULL)
@@ -36,8 +36,8 @@
#define PLATFORM_CONFIG_H_
#include "nrf.h"
#include "nrf_peripherals.h"
#include "nrf_drv_clock.h"
#include "nrf_peripherals.h"
#include "hal/nrf_radio.h"
#include "hal/nrf_uart.h"
+2 -3
View File
@@ -49,11 +49,10 @@
#include "platform-config.h"
#include "platform-nrf5.h"
#include "core_cmFunc.h"
#include <nrf_drv_clock.h>
#include <nrf_802154_utils.h>
#include <nrf_802154_lp_timer.h>
#include <nrf_802154_utils.h>
#include <nrf_drv_clock.h>
#include <hal/nrf_rtc.h>
+1 -1
View File
@@ -40,8 +40,8 @@
#include "openthread-system.h"
#include "platform-fem.h"
#include "platform-nrf5.h"
#include <nrf_drv_clock.h>
#include <nrf.h>
#include <nrf_drv_clock.h>
#include <openthread/config.h>
+1 -1
View File
@@ -45,9 +45,9 @@
#include "openthread-system.h"
#include "platform-nrf5.h"
#include <nrf_drv_clock.h>
#include <hal/nrf_gpio.h>
#include <hal/nrf_uart.h>
#include <nrf_drv_clock.h>
#if (UART_AS_SERIAL_TRANSPORT == 1)
@@ -53,12 +53,12 @@
#include "platform-nrf5.h"
#include "nrf_drv_clock.h"
#include "nrf_drv_power.h"
#include "app_usbd.h"
#include "app_usbd_serial_num.h"
#include "class/cdc/acm/app_usbd_cdc_acm.h"
#include "nrf_dfu_trigger_usb.h"
#include "nrf_drv_clock.h"
#include "nrf_drv_power.h"
#include "class/cdc/acm/app_usbd_cdc_acm.h"
#if (USB_CDC_AS_SERIAL_TRANSPORT == 1)
+71 -57
View File
@@ -38,12 +38,7 @@ lib_LIBRARIES
libnordicsemi-nrf52811-radio-driver.a \
$(NULL)
endif
if OPENTHREAD_PLATFORM_NRF52840
lib_LIBRARIES += \
libnordicsemi-nrf52840-radio-driver.a \
libnordicsemi-nrf52840-radio-driver-softdevice.a \
$(NULL)
endif
if OPENTHREAD_PLATFORM_NRF52833
lib_LIBRARIES += \
libnordicsemi-nrf52833-radio-driver.a \
@@ -51,23 +46,32 @@ lib_LIBRARIES
$(NULL)
endif
if OPENTHREAD_PLATFORM_NRF52840
lib_LIBRARIES += \
libnordicsemi-nrf52840-radio-driver.a \
libnordicsemi-nrf52840-radio-driver-softdevice.a \
$(NULL)
endif
# Only build the SDK library when building the example applications.
if OPENTHREAD_EXAMPLES_NRF52811
lib_LIBRARIES += \
libnordicsemi-nrf52811-sdk.a \
$(NULL)
endif
if OPENTHREAD_EXAMPLES_NRF52840
lib_LIBRARIES += \
libnordicsemi-nrf52840-sdk.a \
$(NULL)
endif
if OPENTHREAD_EXAMPLES_NRF52833
lib_LIBRARIES += \
libnordicsemi-nrf52833-sdk.a \
$(NULL)
endif
if OPENTHREAD_EXAMPLES_NRF52840
lib_LIBRARIES += \
libnordicsemi-nrf52840-sdk.a \
$(NULL)
endif
# Do not enable -pedantic-errors for Nordic Semiconductor driver library
override CFLAGS := $(filter-out -pedantic-errors,$(CFLAGS))
override CXXFLAGS := $(filter-out -pedantic-errors,$(CXXFLAGS))
@@ -79,6 +83,7 @@ override CXXFLAGS := $(filter-out -Wundef,$(CXXFLAGS))
COMMONCPPFLAGS = \
-DCONFIG_GPIO_AS_PINRESET \
-DENABLE_FEM=1 \
-DUSE_APP_CONFIG=1 \
-I$(srcdir) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/core \
@@ -104,7 +109,9 @@ COMMONCPPFLAGS
# using the sources in third_party/NordicSemiconductor/drivers/radio.
if OPENTHREAD_ENABLE_EXAMPLES
COMMONCPPFLAGS += \
-I$(top_srcdir)/third_party/NordicSemiconductor \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
-I$(top_srcdir)/third_party/NordicSemiconductor/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/dependencies \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/clock \
-I$(top_srcdir)/third_party/NordicSemiconductor/drivers/common \
@@ -129,19 +136,7 @@ COMMONCPPFLAGS
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/soc \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers \
-I$(top_srcdir)/third_party/NordicSemiconductor/softdevice/s140/headers/nrf52 \
$(NULL)
endif
NRF52833_CPPFLAGS = \
-DNRF52833_XXAA \
-DNRF_802154_PROJECT_CONFIG=\"platform-config.h\" \
-I$(top_srcdir)/examples/platforms/nrf52833 \
$(NULL)
NRF52840_CPPFLAGS = \
-DNRF52840_XXAA \
-DNRF_802154_PROJECT_CONFIG=\"platform-config.h\" \
-I$(top_srcdir)/examples/platforms/nrf528xx/nrf52840/ \
-Wno-unused-parameter \
$(NULL)
NRF52811_CPPFLAGS = \
@@ -150,6 +145,22 @@ NRF52811_CPPFLAGS
-D__HEAP_SIZE=0 \
-D__STACK_SIZE=2048 \
-I$(top_srcdir)/examples/platforms/nrf528xx/nrf52811 \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52811/config \
$(NULL)
endif
NRF52833_CPPFLAGS = \
-DNRF52833_XXAA \
-DNRF_802154_PROJECT_CONFIG=\"platform-config.h\" \
-I$(top_srcdir)/examples/platforms/nrf52833 \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52833/config \
$(NULL)
NRF52840_CPPFLAGS = \
-DNRF52840_XXAA \
-DNRF_802154_PROJECT_CONFIG=\"platform-config.h\" \
-I$(top_srcdir)/examples/platforms/nrf528xx/nrf52840/ \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52840/config \
$(NULL)
NORDICSEMI_COMMON_SOURCES = \
@@ -180,6 +191,11 @@ NORDICSEMI_USB_SOURCES
libraries/usb/class/cdc/acm/app_usbd_cdc_acm.c \
$(NULL)
NORDICSEMI_NRF52811_SOURCES = \
nrfx/mdk/gcc_startup_nrf52811.S \
nrfx/mdk/system_nrf52811.c \
$(NULL)
NORDICSEMI_NRF52833_SOURCES = \
nrfx/mdk/gcc_startup_nrf52833.S \
nrfx/mdk/system_nrf52833.c \
@@ -190,11 +206,6 @@ NORDICSEMI_NRF52840_SOURCES
nrfx/mdk/system_nrf52840.c \
$(NULL)
NORDICSEMI_NRF52811_SOURCES = \
nrfx/mdk/gcc_startup_nrf52811.S \
nrfx/mdk/system_nrf52811.c \
$(NULL)
RADIO_DRIVER_SOURCES = \
drivers/radio/fal/nrf_802154_fal.c \
drivers/radio/mac_features/ack_generator/nrf_802154_ack_data.c \
@@ -253,40 +264,27 @@ SOFTDEVICE_CPPFLAGS
-DRAAL_SOFTDEVICE=1 \
$(NULL)
libnordicsemi_nrf52840_sdk_a_CPPFLAGS = \
libnordicsemi_nrf52811_sdk_a_CPPFLAGS = \
$(COMMONCPPFLAGS) \
$(NRF52840_CPPFLAGS) \
$(NRF52811_CPPFLAGS) \
$(NULL)
libnordicsemi_nrf52840_sdk_a_SOURCES = \
libnordicsemi_nrf52811_sdk_a_SOURCES = \
$(NORDICSEMI_COMMON_SOURCES) \
$(NORDICSEMI_USB_SOURCES) \
$(NORDICSEMI_NRF52840_SOURCES) \
$(NORDICSEMI_NRF52811_SOURCES) \
$(NULL)
libnordicsemi_nrf52840_radio_driver_a_CPPFLAGS = \
libnordicsemi_nrf52811_radio_driver_a_CPPFLAGS = \
$(COMMONCPPFLAGS) \
$(NRF52840_CPPFLAGS) \
$(NRF52811_CPPFLAGS) \
$(RADIO_DRIVER_SINGLE_PHY_CPPFLAGS) \
$(NULL)
libnordicsemi_nrf52840_radio_driver_a_SOURCES = \
libnordicsemi_nrf52811_radio_driver_a_SOURCES = \
$(RADIO_DRIVER_SOURCES) \
$(RADIO_DRIVER_SINGLE_PHY_SOURCES) \
$(NULL)
libnordicsemi_nrf52840_radio_driver_softdevice_a_CPPFLAGS = \
$(COMMONCPPFLAGS) \
$(NRF52840_CPPFLAGS) \
$(SOFTDEVICE_CPPFLAGS) \
$(RADIO_DRIVER_SOFTDEVICE_CPPFLAGS) \
$(NULL)
libnordicsemi_nrf52840_radio_driver_softdevice_a_SOURCES = \
$(RADIO_DRIVER_SOURCES) \
$(RADIO_DRIVER_SOFTDEVICE_SOURCES) \
$(NULL)
libnordicsemi_nrf52833_sdk_a_CPPFLAGS = \
$(COMMONCPPFLAGS) \
$(NRF52833_CPPFLAGS) \
@@ -321,27 +319,40 @@ libnordicsemi_nrf52833_radio_driver_softdevice_a_SOURCES
$(RADIO_DRIVER_SOFTDEVICE_SOURCES) \
$(NULL)
libnordicsemi_nrf52811_sdk_a_CPPFLAGS = \
libnordicsemi_nrf52840_sdk_a_CPPFLAGS = \
$(COMMONCPPFLAGS) \
$(NRF52811_CPPFLAGS) \
$(NRF52840_CPPFLAGS) \
$(NULL)
libnordicsemi_nrf52811_sdk_a_SOURCES = \
libnordicsemi_nrf52840_sdk_a_SOURCES = \
$(NORDICSEMI_COMMON_SOURCES) \
$(NORDICSEMI_NRF52811_SOURCES) \
$(NORDICSEMI_USB_SOURCES) \
$(NORDICSEMI_NRF52840_SOURCES) \
$(NULL)
libnordicsemi_nrf52811_radio_driver_a_CPPFLAGS = \
libnordicsemi_nrf52840_radio_driver_a_CPPFLAGS = \
$(COMMONCPPFLAGS) \
$(NRF52811_CPPFLAGS) \
$(NRF52840_CPPFLAGS) \
$(RADIO_DRIVER_SINGLE_PHY_CPPFLAGS) \
$(NULL)
libnordicsemi_nrf52811_radio_driver_a_SOURCES = \
libnordicsemi_nrf52840_radio_driver_a_SOURCES = \
$(RADIO_DRIVER_SOURCES) \
$(RADIO_DRIVER_SINGLE_PHY_SOURCES) \
$(NULL)
libnordicsemi_nrf52840_radio_driver_softdevice_a_CPPFLAGS = \
$(COMMONCPPFLAGS) \
$(NRF52840_CPPFLAGS) \
$(SOFTDEVICE_CPPFLAGS) \
$(RADIO_DRIVER_SOFTDEVICE_CPPFLAGS) \
$(NULL)
libnordicsemi_nrf52840_radio_driver_softdevice_a_SOURCES = \
$(RADIO_DRIVER_SOURCES) \
$(RADIO_DRIVER_SOFTDEVICE_SOURCES) \
$(NULL)
noinst_HEADERS = \
$(top_srcdir)/third_party/NordicSemiconductor/cmsis/arm_math.h \
$(top_srcdir)/third_party/NordicSemiconductor/cmsis/cmsis_armcc_V6.h \
@@ -351,6 +362,10 @@ noinst_HEADERS
$(top_srcdir)/third_party/NordicSemiconductor/cmsis/core_cmFunc.h \
$(top_srcdir)/third_party/NordicSemiconductor/cmsis/core_cmInstr.h \
$(top_srcdir)/third_party/NordicSemiconductor/cmsis/core_cmSimd.h \
$(top_srcdir)/third_party/NordicSemiconductor/config/app_config.h \
$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52811/config/sdk_config.h \
$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52833/config/sdk_config.h \
$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52840/config/sdk_config.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/app_util_platform.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/app_util.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/legacy/apply_old_config.h \
@@ -368,7 +383,6 @@ noinst_HEADERS
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/nrfx_glue.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/nrfx_log.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/sdk_common.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/sdk_config.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/sdk_errors.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/sdk_macros.h \
$(top_srcdir)/third_party/NordicSemiconductor/dependencies/sdk_os.h \
+254
View File
@@ -0,0 +1,254 @@
/**
* Copyright (c) 2017 - 2019, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* Nordic Semiconductor ASA integrated circuit.
*
* 5. Any software provided in binary form under this license must not be reverse
* engineered, decompiled, modified and/or disassembled.
*
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
* @brief This file provides OpenThread configuration of nRF5 SDK modules.
*
* Below configuration overwrites the default sdk_config.h file for certain platform.
*
* Default configuration for the vanilla OpenThread can be overwritten by the custom configuration.
* To do that, provide the configuration through the APP_CONFIG_CUSTOM_FILE define.
*
*/
#ifndef APP_CONFIG_H
#define APP_CONFIG_H
#if (USB_CDC_AS_SERIAL_TRANSPORT == 1)
#ifndef APP_USBD_ENABLED
#define APP_USBD_ENABLED 1
#endif
#ifndef APP_USBD_VID
#define APP_USBD_VID 0x1915
#endif
#ifndef APP_USBD_PID
#define APP_USBD_PID 0xCAFE
#endif
#ifndef APP_USBD_DEVICE_VER_MAJOR
#define APP_USBD_DEVICE_VER_MAJOR 1
#endif
#ifndef APP_USBD_DEVICE_VER_MINOR
#define APP_USBD_DEVICE_VER_MINOR 0
#endif
#ifndef APP_USBD_DEVICE_VER_SUB
#define APP_USBD_DEVICE_VER_SUB 0
#endif
#ifndef APP_USBD_CONFIG_MAX_POWER
#define APP_USBD_CONFIG_MAX_POWER 500
#endif
#ifndef APP_USBD_STRING_ID_PRODUCT
#define APP_USBD_STRING_ID_PRODUCT 2
#endif
#ifndef APP_USBD_STRINGS_PRODUCT_EXTERN
#define APP_USBD_STRINGS_PRODUCT_EXTERN 0
#endif
#ifndef APP_USBD_STRINGS_PRODUCT
#define APP_USBD_STRINGS_PRODUCT APP_USBD_STRING_DESC("nRF528xx OpenThread Device")
#endif
#ifndef APP_USBD_STRING_ID_SERIAL
#define APP_USBD_STRING_ID_SERIAL 3
#endif
#ifndef APP_USBD_STRING_SERIAL_EXTERN
#define APP_USBD_STRING_SERIAL_EXTERN 1
#endif
#ifndef APP_USBD_STRING_SERIAL
#define APP_USBD_STRING_SERIAL g_extern_serial_number
#endif
#ifndef APP_USBD_CONFIG_LOG_ENABLED
#define APP_USBD_CONFIG_LOG_ENABLED 0
#endif
#ifndef USBD_ENABLED
#define USBD_ENABLED 1
#endif
#ifndef NRFX_USBD_ENABLED
#define NRFX_USBD_ENABLED 1
#endif
#ifndef NRFX_USBD_CONFIG_IRQ_PRIORITY
#define NRFX_USBD_CONFIG_IRQ_PRIORITY 7
#endif
#ifndef NRFX_SYSTICK_ENABLED
#define NRFX_SYSTICK_ENABLED 1
#endif
#ifndef APP_USBD_CDC_ACM_ENABLED
#define APP_USBD_CDC_ACM_ENABLED 1
#endif
#endif // USB_CDC_AS_SERIAL_TRANSPORT == 1
#ifndef APP_USBD_NRF_DFU_TRIGGER_ENABLED
#define APP_USBD_NRF_DFU_TRIGGER_ENABLED 0
#endif
#ifndef BSP_SELF_PINRESET_PIN
#define BSP_SELF_PINRESET_PIN NRF_GPIO_PIN_MAP(0, 19)
#endif
#ifndef NRF_DFU_TRIGGER_USB_USB_SHARED
#define NRF_DFU_TRIGGER_USB_USB_SHARED 1
#endif
#ifndef NRF_DFU_TRIGGER_USB_INTERFACE_NUM
#define NRF_DFU_TRIGGER_USB_INTERFACE_NUM 0
#endif
#ifndef APP_NAME
#define APP_NAME "OpenThread App"
#endif
#ifndef APP_VERSION_MAJOR
#define APP_VERSION_MAJOR 1
#endif
#ifndef APP_VERSION_MINOR
#define APP_VERSION_MINOR 0
#endif
#ifndef APP_VERSION_PATCH
#define APP_VERSION_PATCH 0
#endif
#ifndef APP_ID
#define APP_ID 1
#endif
#ifndef APP_VERSION_PRERELEASE
#define APP_VERSION_PRERELEASE ""
#endif
#ifndef APP_VERSION_METADATA
#define APP_VERSION_METADATA ""
#endif
#ifndef SEGGER_RTT_CONFIG_BUFFER_SIZE_UP
#define SEGGER_RTT_CONFIG_BUFFER_SIZE_UP 512
#endif
#ifndef SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS
#define SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS 2
#endif
#ifndef SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN
#define SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN 16
#endif
#ifndef SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS
#define SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS 2
#endif
#ifndef SEGGER_RTT_CONFIG_DEFAULT_MODE
#define SEGGER_RTT_CONFIG_DEFAULT_MODE 0
#endif
#ifndef NRF_CLOCK_ENABLED
#define NRF_CLOCK_ENABLED 1
#endif
#ifndef CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 1
#endif
#ifndef CLOCK_CONFIG_IRQ_PRIORITY
#define CLOCK_CONFIG_IRQ_PRIORITY 7
#endif
#if (USB_CDC_AS_SERIAL_TRANSPORT == 1)
#ifndef POWER_ENABLED
#define POWER_ENABLED 1
#endif
#endif // USB_CDC_AS_SERIAL_TRANSPORT == 1
#ifndef POWER_CONFIG_IRQ_PRIORITY
#define POWER_CONFIG_IRQ_PRIORITY 7
#endif
#if (SPIS_AS_SERIAL_TRANSPORT == 1)
#ifndef SPIS_ENABLED
#define SPIS_ENABLED 1
#endif
#ifndef SPIS_DEFAULT_CONFIG_IRQ_PRIORITY
#define SPIS_DEFAULT_CONFIG_IRQ_PRIORITY 7
#endif
#ifndef SPIS0_ENABLED
#define SPIS0_ENABLED 1
#endif
#endif // SPIS_AS_SERIAL_TRANSPORT == 1
#ifndef TIMER_ENABLED
#define TIMER_ENABLED 1
#endif
#ifndef TIMER0_ENABLED
#define TIMER0_ENABLED 1
#endif
#ifndef TIMER1_ENABLED
#define TIMER1_ENABLED 1
#endif
#ifndef TIMER_DEFAULT_CONFIG_IRQ_PRIORITY
#define TIMER_DEFAULT_CONFIG_IRQ_PRIORITY 7
#endif
#endif // APP_CONFIG_H
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,935 +0,0 @@
#ifndef SDK_CONFIG_H
#define SDK_CONFIG_H
#include <openthread/config.h>
#undef PACKAGE
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wpedantic"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
//==========================================================
// <e> APP_USBD_ENABLED - app_usbd - USB Device library
//==========================================================
#if (USB_CDC_AS_SERIAL_TRANSPORT == 1)
#ifndef APP_USBD_ENABLED
#define APP_USBD_ENABLED 1
#endif
#else // USB_CDC_AS_SERIAL_TRANSPORT == 1
#ifndef APP_USBD_ENABLED
#define APP_USBD_ENABLED 0
#endif
#endif // USB_CDC_AS_SERIAL_TRANSPORT == 1
// <s> APP_USBD_VID - Vendor ID
// <i> Vendor ID ordered from USB IF: http://www.usb.org/developers/vendor/
#ifndef APP_USBD_VID
#define APP_USBD_VID 0x1915
#endif
// <s> APP_USBD_PID - Product ID
// <i> Selected Product ID
#ifndef APP_USBD_PID
#define APP_USBD_PID 0xCAFE
#endif
// <o> APP_USBD_DEVICE_VER_MAJOR - Major device version <0-99>
// <i> Major device version, will be converted automatically to BCD notation. Use just decimal values.
#ifndef APP_USBD_DEVICE_VER_MAJOR
#define APP_USBD_DEVICE_VER_MAJOR 1
#endif
// <o> APP_USBD_DEVICE_VER_MINOR - Minor device version <0-9>
// <i> Minor device version, will be converted automatically to BCD notation. Use just decimal values.
#ifndef APP_USBD_DEVICE_VER_MINOR
#define APP_USBD_DEVICE_VER_MINOR 0
#endif
// <o> APP_USBD_DEVICE_VER_SUB - Sub-minor device version <0-9>
// <i> Sub-minor device version, will be converted automatically to BCD notation. Use just decimal values.
#ifndef APP_USBD_DEVICE_VER_SUB
#define APP_USBD_DEVICE_VER_SUB 0
#endif
// <q> APP_USBD_CONFIG_SELF_POWERED - Self powered
#ifndef APP_USBD_CONFIG_SELF_POWERED
#define APP_USBD_CONFIG_SELF_POWERED 1
#endif
// <o> APP_USBD_CONFIG_MAX_POWER - MaxPower field in configuration descriptor in milliamps. <0-500>
#ifndef APP_USBD_CONFIG_MAX_POWER
#define APP_USBD_CONFIG_MAX_POWER 500
#endif
// <q> APP_USBD_CONFIG_POWER_EVENTS_PROCESS - Process power events
// <i> Enable processing power events in USB event handler.
#ifndef APP_USBD_CONFIG_POWER_EVENTS_PROCESS
#define APP_USBD_CONFIG_POWER_EVENTS_PROCESS 1
#endif
// <e> APP_USBD_CONFIG_EVENT_QUEUE_ENABLE - Enable event queue
// <i> This is the default configuration when all the events are placed into internal queue.
// <i> Disable it when external queue is used like app_scheduler or if you wish to process all events inside interrupts.
// <i> Processing all events from the interrupt level adds requirement not to call any functions that modifies the USBD library state from the context higher than USB interrupt context.
// <i> Functions that modify USBD state are functions for sleep, wakeup, start, stop, enable and disable.
//==========================================================
#ifndef APP_USBD_CONFIG_EVENT_QUEUE_ENABLE
#define APP_USBD_CONFIG_EVENT_QUEUE_ENABLE 1
#endif
// <o> APP_USBD_CONFIG_EVENT_QUEUE_SIZE - The size of event queue <16-64>
// <i> The size of the queue for the events that would be processed in the main loop.
#ifndef APP_USBD_CONFIG_EVENT_QUEUE_SIZE
#define APP_USBD_CONFIG_EVENT_QUEUE_SIZE 32
#endif
// <o> APP_USBD_CONFIG_SOF_HANDLING_MODE - Change SOF events handling mode.
// <i> Normal queue - SOF events are pushed normally into event queue.
// <i> Compress queue - SOF events are counted and binded with other events or executed when queue is empty.
// <i> This prevents queue from filling with SOF events.
// <i> Interrupt - SOF events are processed in interrupt.
// <0=> Normal queue
// <1=> Compress queue
// <2=> Interrupt
#ifndef APP_USBD_CONFIG_SOF_HANDLING_MODE
#define APP_USBD_CONFIG_SOF_HANDLING_MODE 1
#endif
// </e>
// <q> APP_USBD_CONFIG_SOF_TIMESTAMP_PROVIDE - Provide a function that generates timestamps for logs based on the current SOF
// <i> The function app_usbd_sof_timestamp_get will be implemented if the logger is enabled.
// <i> Use it when initializing the logger.
// <i> SOF processing will be always enabled when this configuration parameter is active.
// <i> Notice that this option is configured outside of APP_USBD_CONFIG_LOG_ENABLED.
// <i> This means that it will work even if the logging in this very module is disabled.
#ifndef APP_USBD_CONFIG_SOF_TIMESTAMP_PROVIDE
#define APP_USBD_CONFIG_SOF_TIMESTAMP_PROVIDE 0
#endif
// <o> APP_USBD_CONFIG_DESC_STRING_SIZE - Maximum size of the NULL-terminated string of the string descriptor. <31-254>
// <i> 31 characters can be stored in the internal USB buffer used for transfers.
// <i> Any value higher than 31 creates an additional buffer just for descriptor strings.
#ifndef APP_USBD_CONFIG_DESC_STRING_SIZE
#define APP_USBD_CONFIG_DESC_STRING_SIZE 31
#endif
// <q> APP_USBD_CONFIG_DESC_STRING_UTF_ENABLED - Enable UTF8 conversion.
// <i> Enable UTF8-encoded characters. In normal processing, only ASCII characters are available.
#ifndef APP_USBD_CONFIG_DESC_STRING_UTF_ENABLED
#define APP_USBD_CONFIG_DESC_STRING_UTF_ENABLED 0
#endif
// <s> APP_USBD_STRINGS_LANGIDS - Supported languages identifiers.
// <i> Note: This value is not editable in Configuration Wizard.
// <i> Comma-separated list of supported languages.
#ifndef APP_USBD_STRINGS_LANGIDS
#define APP_USBD_STRINGS_LANGIDS APP_USBD_LANG_AND_SUBLANG(APP_USBD_LANG_ENGLISH, APP_USBD_SUBLANG_ENGLISH_US)
#endif
// <e> APP_USBD_STRING_ID_MANUFACTURER - Define manufacturer string ID.
// <i> Setting ID to 0 disables the string.
//==========================================================
#ifndef APP_USBD_STRING_ID_MANUFACTURER
#define APP_USBD_STRING_ID_MANUFACTURER 1
#endif
// <q> APP_USBD_STRINGS_MANUFACTURER_EXTERN - Define whether @ref APP_USBD_STRINGS_MANUFACTURER is created by macro or declared as a global variable.
#ifndef APP_USBD_STRINGS_MANUFACTURER_EXTERN
#define APP_USBD_STRINGS_MANUFACTURER_EXTERN 0
#endif
// <s> APP_USBD_STRINGS_MANUFACTURER - String descriptor for the manufacturer name.
// <i> Note: This value is not editable in Configuration Wizard.
// <i> Comma-separated list of manufacturer names for each defined language.
// <i> Use @ref APP_USBD_STRING_DESC macro to create string descriptor from a NULL-terminated string.
// <i> Use @ref APP_USBD_STRING_RAW8_DESC macro to create string descriptor from comma-separated uint8_t values.
// <i> Use @ref APP_USBD_STRING_RAW16_DESC macro to create string descriptor from comma-separated uint16_t values.
// <i> Alternatively, configure the macro to point to any internal variable pointer that already contains the descriptor.
// <i> Setting string to NULL disables that string.
// <i> The order of manufacturer names must be the same like in @ref APP_USBD_STRINGS_LANGIDS.
#ifndef APP_USBD_STRINGS_MANUFACTURER
#define APP_USBD_STRINGS_MANUFACTURER APP_USBD_STRING_DESC("Nordic Semiconductor")
#endif
// </e>
// <e> APP_USBD_STRING_ID_PRODUCT - Define product string ID.
// <i> Setting ID to 0 disables the string.
//==========================================================
#ifndef APP_USBD_STRING_ID_PRODUCT
#define APP_USBD_STRING_ID_PRODUCT 2
#endif
// <q> APP_USBD_STRINGS_PRODUCT_EXTERN - Define whether @ref APP_USBD_STRINGS_PRODUCT is created by macro or declared as a global variable.
#ifndef APP_USBD_STRINGS_PRODUCT_EXTERN
#define APP_USBD_STRINGS_PRODUCT_EXTERN 0
#endif
// <s> APP_USBD_STRINGS_PRODUCT - String descriptor for the product name.
// <i> Note: This value is not editable in Configuration Wizard.
// <i> List of product names that is defined the same way like in @ref APP_USBD_STRINGS_MANUFACTURER.
#ifndef APP_USBD_STRINGS_PRODUCT
#define APP_USBD_STRINGS_PRODUCT APP_USBD_STRING_DESC("nRF52840 OpenThread Device")
#endif
// </e>
// <e> APP_USBD_STRING_ID_SERIAL - Define serial number string ID.
// <i> Setting ID to 0 disables the string.
//==========================================================
#ifndef APP_USBD_STRING_ID_SERIAL
#define APP_USBD_STRING_ID_SERIAL 3
#endif
// <q> APP_USBD_STRING_SERIAL_EXTERN - Define whether @ref APP_USBD_STRING_SERIAL is created by macro or declared as a global variable.
#ifndef APP_USBD_STRING_SERIAL_EXTERN
#define APP_USBD_STRING_SERIAL_EXTERN 1
#endif
// <s> APP_USBD_STRING_SERIAL - String descriptor for the serial number.
// <i> Note: This value is not editable in Configuration Wizard.
// <i> Serial number that is defined the same way like in @ref APP_USBD_STRINGS_MANUFACTURER.
#ifndef APP_USBD_STRING_SERIAL
#define APP_USBD_STRING_SERIAL g_extern_serial_number
#endif
// </e>
// <e> APP_USBD_STRING_ID_CONFIGURATION - Define configuration string ID.
// <i> Setting ID to 0 disables the string.
//==========================================================
#ifndef APP_USBD_STRING_ID_CONFIGURATION
#define APP_USBD_STRING_ID_CONFIGURATION 4
#endif
// <q> APP_USBD_STRING_CONFIGURATION_EXTERN - Define whether @ref APP_USBD_STRINGS_CONFIGURATION is created by macro or declared as global variable.
#ifndef APP_USBD_STRING_CONFIGURATION_EXTERN
#define APP_USBD_STRING_CONFIGURATION_EXTERN 0
#endif
// <s> APP_USBD_STRINGS_CONFIGURATION - String descriptor for the device configuration.
// <i> Note: This value is not editable in Configuration Wizard.
// <i> Configuration string that is defined the same way like in @ref APP_USBD_STRINGS_MANUFACTURER.
#ifndef APP_USBD_STRINGS_CONFIGURATION
#define APP_USBD_STRINGS_CONFIGURATION APP_USBD_STRING_DESC("Default configuration")
#endif
// </e>
// <s> APP_USBD_STRINGS_USER - Default values for user strings.
// <i> Note: This value is not editable in Configuration Wizard.
// <i> This value stores all application specific user strings with the default initialization.
// <i> The setup is done by X-macros.
// <i> Expected macro parameters:
// <i> @code
// <i> X(mnemonic, [=str_idx], ...)
// <i> @endcode
// <i> - @c mnemonic: Mnemonic of the string descriptor that would be added to
// <i> @ref app_usbd_string_desc_idx_t enumerator.
// <i> - @c str_idx : String index value, can be set or left empty.
// <i> For example, WinUSB driver requires descriptor to be present on 0xEE index.
// <i> Then use X(USBD_STRING_WINUSB, =0xEE, (APP_USBD_STRING_DESC(...)))
// <i> - @c ... : List of string descriptors for each defined language.
#ifndef APP_USBD_STRINGS_USER
#define APP_USBD_STRINGS_USER X(APP_USER_1, , APP_USBD_STRING_DESC("User 1"))
#endif
// </e>
// <e> APP_USBD_CONFIG_LOG_ENABLED - Enable logging in the module
//==========================================================
#ifndef APP_USBD_CONFIG_LOG_ENABLED
#define APP_USBD_CONFIG_LOG_ENABLED 0
#endif
// </e>
// </e>
// <e> USBD_ENABLED - nrf_drv_usbd - USB driver
//==========================================================
#if (USB_CDC_AS_SERIAL_TRANSPORT == 1)
#ifndef USBD_ENABLED
#define USBD_ENABLED 1
#endif
#else // USB_CDC_AS_SERIAL_TRANSPORT == 1
#ifndef USBD_ENABLED
#define USBD_ENABLED 0
#endif
#endif // USB_CDC_AS_SERIAL_TRANSPORT == 1
// <q> Enable power USB detection.
// <i> Configure if the example supports USB port connection.
#ifndef USBD_POWER_DETECTION
#define USBD_POWER_DETECTION 1
#endif
// <o> USBD_CONFIG_IRQ_PRIORITY - Interrupt priority
// <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7
#ifndef USBD_CONFIG_IRQ_PRIORITY
#define USBD_CONFIG_IRQ_PRIORITY 7
#endif
// <o> USBD_CONFIG_DMASCHEDULER_MODE - USBD SMA scheduler working scheme
// <0=> Prioritized access
// <1=> Round Robin
#ifndef USBD_CONFIG_DMASCHEDULER_MODE
#define USBD_CONFIG_DMASCHEDULER_MODE 0
#endif
// <q> USBD_CONFIG_DMASCHEDULER_ISO_BOOST - Give priority to isochronous transfers
// <i> This option gives priority to isochronous transfers.
// <i> Enabling it assures that isochronous transfers are always processed,
// <i> even if multiple other transfers are pending.
// <i> Isochronous endpoints are prioritized before the usbd_dma_scheduler_algorithm
// <i> function is called, so the option is independent of the algorithm chosen.
#ifndef USBD_CONFIG_DMASCHEDULER_ISO_BOOST
#define USBD_CONFIG_DMASCHEDULER_ISO_BOOST 1
#endif
// <q> USBD_CONFIG_ISO_IN_ZLP - Respond to an IN token on ISO IN endpoint with ZLP when no data is ready
// <i> If set, ISO IN endpoint will respond to an IN token with ZLP when no data is ready to be sent.
// <i> Else, there will be no response.
#ifndef USBD_CONFIG_ISO_IN_ZLP
#define USBD_CONFIG_ISO_IN_ZLP 0
#endif
#define NRFX_USBD_ENABLED USBD_ENABLED
#define NRFX_USBD_POWER_DETECTION USBD_POWER_DETECTION
#define NRFX_USBD_CONFIG_IRQ_PRIORITY USBD_CONFIG_IRQ_PRIORITY
#define NRFX_USBD_CONFIG_DMASCHEDULER_MODE USBD_CONFIG_DMASCHEDULER_MODE
#define NRFX_USBD_CONFIG_DMASCHEDULER_ISO_BOOST USBD_CONFIG_DMASCHEDULER_ISO_BOOST
#define NRFX_USBD_CONFIG_ISO_IN_ZLP USBD_CONFIG_ISO_IN_ZLP
// </e>
// <h> Application info used by the USB DFU.
// <q> @def APP_NAME
// <i> Application name in a human readable string.
#ifndef APP_NAME
#define APP_NAME "OpenThread App"
#endif
// <q> APP_VERSION_MAJOR
// <i> Application version major version.
#ifndef APP_VERSION_MAJOR
#define APP_VERSION_MAJOR 1
#endif
// <q> APP_VERSION_MINOR
// <i> Application version minor version.
#ifndef APP_VERSION_MINOR
#define APP_VERSION_MINOR 0
#endif
// <q> APP_VERSION_PATCH
// <i> Application version patch version.
#ifndef APP_VERSION_PATCH
#define APP_VERSION_PATCH 0
#endif
// <q> @def APP_ID
// <i> Application ID.
#ifndef APP_ID
#define APP_ID 1
#endif
// <q> APP_VERSION_PRERELEASE
// <i> Application prerelease tag.
#ifndef APP_VERSION_PRERELEASE
#define APP_VERSION_PRERELEASE ""
#endif
// <q> APP_VERSION_METADATA
// <i> Application metadata.
#ifndef APP_VERSION_METADATA
#define APP_VERSION_METADATA ""
#endif
// <h> app_usbd_cdc_acm - USB CDC ACM class
//==========================================================
// <q> APP_USBD_CDC_ACM_ENABLED - app_usbd_cdc_acm - USB CDC ACM class
#ifndef APP_USBD_CDC_ACM_ENABLED
#define APP_USBD_CDC_ACM_ENABLED 1
#endif
// <q> APP_USBD_CDC_ACM_ZLP_ON_EPSIZE_WRITE - Send ZLP on write with same size as endpoint
// <i> If enabled, CDC ACM class will automatically send a zero length packet after transfer which has the same size as endpoint.
// <i> This may limit throughput if a lot of binary data is sent, but in terminal mode operation it makes sure that the data is always displayed right after it is sent.
#ifndef APP_USBD_CDC_ACM_ZLP_ON_EPSIZE_WRITE
#define APP_USBD_CDC_ACM_ZLP_ON_EPSIZE_WRITE 1
#endif
// </h>
// <h> app_usbd_nrf_dfu_trigger - USB Trigger library
//==========================================================
// <q> APP_USBD_NRF_DFU_TRIGGER_ENABLED
// <i> Enable possibility to enter the bootloader from the application via a software trigger send over USB.
// <i> Requires configured BSP_SELF_PINRESET_PIN which is a GPIO pin connected to the reset pin.
#ifndef APP_USBD_NRF_DFU_TRIGGER_ENABLED
#define APP_USBD_NRF_DFU_TRIGGER_ENABLED 0
#endif
// <q> BSP_SELF_PINRESET_PIN
// <i> Enable possibility to enter the bootloader from the application via a software trigger send over USB.
// <i> Requires configured BSP_SELF_PINRESET_PIN which is a GPIO pin connected to the reset pin.
// <i> NRF_GPIO_PIN_MAP(0,19) is a pin used on Nordic PCA10059 Dongle.
#ifndef BSP_SELF_PINRESET_PIN
#define BSP_SELF_PINRESET_PIN NRF_GPIO_PIN_MAP(0, 19)
#endif
// <q> NRF_DFU_TRIGGER_USB_USB_SHARED
// <i> Flag indicating whether USB is used for other purposes in the application.
#ifndef NRF_DFU_TRIGGER_USB_USB_SHARED
#define NRF_DFU_TRIGGER_USB_USB_SHARED 1
#endif
// <q> NRF_DFU_TRIGGER_USB_INTERFACE_NUM
// <i> The USB interface to use for the DFU Trigger library.
// <i> According to the USB Specification, interface numbers cannot have gaps. Tailor this value to adhere to this
// <i> limitation. Takes values between 0-255
#ifndef NRF_DFU_TRIGGER_USB_INTERFACE_NUM
#define NRF_DFU_TRIGGER_USB_INTERFACE_NUM 0
#endif
// </h>
//==========================================================
// <h> nrf_log - Logging
//==========================================================
// <e> NRF_LOG_ENABLED - Logging module for nRF5 SDK
//==========================================================
#ifndef NRF_LOG_ENABLED
#define NRF_LOG_ENABLED 0
#endif
// </e>
// </h>
// <h> segger_rtt - SEGGER RTT
//==========================================================
// <o> SEGGER_RTT_CONFIG_BUFFER_SIZE_UP - Size of upstream buffer.
// <i> Note that either @ref NRF_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE
// <i> or this value is actually used. It depends on which one is bigger.
#ifndef SEGGER_RTT_CONFIG_BUFFER_SIZE_UP
#define SEGGER_RTT_CONFIG_BUFFER_SIZE_UP 512
#endif
// <o> SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS - Size of upstream buffer.
#ifndef SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS
#define SEGGER_RTT_CONFIG_MAX_NUM_UP_BUFFERS 2
#endif
// <o> SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN - Size of upstream buffer.
#ifndef SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN
#define SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN 16
#endif
// <o> SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS - Size of upstream buffer.
#ifndef SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS
#define SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS 2
#endif
// <o> SEGGER_RTT_CONFIG_DEFAULT_MODE - RTT behavior if the buffer is full.
// <i> The following modes are supported:
// <i> - SKIP - Do not block, output nothing.
// <i> - TRIM - Do not block, output as much as fits.
// <i> - BLOCK - Wait until there is space in the buffer.
// <0=> SKIP
// <1=> TRIM
// <2=> BLOCK_IF_FIFO_FULL
#ifndef SEGGER_RTT_CONFIG_DEFAULT_MODE
#define SEGGER_RTT_CONFIG_DEFAULT_MODE 0
#endif
// </h>
//==========================================================
// <e> NRF_CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver
//==========================================================
#ifndef NRF_CLOCK_ENABLED
#define NRF_CLOCK_ENABLED 1
#endif
// <o> CLOCK_CONFIG_XTAL_FREQ - HF XTAL Frequency
// <0=> Default (64 MHz)
#ifndef CLOCK_CONFIG_XTAL_FREQ
#define CLOCK_CONFIG_XTAL_FREQ 0
#endif
// <o> CLOCK_CONFIG_LF_SRC - LF Clock Source
// <0=> RC
// <1=> XTAL
// <2=> Synth
#ifndef CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 1
#endif
// <o> CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority
// <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7
#ifndef CLOCK_CONFIG_IRQ_PRIORITY
#define CLOCK_CONFIG_IRQ_PRIORITY 7
#endif
// </e>
// <e> POWER_ENABLED - nrf_drv_power - POWER peripheral driver
//==========================================================
#if (USB_CDC_AS_SERIAL_TRANSPORT == 1)
#ifndef POWER_ENABLED
#define POWER_ENABLED 1
#endif
#else // USB_CDC_AS_SERIAL_TRANSPORT == 1
#ifndef POWER_ENABLED
#define POWER_ENABLED 0
#endif
#endif // USB_CDC_AS_SERIAL_TRANSPORT == 1
// <o> POWER_CONFIG_IRQ_PRIORITY - Interrupt priority
// <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7
#ifndef POWER_CONFIG_IRQ_PRIORITY
#define POWER_CONFIG_IRQ_PRIORITY 7
#endif
// <q> POWER_CONFIG_DEFAULT_DCDCEN - The default configuration of main DCDC regulator
// <i> This settings means only that components for DCDC regulator are installed and it can be enabled.
#ifndef POWER_CONFIG_DEFAULT_DCDCEN
#define POWER_CONFIG_DEFAULT_DCDCEN 0
#endif
// <q> POWER_CONFIG_DEFAULT_DCDCENHV - The default configuration of High Voltage DCDC regulator
// <i> This settings means only that components for DCDC regulator are installed and it can be enabled.
#ifndef POWER_CONFIG_DEFAULT_DCDCENHV
#define POWER_CONFIG_DEFAULT_DCDCENHV 0
#endif
// </e>
// <e> NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver
//==========================================================
#if (SPIS_AS_SERIAL_TRANSPORT == 1)
#ifndef NRFX_SPIS_ENABLED
#define NRFX_SPIS_ENABLED 1
#endif
#else // SPIS_AS_SERIAL_TRANSPORT == 1
#ifndef NRFX_SPIS_ENABLED
#define NRFX_SPIS_ENABLED 0
#endif
#endif // SPIS_AS_SERIAL_TRANSPORT == 1
// <q> NRFX_SPIS0_ENABLED - Enable SPIS0 instance
#ifndef NRFX_SPIS0_ENABLED
#define NRFX_SPIS0_ENABLED 1
#endif
// <q> NRFX_SPIS1_ENABLED - Enable SPIS1 instance
#ifndef NRFX_SPIS1_ENABLED
#define NRFX_SPIS1_ENABLED 0
#endif
// <q> NRFX_SPIS2_ENABLED - Enable SPIS2 instance
#ifndef NRFX_SPIS2_ENABLED
#define NRFX_SPIS2_ENABLED 0
#endif
// <o> NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7
#ifndef NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY
#define NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY 7
#endif
// <o> NRFX_SPIS_DEFAULT_DEF - SPIS default DEF character <0-255>
#ifndef NRFX_SPIS_DEFAULT_DEF
#define NRFX_SPIS_DEFAULT_DEF 255
#endif
// <o> NRFX_SPIS_DEFAULT_ORC - SPIS default ORC character <0-255>
#ifndef NRFX_SPIS_DEFAULT_ORC
#define NRFX_SPIS_DEFAULT_ORC 255
#endif
// <e> NRFX_SPIS_CONFIG_LOG_ENABLED - Enables logging in the module.
//==========================================================
#ifndef NRFX_SPIS_CONFIG_LOG_ENABLED
#define NRFX_SPIS_CONFIG_LOG_ENABLED 0
#endif
// <o> NRFX_SPIS_CONFIG_LOG_LEVEL - Default Severity level
// <0=> Off
// <1=> Error
// <2=> Warning
// <3=> Info
// <4=> Debug
#ifndef NRFX_SPIS_CONFIG_LOG_LEVEL
#define NRFX_SPIS_CONFIG_LOG_LEVEL 3
#endif
// <o> NRFX_SPIS_CONFIG_INFO_COLOR - ANSI escape code prefix.
// <0=> Default
// <1=> Black
// <2=> Red
// <3=> Green
// <4=> Yellow
// <5=> Blue
// <6=> Magenta
// <7=> Cyan
// <8=> White
#ifndef NRFX_SPIS_CONFIG_INFO_COLOR
#define NRFX_SPIS_CONFIG_INFO_COLOR 0
#endif
// <o> NRFX_SPIS_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
// <0=> Default
// <1=> Black
// <2=> Red
// <3=> Green
// <4=> Yellow
// <5=> Blue
// <6=> Magenta
// <7=> Cyan
// <8=> White
#ifndef NRFX_SPIS_CONFIG_DEBUG_COLOR
#define NRFX_SPIS_CONFIG_DEBUG_COLOR 0
#endif
// </e>
// </e>
// <e> NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver
//==========================================================
#ifndef NRFX_TIMER_ENABLED
#define NRFX_TIMER_ENABLED 1
#endif
// <q> NRFX_TIMER0_ENABLED - Enable TIMER0 instance
#ifndef NRFX_TIMER0_ENABLED
#define NRFX_TIMER0_ENABLED 1
#endif
// <q> NRFX_TIMER1_ENABLED - Enable TIMER1 instance
#ifndef NRFX_TIMER1_ENABLED
#define NRFX_TIMER1_ENABLED 1
#endif
// <q> NRFX_TIMER2_ENABLED - Enable TIMER2 instance
#ifndef NRFX_TIMER2_ENABLED
#define NRFX_TIMER2_ENABLED 1
#endif
// <q> NRFX_TIMER3_ENABLED - Enable TIMER3 instance
#ifndef NRFX_TIMER3_ENABLED
#define NRFX_TIMER3_ENABLED 1
#endif
// <q> NRFX_TIMER4_ENABLED - Enable TIMER4 instance
#ifndef NRFX_TIMER4_ENABLED
#define NRFX_TIMER4_ENABLED 1
#endif
// <o> NRFX_TIMER_DEFAULT_CONFIG_FREQUENCY - Timer frequency if in Timer mode
// <0=> 16 MHz
// <1=> 8 MHz
// <2=> 4 MHz
// <3=> 2 MHz
// <4=> 1 MHz
// <5=> 500 kHz
// <6=> 250 kHz
// <7=> 125 kHz
// <8=> 62.5 kHz
// <9=> 31.25 kHz
#ifndef NRFX_TIMER_DEFAULT_CONFIG_FREQUENCY
#define NRFX_TIMER_DEFAULT_CONFIG_FREQUENCY 0
#endif
// <o> NRFX_TIMER_DEFAULT_CONFIG_MODE - Timer mode or operation
// <0=> Timer
// <1=> Counter
#ifndef NRFX_TIMER_DEFAULT_CONFIG_MODE
#define NRFX_TIMER_DEFAULT_CONFIG_MODE 0
#endif
// <o> NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH - Timer counter bit width
// <0=> 16 bit
// <1=> 8 bit
// <2=> 24 bit
// <3=> 32 bit
#ifndef NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH
#define NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH 0
#endif
// <o> NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7
#ifndef NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY
#define NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY 7
#endif
// <e> NRFX_TIMER_CONFIG_LOG_ENABLED - Enables logging in the module.
//==========================================================
#ifndef NRFX_TIMER_CONFIG_LOG_ENABLED
#define NRFX_TIMER_CONFIG_LOG_ENABLED 0
#endif
// <o> NRFX_TIMER_CONFIG_LOG_LEVEL - Default Severity level
// <0=> Off
// <1=> Error
// <2=> Warning
// <3=> Info
// <4=> Debug
#ifndef NRFX_TIMER_CONFIG_LOG_LEVEL
#define NRFX_TIMER_CONFIG_LOG_LEVEL 3
#endif
// <o> NRFX_TIMER_CONFIG_INFO_COLOR - ANSI escape code prefix.
// <0=> Default
// <1=> Black
// <2=> Red
// <3=> Green
// <4=> Yellow
// <5=> Blue
// <6=> Magenta
// <7=> Cyan
// <8=> White
#ifndef NRFX_TIMER_CONFIG_INFO_COLOR
#define NRFX_TIMER_CONFIG_INFO_COLOR 0
#endif
// <o> NRFX_TIMER_CONFIG_DEBUG_COLOR - ANSI escape code prefix.
// <0=> Default
// <1=> Black
// <2=> Red
// <3=> Green
// <4=> Yellow
// <5=> Blue
// <6=> Magenta
// <7=> Cyan
// <8=> White
#ifndef NRFX_TIMER_CONFIG_DEBUG_COLOR
#define NRFX_TIMER_CONFIG_DEBUG_COLOR 0
#endif
// </e>
// </e>
// <q> SYSTICK_ENABLED - nrf_drv_systick - SysTick driver
#if (USB_CDC_AS_SERIAL_TRANSPORT == 1)
#ifndef SYSTICK_ENABLED
#define SYSTICK_ENABLED 1
#endif
#else // USB_CDC_AS_SERIAL_TRANSPORT == 1
#ifndef SYSTICK_ENABLED
#define SYSTICK_ENABLED 0
#endif
#endif // USB_CDC_AS_SERIAL_TRANSPORT == 1
#endif //SDK_CONFIG_H
+17 -6
View File
@@ -47,15 +47,18 @@ noinst_HEADERS = \
SEGGER_RTT_V640/RTT/SEGGER_RTT_Conf.h \
$(NULL)
if OPENTHREAD_EXAMPLES_NRF52840
if OPENTHREAD_EXAMPLES_NRF52811
libjlinkrtt_a_CPPFLAGS += \
-DNRF52840_XXAA \
-DNRF52811_XXAA \
-DSEGGER_RTT_CONFIG_H=\"$(top_srcdir)/third_party/NordicSemiconductor/segger_rtt/SEGGER_RTT_Conf.h\" \
-DUSE_APP_CONFIG=1 \
-I$(top_srcdir)/include \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
-I$(top_srcdir)/third_party/NordicSemiconductor/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52811/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/dependencies \
-I$(top_srcdir)/third_party/NordicSemiconductor/libraries/app_error \
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/mdk \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
$(NULL)
endif
@@ -63,21 +66,29 @@ if OPENTHREAD_EXAMPLES_NRF52833
libjlinkrtt_a_CPPFLAGS += \
-DNRF52833_XXAA \
-DSEGGER_RTT_CONFIG_H=\"$(top_srcdir)/third_party/NordicSemiconductor/segger_rtt/SEGGER_RTT_Conf.h\" \
-DUSE_APP_CONFIG=1 \
-I$(top_srcdir)/include \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
-I$(top_srcdir)/third_party/NordicSemiconductor/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52833/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/dependencies \
-I$(top_srcdir)/third_party/NordicSemiconductor/libraries/app_error \
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/mdk \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
$(NULL)
endif
if OPENTHREAD_EXAMPLES_NRF52811
if OPENTHREAD_EXAMPLES_NRF52840
libjlinkrtt_a_CPPFLAGS += \
-DNRF52811_XXAA \
-DNRF52840_XXAA \
-DSEGGER_RTT_CONFIG_H=\"$(top_srcdir)/third_party/NordicSemiconductor/segger_rtt/SEGGER_RTT_Conf.h\" \
-DUSE_APP_CONFIG=1 \
-I$(top_srcdir)/include \
-I$(top_srcdir)/third_party/NordicSemiconductor/cmsis \
-I$(top_srcdir)/third_party/NordicSemiconductor/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/config/nrf52840/config \
-I$(top_srcdir)/third_party/NordicSemiconductor/dependencies \
-I$(top_srcdir)/third_party/NordicSemiconductor/libraries/app_error \
-I$(top_srcdir)/third_party/NordicSemiconductor/nrfx/mdk \
$(NULL)
endif