STM32F446 の内蔵 ADC, DAC 用のライブラリ.このライブラリを登録した際のプログラム: Demo_DSP_ADDA. Library for build-in ADC and DAC in STM32F446.

Dependents:   Demo_DSP_ADDA F446_DSP_FFT_Analyzer TrG_FFT_Analyzer DSP_MultirateLinearphase ... more

Revision:
1:d6121b7a8d51
Child:
3:a1dcee67c67e
diff -r 85348d58f498 -r d6121b7a8d51 DSP_AdcIntr.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DSP_AdcIntr.cpp	Fri May 22 08:35:56 2020 +0000
@@ -0,0 +1,22 @@
+//-------------------------------------------------------------
+//  STM32F446 内蔵 ADC を割込み方式で使うための派生クラス
+//      基底クラス: DspAdc_Base
+//
+//  2020/05/22, Copyright (c) 2020 MIKAMI, Naoki
+//-------------------------------------------------------------
+
+#include "DSP_AdcIntr.hpp"
+
+namespace Mikami
+{
+    // 割込みベクタの設定と AD 変換割込みを有効にする
+    void DspAdc_Intr::SetIntrVec(void (*Func)())
+    {
+        fp_ = Func;         // 引数として渡された処理を割り当てる
+        NVIC_SetVector(ADC_IRQn, (uint32_t)Isr);    // "core_cm4.h" 参照
+        NVIC_EnableIRQ(ADC_IRQn);                   // "core_cm4.h" 参照
+    }    
+
+    // static メンバの実体
+    void (*DspAdc_Intr::fp_)();
+}
\ No newline at end of file