STM32F446 の内蔵 ADC, DAC を 2 チャンネルで使うためのライブラリ.このライブラリを登録した際のプログラム: Demo_DSP_ADDA_Dual. Library for build-in ADC and DAC in STM32F446 using with dual channels.
Dependents: F446_DSP_Oscilloscope Demo_DSP_ADDA_Dual TrG_Oscilloscope
Diff: DSP_AdcDualBase.hpp
- Revision:
- 1:e1c5baa559de
- Parent:
- 0:c02c700a8ecf
- Child:
- 2:91765f32ab2c
diff -r c02c700a8ecf -r e1c5baa559de DSP_AdcDualBase.hpp --- a/DSP_AdcDualBase.hpp Tue Sep 22 04:52:53 2020 +0000 +++ b/DSP_AdcDualBase.hpp Wed Sep 23 01:49:40 2020 +0000 @@ -6,7 +6,7 @@ // Read(), Write() の引数: // 第一引数:CH1,第二引数:CH2 // -// 2020/09/22, Copyright (c) 2020 MIKAMI, Naoki +// 2020/09/23, Copyright (c) 2020 MIKAMI, Naoki //---------------------------------------------------------- #include "mbed.h" @@ -39,6 +39,10 @@ // -1.0f <= AD変換された値 < 1.0f virtual void Read(float &ad1, float &ad2) const = 0; // 純粋仮想関数 + // AD 変換器の外部トリガに使うタイマ (TIM8) の設定 + // fSampling 標本化周波数 [kHz] + void SetFs(float fSampling); + protected: ADC_TypeDef* adcCh1_; // チャンネル 1 の AD 変換器に対応する構造体のポインタ ADC_TypeDef* adcCh2_; // チャンネル 2 の AD 変換器に対応する構造体のポインタ @@ -51,10 +55,6 @@ // AD 変換器の初期設定 void Initialize(ADC_TypeDef* adc, PinName pin); - // AD 変換器の外部トリガに使うタイマ (TIM8) の設定 - // fSampling 標本化周波数 [kHz] - void SetTim8(float fSampling); - // pin に対応する AD 変換器が存在することを確認する bool PinmapMatch(PinName pin, ADC_TypeDef* const adc);