diff --git a/.gitignore b/.gitignore index fcd85c4..669c770 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.project /sync.ffs_db +*.*bak diff --git a/keywords.txt b/keywords.txt index a37a8c4..d80bac0 100644 --- a/keywords.txt +++ b/keywords.txt @@ -18,3 +18,19 @@ Windowing KEYWORD2 Exponent KEYWORD2 Revision KEYWORD2 MajorPeak KEYWORD2 + +####################################### +# Constants (LITERAL1) +####################################### + +twoPi LITERAL1 +fourPi LITERAL1 +FFT_FORWARD LITERAL1 +FFT_REVERSE LITERAL1 +FFT_WIN_TYP_RECTANGLE LITERAL1 +FFT_WIN_TYP_HAMMING LITERAL1 +FFT_WIN_TYP_HANN LITERAL1 +FFT_WIN_TYP_TRIANGLE LITERAL1 +FFT_WIN_TYP_BLACKMAN LITERAL1 +FFT_WIN_TYP_FLT_TOP LITERAL1 +FFT_WIN_TYP_WELCH LITERAL1 diff --git a/library.properties b/library.properties index 5680ffa..13c1da4 100644 --- a/library.properties +++ b/library.properties @@ -1,8 +1,8 @@ name=arduinoFFT -version=1.2.3 +version=1.3 author=kosme maintainer=Enrique Condes -sentence=A library for implementing Fast Fourier Transform on Arduino. +sentence=A library for implementing floating point Fast Fourier Transform calculations on Arduino. paragraph=With this library you can calculate the frequency of a sampled signal. category=Data Processing url=https://github.com/kosme/arduinoFFT diff --git a/src/arduinoFFT.h b/src/arduinoFFT.h index 59d9e75..3d72b13 100644 --- a/src/arduinoFFT.h +++ b/src/arduinoFFT.h @@ -30,7 +30,9 @@ #else #include #include - #include + #ifdef __AVR__ + #include + #endif #include #include "defs.h" #include "types.h" diff --git a/src/types.h b/src/types.h index c84bf33..6cd7d85 100644 --- a/src/types.h +++ b/src/types.h @@ -19,17 +19,21 @@ typedef signed long s32; typedef unsigned long long u64; typedef signed long long s64; -/* use inttypes.h instead -// C99 standard integer type definitions -typedef unsigned char uint8_t; -typedef signed char int8_t; -typedef unsigned short uint16_t; -typedef signed short int16_t; -typedef unsigned long uint32_t; -typedef signed long int32_t; -typedef unsigned long uint64_t; -typedef signed long int64_t; -*/ +// #ifndef __AVR__ +#ifdef __MBED__ + // use inttypes.h instead + // C99 standard integer type definitions + typedef unsigned char uint8_t; + typedef signed char int8_t; + typedef unsigned short uint16_t; + typedef signed short int16_t; + /*typedef unsigned long uint32_t; + typedef signed long int32_t; + typedef unsigned long uint64_t; + typedef signed long int64_t; + */ +#endif + // maximum value that can be held // by unsigned data types (8,16,32bits) #define MAX_U08 255