CQ出版社セミナ,2021/12/07開催「実習・C++言語によるArmマイコンのプログラミング」で使うプログラム.

Dependencies:   Array_Matrix mbed SerialTxRxIntr UIT_FFT_Real

Files at this revision

API Documentation at this revision

Comitter:
MikamiUitOpen
Date:
Wed Feb 05 08:58:16 2020 +0000
Parent:
3:687ae0dd092f
Child:
5:5e55a5f440c0
Commit message:
5

Changed in this revision

SerialTxRxIntr.lib Show annotated file Show diff for this revision Revisions of this file
Xfer.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/SerialTxRxIntr.lib	Tue Jan 28 12:55:59 2020 +0000
+++ b/SerialTxRxIntr.lib	Wed Feb 05 08:58:16 2020 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/MikamiUitOpen/code/SerialTxRxIntr/#8cd3385cdee6
+https://os.mbed.com/users/MikamiUitOpen/code/SerialTxRxIntr/#deeef404ff49
--- a/Xfer.hpp	Tue Jan 28 12:55:59 2020 +0000
+++ b/Xfer.hpp	Wed Feb 05 08:58:16 2020 +0000
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------
 //  スペクトル解析の結果を PC へ転送するためのクラス
 //
-//  2019/11/16, Copyright (c) 2019 MIKAMI, Naoki
+//  2020/02/05, Copyright (c) 2020 MIKAMI, Naoki
 //---------------------------------------------------------------------
 
 #include <string>
@@ -31,7 +31,7 @@
             xn_[n] = (uint16_t)xDb;
         }
     }
-    
+
     // データを PC へ転送(0 ~ 10,000 の範囲の値を 2 文字で表すコード化を利用)
     void ToPC()
     {
@@ -42,8 +42,8 @@
             str += a.quot + 0x10;
             str += a.rem + 0x10;
         }
-        rxTx_.Tx(str+"\n");
-        rxTx_.Tx("EOT\n");
+        rxTx_.TxString(str+"\n");
+        rxTx_.TxString("EOT\n");
     }
     
 private:
@@ -55,5 +55,4 @@
     Xfer(const Xfer&);
     Xfer& operator=(const Xfer&);
 };
-#endif  // XFER_CONVERT_TOPC_HPP
-
+#endif  // XFER_CONVERT_TOPC_HPP
\ No newline at end of file
--- a/main.cpp	Tue Jan 28 12:55:59 2020 +0000
+++ b/main.cpp	Wed Feb 05 08:58:16 2020 +0000
@@ -15,7 +15,7 @@
 //
 //  PC 側のプログラムのフォルダ:プログラム\PC\F446_FFT_Analyzer
 //
-//  2020/01/28, Copyright (c) 2020 MIKAMI, Naoki
+//  2020/02/05, Copyright (c) 2020 MIKAMI, Naoki
 //---------------------------------------------------------------------
 
 #include "mbed.h"
@@ -80,7 +80,8 @@
         {
             string str = rxTx.GetBuffer();
             if (str == "FFTAnalyzer")
-                rxTx.Tx("ACK\n");  // PC からの "FFTAnalyzer" に対して "ACK" を送信
+////                rxTx.Tx("ACK\n");  // PC からの "FFTAnalyzer" に対して "ACK" を送信
+                rxTx.TxString("ACK\n"); // PC からの "FFTAnalyzer" に対して "ACK" を送信
             else if (str == "GO") okGo = true;  // データの転送要求あり
         }
 
@@ -104,5 +105,4 @@
             okGo = false;
         }
     }
-}
-
+}
\ No newline at end of file