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: Array_Matrix mbed SerialTxRxIntr UIT_FFT_Real
Diff: ADDA_BasePolling/F446_ADC_Intr.cpp
- Revision:
- 1:a90b573b335a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ADDA_BasePolling/F446_ADC_Intr.cpp Fri Jan 17 02:04:09 2020 +0000
@@ -0,0 +1,22 @@
+//-------------------------------------------------------------
+// F446 内蔵 ADC2 を割込み方式で使うための派生クラス
+// 基底クラス: AdcF446_Polling
+//
+// 2020/01/12, Copyright (c) 2020 MIKAMI, Naoki
+//-------------------------------------------------------------
+
+#include "F446_ADC_Intr.hpp"
+
+namespace Mikami
+{
+ // 割込みベクタの設定と AD 変換割込みを有効にする
+ void AdcF446_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 (*AdcF446_Intr::fp)();
+}