![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
CQエレクトロニクス・セミナ「実習・マイコンを動かしながら学ぶディジタル・フィルタ」で使うプログラム.雛形として使う. http://seminar.cqpub.co.jp/ccm/ES18-0020
Dependencies: F746_GUI F746_SAI_IO mbed
Revision 5:976ef47a7f25, committed 2018-03-20
- Comitter:
- MikamiUitOpen
- Date:
- Tue Mar 20 11:15:47 2018 +0000
- Parent:
- 4:42586a44caeb
- Commit message:
- 6
Changed in this revision
Filter/Multiplier.hpp | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Filter/Multiplier.hpp Sun Mar 18 00:59:56 2018 +0000 +++ b/Filter/Multiplier.hpp Tue Mar 20 11:15:47 2018 +0000 @@ -1,7 +1,7 @@ //--------------------------------------------------- // 定数乗算器 // -// 2017/09/27, Copyright (c) 2017 MIKAMI, Naoki +// 2018/03/20, Copyright (c) 2018 MIKAMI, Naoki //--------------------------------------------------- #ifndef CONST_MULTIPLY_HPP @@ -18,8 +18,8 @@ // 定数を乗算する処理の実行,戻り値は int16_t 型とすること int16_t Execute(int16_t xn) { - int16_t yn = C_*xn; - return yn; + float yn = C_*xn; + return (int16_t)yn; } private: const float C_;
--- a/main.cpp Sun Mar 18 00:59:56 2018 +0000 +++ b/main.cpp Tue Mar 20 11:15:47 2018 +0000 @@ -9,7 +9,7 @@ // F746_SAI_IO Rev.12 // mbed Rev.161 // -// 2018/03/18, Copyright (c) 2018 MIKAMI, Naoki +// 2018/03/20, Copyright (c) 2018 MIKAMI, Naoki //----------------------------------------------------------------- #include "SAI_InOut.hpp"