| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef _EIDSP_CPP_CONFIG_H_ |
| #define _EIDSP_CPP_CONFIG_H_ |
|
|
| |
| #ifndef EIDSP_USE_CMSIS_DSP |
| #if (defined(__MBED__) || __ARM_ARCH_PROFILE == 'M' || defined(__TARGET_CPU_CORTEX_M0) || defined(__TARGET_CPU_CORTEX_M0PLUS) || defined(__TARGET_CPU_CORTEX_M3) || defined(__TARGET_CPU_CORTEX_M4) || defined(__TARGET_CPU_CORTEX_M7) || defined(__TARGET_CPU_CORTEX_M33) || defined(__TARGET_CPU_CORTEX_M55) || defined(__TARGET_CPU_CORTEX_M85) || defined(USE_HAL_DRIVER) || defined(ARDUINO_NRF52_ADAFRUIT)) |
| |
| #if defined(__MBED__) |
| #include "mbed_version.h" |
| #if (MBED_VERSION < MBED_ENCODE_VERSION((5), (7), (0))) |
| #define EIDSP_USE_CMSIS_DSP 0 |
| #else |
| #define EIDSP_USE_CMSIS_DSP 1 |
| #endif |
|
|
| |
| #if defined(ARDUINO) && (MBED_VERSION < MBED_ENCODE_VERSION((6), (0), (0))) |
| #define EIDSP_LOAD_CMSIS_DSP_SOURCES 0 |
| #else |
| #define EIDSP_LOAD_CMSIS_DSP_SOURCES 1 |
| #endif |
| #else |
| #define EIDSP_USE_CMSIS_DSP 1 |
| #define EIDSP_LOAD_CMSIS_DSP_SOURCES 1 |
| #endif |
| #else |
| #define EIDSP_USE_CMSIS_DSP 0 |
| #endif |
| #endif |
|
|
| #if EIDSP_USE_CMSIS_DSP == 1 |
| #define EIDSP_i32 int32_t |
| #define EIDSP_i16 int16_t |
| #define EIDSP_i8 q7_t |
| #define ARM_MATH_ROUNDING 1 |
| #else |
| #define EIDSP_i32 int32_t |
| #define EIDSP_i16 int16_t |
| #define EIDSP_i8 int8_t |
| #endif |
|
|
| #ifndef EIDSP_USE_NEON |
| #if defined(__ARM_NEON) || defined(__aarch64__) |
| #define EIDSP_USE_NEON 1 |
| #else |
| #define EIDSP_USE_NEON 0 |
| #endif |
| #endif |
|
|
| #ifndef EIDSP_USE_ASSERTS |
| #define EIDSP_USE_ASSERTS 0 |
| #endif |
|
|
| #if EIDSP_USE_ASSERTS == 1 |
| #include <assert.h> |
| #define EIDSP_ERR(err_code) ei_printf("ERR: %d (%s)\n", err_code, #err_code); assert(false) |
| #else |
| #define EIDSP_ERR(err_code) return(err_code) |
| #endif |
|
|
| |
| |
| |
| #ifndef EIDSP_QUANTIZE_FILTERBANK |
| #define EIDSP_QUANTIZE_FILTERBANK 1 |
| #endif |
|
|
| |
| #ifndef EIDSP_TRACK_ALLOCATIONS |
| #define EIDSP_TRACK_ALLOCATIONS 0 |
| #endif |
|
|
| |
| |
| #ifndef EIDSP_PRINT_ALLOCATIONS |
| #define EIDSP_PRINT_ALLOCATIONS 1 |
| #endif |
|
|
| #ifndef EIDSP_SIGNAL_C_FN_POINTER |
| #define EIDSP_SIGNAL_C_FN_POINTER 0 |
| #endif |
|
|
| #ifndef EIDSP_USE_ESP_DSP |
| #if defined(ESP32) || defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32P4) || defined(CONFIG_IDF_TARGET_ESP32C3) |
| #define EIDSP_USE_ESP_DSP 1 |
| #else |
| #define EIDSP_USE_ESP_DSP 0 |
| #endif |
| #endif |
| |
| #endif |
|
|