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.
Dependents: F446_DSP_Oscilloscope Demo_DSP_ADDA_Dual TrG_Oscilloscope
DSP_DacDual.cpp
00001 //-------------------------------------------------------- 00002 // STM32F446 内蔵の DAC 用のクラス 00003 // A2 (PA_4): 左 00004 // D13 (PA_5): 右 00005 // 00006 // 2020/09/22, Copyright (c) 2020 MIKAMI, Naoki 00007 //-------------------------------------------------------- 00008 00009 #include "DSP_DacDual.hpp" 00010 00011 namespace Mikami 00012 { 00013 // コンストラクタ 00014 DspDacDual::DspDacDual() : DAC_(DAC1) 00015 { 00016 // DAC で使うピンに対応する GPIOx_MODER をアナログ・モードに設定する 00017 pin_function(PA_4, STM_MODE_ANALOG); 00018 pin_function(PA_5, STM_MODE_ANALOG); 00019 00020 __HAL_RCC_DAC_CLK_ENABLE(); // DAC にクロックを供給する 00021 // __HAL_RCC_DAC_CLK_ENABLE() の定義:stm32f4xx_hal_rcc_ex.h 00022 00023 DAC_->CR = DAC_CR_EN1 | DAC_CR_EN2; 00024 } 00025 }
Generated on Tue Jul 19 2022 03:14:12 by
