From d94117357b368abc6385db080c133fa63b52a2f7 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Mon, 3 Oct 2022 11:02:35 -0600 Subject: [PATCH] Add architecture agnostic namespace to be used in Zephyr Signed-off-by: Yuval Peress --- Include/cmsis_dsp_math.h | 17 +++++++++++++++++ Include/cmsis_dsp_math_types.h | 18 ++++++++++++++++++ Include/dsp/basic_math_functions.h | 6 ++++++ 3 files changed, 41 insertions(+) create mode 100644 Include/cmsis_dsp_math.h create mode 100644 Include/cmsis_dsp_math_types.h diff --git a/Include/cmsis_dsp_math.h b/Include/cmsis_dsp_math.h new file mode 100644 index 00000000..340b24fe --- /dev/null +++ b/Include/cmsis_dsp_math.h @@ -0,0 +1,17 @@ +/******************************************************************************* + * @file cmsis_dsp_math.h + * @brief Architecture agnostic naming for arm_math.h + * @see arm_math.h for defails + ******************************************************************************/ +/* Copyright (c) 2022 Google Inc + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef INCLUDE_CMSIS_DSP_MATH_H_ +#define INCLUDE_CMSIS_DSP_MATH_H_ + +#include "arm_math.h" + +#include "cmsis_dsp_math_types.h" + +#endif //INCLUDE_CMSIS_DSP_MATH_H_ diff --git a/Include/cmsis_dsp_math_types.h b/Include/cmsis_dsp_math_types.h new file mode 100644 index 00000000..793821dd --- /dev/null +++ b/Include/cmsis_dsp_math_types.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2022 Google Inc + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef INCLUDE_CMSIS_DSP_MATH_TYPES_H_ +#define INCLUDE_CMSIS_DSP_MATH_TYPES_H_ + +#include "arm_math_types.h" + +#define CMSIS_MATH_SUCCESS ARM_MATH_SUCCESS +#define CMSIS_MATH_ARGUMENT_ERROR ARM_MATH_ARGUMENT_ERROR +#define CMSIS_MATH_LENGTH_ERROR ARM_MATH_LENGTH_ERROR +#define CMSIS_MATH_SIZE_MISMATCH ARM_MATH_SIZE_MISMATH +#define CMSIS_MATH_MANIF ARM_MATH_MANIF +#define CMSIS_MATH_TEST_FAILURE ARM_MATH_TEST_FAILURE +#define CMSIS_MATH_DECOMPOSITION_FAILURE ARM_MATH_DECOMPOSITION_FAILURE + +#endif /* INCLUDE_CMSIS_DSP_MATH_TYPES_H_ */ diff --git a/Include/dsp/basic_math_functions.h b/Include/dsp/basic_math_functions.h index dcc1f2a5..816fe93d 100755 --- a/Include/dsp/basic_math_functions.h +++ b/Include/dsp/basic_math_functions.h @@ -56,6 +56,12 @@ extern "C" q7_t * pDst, uint32_t blockSize); +/** + * @brief Architecture agnostic naming + * @see arm_mult_q7 + */ +#define cmsis_mult_q7 arm_mult_q7 + /** * @brief Q15 vector multiplication.