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 F746_GUI F746_SAI_IO LCD_DISCO_F746NG TS_DISCO_F746NG mbed
WaveformDisplay.hpp
00001 //----------------------------------------------------------- 00002 // Class for waveform display ---- Header 00003 // 00004 // 2017/03/17, Copyright (c) 2017 MIKAMI, Naoki 00005 //----------------------------------------------------------- 00006 00007 #ifndef F746_WAVEFORM_DISPLAY_HPP 00008 #define F746_WAVEFORM_DISPLAY_HPP 00009 00010 #include "mbed.h" 00011 #include "LCD_DISCO_F746NG.h" 00012 #include "Array.hpp" 00013 00014 namespace Mikami 00015 { 00016 class WaveformDisplay 00017 { 00018 public: 00019 WaveformDisplay(LCD_DISCO_F746NG &lcd, 00020 uint16_t x0, uint16_t y0, 00021 const Array<int16_t>& xn, 00022 uint16_t rShift, 00023 uint32_t axisColor, 00024 uint32_t lineColor, 00025 uint32_t backColor) 00026 : X0_(x0), Y0_(y0), xn_(xn), 00027 N_DATA_(xn.Length()), 00028 R_SHIFT_(rShift), 00029 AXIS_COLOR_(axisColor), 00030 LINE_COLOR_(lineColor), 00031 BACK_COLOR_(backColor), 00032 lcd_(lcd) { Axis(); } 00033 00034 void Execute(); 00035 00036 private: 00037 const uint16_t X0_, Y0_; 00038 const Array<int16_t>& xn_; 00039 const int N_DATA_; 00040 const uint16_t R_SHIFT_; 00041 const uint32_t AXIS_COLOR_; 00042 const uint32_t LINE_COLOR_; 00043 const uint32_t BACK_COLOR_; 00044 static const int LIMIT_ = 32; 00045 static const int LIMIT2_ = LIMIT_ + 1; 00046 00047 LCD_DISCO_F746NG &lcd_; 00048 00049 // Clipping 00050 uint16_t Clip(int16_t xn); 00051 00052 void Axis(); 00053 00054 // disallow copy constructor and assignment operator 00055 WaveformDisplay(const WaveformDisplay& ); 00056 WaveformDisplay& operator=(const WaveformDisplay& ); 00057 }; 00058 } 00059 #endif // F746_WAVEFORM_DISPLAY_HPP
Generated on Fri Jul 22 2022 14:41:57 by
 1.7.2
 1.7.2