Microchip® Advanced Software Framework

ifft.c File Reference
#include "lib/ifft.h"

Macros

#define ABS(x)   (x < 0 ? -x : x)
 
#define RESOLUTION   7
 
#define SIN_TAB_LEN   120
 

Functions

static uint16_t bitrev (uint16_t j, uint16_t nu)
 
static int16_t cosI (uint16_t angleMilli)
 
void ifft (int16_t xre[], int16_t xim[], uint16_t n)
 
static uint16_t ilog2 (uint16_t val)
 
static int16_t sinI (uint16_t angleMilli)
 

Variables

static const int8_t SIN_TAB []
 

#define ABS (   x)    (x < 0 ? -x : x)

Referenced by ifft().

#define RESOLUTION   7

Referenced by ifft().

#define SIN_TAB_LEN   120

Referenced by sinI().

static uint16_t bitrev ( uint16_t  j,
uint16_t  nu 
)
static

Referenced by ifft().

static int16_t cosI ( uint16_t  angleMilli)
static

References sinI().

Referenced by ifft().

void ifft ( int16_t  xre[],
int16_t  xim[],
uint16_t  n 
)

References ABS, bitrev(), c, cosI(), i, ilog2(), n, RESOLUTION, s, and sinI().

static uint16_t ilog2 ( uint16_t  val)
static

Referenced by ifft().

static int16_t sinI ( uint16_t  angleMilli)
static

References SIN_TAB, and SIN_TAB_LEN.

Referenced by cosI(), and ifft().

const int8_t SIN_TAB[]
static
Initial value:
= {
0,6,13,20,26,33,39,45,52,58,63,69,75,80,
85,90,95,99,103,107,110,114,116,119,121,
123,125,126,127,127,127,127,127,126,125,
123,121,119,116,114,110,107,103,99,95,90,
85,80,75,69,63,58,52,45,39,33,26,20,13,6,
0,-6,-13,-20,-26,-33,-39,-45,-52,-58,-63,
-69,-75,-80,-85,-90,-95,-99,-103,-107,-110,
-114,-116,-119,-121,-123,-125,-126,-127,-127,
-127,-127,-127,-126,-125,-123,-121,-119,-116,
-114,-110,-107,-103,-99,-95,-90,-85,-80,-75,
-69,-63,-58,-52,-45,-39,-33,-26,-20,-13,-6
}

Referenced by sinI().