CW Decoder (Morse code decoder) 1st release version. Only run on Nucleo-F446RE mbed board.

Dependencies:   Array_Matrix F446_AD_DA ST7565_SPI_LCD TextLCD UIT_FFT_Real

Fork of F446_MySoundMachine by 不韋 呂

Base on F446_MySoundMachine program created by 不韋 呂-san.
Thanks to 不韋 呂-san making fundamental part such as FFT and ADC high speed interrupt driven program.
I just combined LCD and show CW code.

Revision:
6:5e21ac9f0550
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MySpectrogram/AnalysisBase.hpp	Sun Feb 05 08:02:54 2017 +0000
@@ -0,0 +1,50 @@
+//-------------------------------------------------------
+//  Base abstract class for spectrum analysis (Header)
+//
+//  2016/07/23, Copyright (c) 2016 MIKAMI, Naoki
+//-------------------------------------------------------
+
+#ifndef BASE_ANALYZER_HPP
+#define BASE_ANALYZER_HPP
+
+#include "Array.hpp"
+#include "fftReal.hpp"
+#include "Hamming.hpp"
+
+namespace Mikami
+{
+    class AnalyzerBase
+    {
+    public:
+        // nData: Number of data to be analyzed
+        // nFft:  Number of FFT points
+        // nUse:  FFT, cepstrum: window width + zero padding
+        //        Linear prediction: window width
+        AnalyzerBase(int nData, int nFft, int nUse);
+        virtual ~AnalyzerBase() {}
+        void Execute(const float xn[], float db[]);
+
+    protected:
+        const int N_DATA_;
+        const int N_FFT_;
+
+        FftReal fft_;
+                
+        float Norm(Complex x)
+        { return x.real()*x.real() + x.imag()*x.imag(); }
+
+    private:
+        HammingWindow wHm_;
+
+        Array<float> xData_;    // data to be analyzed
+        Array<float> wData_;    // windowd data
+
+        virtual void Analyze(const float wData[], float db[]) = 0;
+
+        // disallow copy constructor and assignment operator
+        AnalyzerBase(const AnalyzerBase& );
+        AnalyzerBase& operator=(const AnalyzerBase& );
+    };
+}
+#endif  // BASE_ANALYZER_HPP
+