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