Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_DISCO_F746NG BUTTON_GROUP LCD_DISCO_F746NG TS_DISCO_F746NG UIT_FFT_Real mbed
SpectrumDisplay.hpp
00001 //------------------------------------------------------- 00002 // Class for display spectrum 00003 // Copyright (c) 2015 MIKAMI, Naoki, 2015/10/26 00004 //------------------------------------------------------- 00005 00006 #ifndef SPECTRUM_DISPLAY_HPP 00007 #define SPECTRUM_DISPLAY_HPP 00008 00009 #include "LCD_DISCO_F746NG.h" 00010 00011 namespace Mikami 00012 { 00013 class SpectrumDisplay 00014 { 00015 public: 00016 SpectrumDisplay(LCD_DISCO_F746NG &lcd, 00017 int nFft, int x0, int y0, 00018 float db1, int bin, float maxDb, int fs); 00019 void BarChart(float db[], uint32_t backColor); 00020 void LineChart(float db[], uint32_t backColor); 00021 void Clear(uint32_t backColor); 00022 00023 private: 00024 const int N_FFT_; // number of date for FFT 00025 const int X0_; // Origin for x axis 00026 const int Y0_; // Origin for y axis 00027 const float DB1_; // Pixels for 1 dB 00028 const int BIN_; // Pixels per bin 00029 const float MAX_DB_; // Maximum dB 00030 const int FS_; // Sampling frequency: 10 kHz 00031 00032 LCD_DISCO_F746NG *const LCD_; 00033 00034 void AxisX(); // x-axis 00035 void AxisY(); // y-axis 00036 }; 00037 } 00038 #endif // SPECTRUM_DISPLAY_HPP
Generated on Mon Jul 18 2022 10:22:00 by
1.7.2