Added one channel mode
Dependents: CW_Decoder_using_FFT_on_F446
Fork of F446_AD_DA by
Diff: F446_ADC.hpp
- Revision:
- 1:6b9f2af6613d
- Parent:
- 0:c945b4fe9a48
- Child:
- 2:29f9831ce719
diff -r c945b4fe9a48 -r 6b9f2af6613d F446_ADC.hpp --- a/F446_ADC.hpp Fri Nov 11 06:28:48 2016 +0000 +++ b/F446_ADC.hpp Sat Nov 12 04:08:31 2016 +0000 @@ -4,13 +4,16 @@ // // STM32F446 の ADC2, ADC3 を使って同時に AD 変換を開始し, // ポーリングによりアナログ信号を入力するクラス(ヘッダ) -// A0 (PA_0) : ADC2 CH0 -// A1 (PA_1) : ADC3 CH1 +// A0 (PA_0) : ADC2 CH0, 左 +// A1 (PA_1) : ADC3 CH1, 右 +// Read(), Write() の引数: +// 第一引数:A0 (左),第二引数:A1 (右) // -// 2016/11/10, Copyright (c) 2016 MIKAMI, Naoki +// 2016/11/12, Copyright (c) 2016 MIKAMI, Naoki //---------------------------------------------------------- #include "mbed.h" +#include "F446_DAC.hpp" #ifndef STM32F446xx #error Select STM32F446. @@ -28,10 +31,12 @@ // frequency: 標本化周波数 explicit AdcDual(int frequency); - // -1.0f <= data1, data2 <= 1.0f + // -1.0f <= ad1, ad2 <= 1.0f + // ad1: left, ad2: right virtual void Read(float &ad1, float &ad2); - // 0 <= data1, data2 <= 4095 + // 0 <= ad1, ad2 <= 4095 + // ad1: left, ad2: right virtual void Read(uint16_t &ad1, uint16_t &ad2); protected: @@ -55,4 +60,4 @@ AdcDual& operator=(const AdcDual&); }; } -#endif // F446_ADC_DUAL_HPP \ No newline at end of file +#endif // F446_ADC_DUAL_HPP