|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Convert number representation in Float or Double to Q31/Q15/Q7. More...
Functions | |
| static q7_t | zdsp_f32_to_q7_shift (float32_t src, uint32_t m) |
| Convert a floating-point (float32_t) value to a Q7 fixed-point value with a right shift. | |
| static q15_t | zdsp_f32_to_q15_shift (float32_t src, uint32_t m) |
| Convert a floating-point (float32_t) value to a Q15 fixed-point value with a right shift. | |
| static q31_t | zdsp_f32_to_q31_shift (float32_t src, uint32_t m) |
| Convert a floating-point (float32_t) value to a Q31 fixed-point value with a right shift. | |
| static q7_t | zdsp_f64_to_q7_shift (float64_t src, uint32_t m) |
| Convert a floating-point (float64_t) value to a Q7 fixed-point value with a right shift. | |
| static q15_t | zdsp_f64_to_q15_shift (float64_t src, uint32_t m) |
| Convert a floating-point (float64_t) value to a Q15 fixed-point value with a right shift. | |
| static q31_t | zdsp_f64_to_q31_shift (float64_t src, uint32_t m) |
| Convert a floating-point (float64_t) value to a Q31 fixed-point value with a right shift. | |
Convert number representation in Float or Double to Q31/Q15/Q7.
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
#include <zephyr/dsp/utils.h>
Convert a floating-point (float32_t) value to a Q15 fixed-point value with a right shift.
| src | The input floating-point (float32_t) value. |
| m | The number of bits to right shift the input value (0 to 15). |
#include <zephyr/dsp/utils.h>
Convert a floating-point (float32_t) value to a Q31 fixed-point value with a right shift.
| src | The input floating-point (float32_t) value. |
| m | The number of bits to right shift the input value (0 to 31). |
#include <zephyr/dsp/utils.h>
Convert a floating-point (float32_t) value to a Q7 fixed-point value with a right shift.
| src | The input floating-point (float32_t) value. |
| m | The number of bits to right shift the input value (0 to 7). |
#include <zephyr/dsp/utils.h>
Convert a floating-point (float64_t) value to a Q15 fixed-point value with a right shift.
| src | The input floating-point (float64_t) value. |
| m | The number of bits to right shift the input value (0 to 15). |
#include <zephyr/dsp/utils.h>
Convert a floating-point (float64_t) value to a Q31 fixed-point value with a right shift.
| src | The input floating-point (float64_t) value. |
| m | The number of bits to right shift the input value (0 to 31). |
#include <zephyr/dsp/utils.h>
Convert a floating-point (float64_t) value to a Q7 fixed-point value with a right shift.
| src | The input floating-point (float64_t) value. |
| m | The number of bits to right shift the input value (0 to 7). |