Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Drivers/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c')
-rw-r--r--Drivers/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/Drivers/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c b/Drivers/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c
index 8487ed312..fab0a32b1 100644
--- a/Drivers/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c
+++ b/Drivers/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c
@@ -3,13 +3,13 @@
* Title: arm_sqrt_q15.c
* Description: Q15 square root function
*
- * $Date: 27. January 2017
- * $Revision: V.1.5.1
+ * $Date: 18. March 2019
+ * $Revision: V1.6.0
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
/*
- * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
+ * Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -29,31 +29,30 @@
#include "arm_math.h"
#include "arm_common_tables.h"
-
/**
- * @ingroup groupFastMath
+ @ingroup groupFastMath
*/
/**
- * @addtogroup SQRT
- * @{
+ @addtogroup SQRT
+ @{
*/
- /**
- * @brief Q15 square root function.
- * @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF.
- * @param[out] *pOut square root of input value.
- * @return The function returns ARM_MATH_SUCCESS if the input value is positive
- * and ARM_MATH_ARGUMENT_ERROR if the input is negative. For
- * negative inputs, the function returns *pOut = 0.
- */
+/**
+ @brief Q15 square root function.
+ @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF
+ @param[out] pOut points to square root of input value
+ @return execution status
+ - \ref ARM_MATH_SUCCESS : input value is positive
+ - \ref ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0
+ */
arm_status arm_sqrt_q15(
q15_t in,
q15_t * pOut)
{
- q15_t number, temp1, var1, signBits1, half;
q31_t bits_val1;
+ q15_t number, temp1, var1, signBits1, half;
float32_t temp_float1;
union
{
@@ -85,7 +84,7 @@ arm_status arm_sqrt_q15(
/* Convert to float */
temp_float1 = number * 3.051757812500000e-005f;
- /*Store as integer */
+ /* Store as integer */
tempconv.floatval = temp_float1;
bits_val1 = tempconv.fracval;
/* Subtract the shifted value from the magic number to give intial guess */
@@ -135,10 +134,11 @@ arm_status arm_sqrt_q15(
else
{
*pOut = 0;
+
return (ARM_MATH_ARGUMENT_ERROR);
}
}
/**
- * @} end of SQRT group
+ @} end of SQRT group
*/