Basic Audio Signal Processing Library
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
hysteresis.h
00001 #ifndef _HYSTERESIS_H_ 00002 #define _HYSTERESIS_H_ 00003 00004 #include <stdint.h> 00005 00006 namespace amakusa 00007 { 00008 /** 00009 * @brief Hysteresis algorithm to the descrete input value. 00010 * @details 00011 * To use this class, include amakusa.h 00012 */ 00013 class Hysteresis 00014 { 00015 public: 00016 /** 00017 * @brief Constructor 00018 * @param[in] min_input the Minumum input value for run() method. Must be smaller than INT32_MAX. 00019 * @param[in] max_input the Maximum input value for run() method. Must be bigger than INT32_MIN. 00020 */ 00021 Hysteresis( int32_t min_input, int32_t max_input ); 00022 /** 00023 * @brief Run the Hysteresis algorithm 00024 * @param[in] in_data A data to be applied hysteresis 00025 * @returns data with hysteresis. The value range is [min_input, max_input ] of the constructor. 00026 */ 00027 virtual int32_t run( int32_t in_data ); 00028 private: 00029 int32_t last_value, min, max; 00030 }; 00031 00032 } 00033 00034 00035 #endif
Generated on Tue Jul 12 2022 21:49:23 by 1.7.2