5.3.30 _Q15sinSeries Function
Generates the sine series with the given normalizing frequency,
f
, and the given number of samples, num
, starting
from start
. Stores the result in buffer, buf
.
Include
<libq.h>
Prototype
short _Q15sinSeries(_Q15 f, short start, short
num, _Q15 *buf);
Arguments
f |
a fixed-point number in Q15 format, which ranges from 0 to (231-1). The valid range of values for this argument is from -16384 to 16384. The argument represents the Normalizing frequency. |
start |
a fixed-point number in Q16 format, which ranges from 0 to (231-1). The valid range of values for this argument is from 1 to 32767. This argument represents the Starting Sample number in the Sine Series. |
num |
a fixed-point number in Q16 format, which ranges from 0
to (231-1). The valid range of values for this argument is
from 1 to 32767. This argument represents the Number of Sine Samples the
function is called to generate. Note:
num should not be more than 16383 for dsPIC and
32767 for PIC devices. |
buf |
a pointer to the buffer where the generated sine samples would get copied into. |
Return Value
This function returns num
, the number of generated sine
samples.