stm32g0: Support DAC
Nothing extra needed to be defined here - this might've just been missed when adding STM32G0 support. Tested and works well on an STM32G051. Registers in `stm32/common/dac_common_v1.h` match the STM32G0x1 reference manual.
This commit is contained in:
committed by
Karl Palsson
parent
e9c68ff9e8
commit
3ab83bc078
@@ -36,6 +36,8 @@
|
||||
# include <libopencm3/stm32/l1/dac.h>
|
||||
#elif defined(STM32L4)
|
||||
# include <libopencm3/stm32/l4/dac.h>
|
||||
#elif defined(STM32G0)
|
||||
# include <libopencm3/stm32/g0/dac.h>
|
||||
#elif defined(STM32G4)
|
||||
# include <libopencm3/stm32/g4/dac.h>
|
||||
#elif defined(STM32H7)
|
||||
|
||||
41
include/libopencm3/stm32/g0/dac.h
Normal file
41
include/libopencm3/stm32/g0/dac.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/** @defgroup dac_defines DAC Defines
|
||||
*
|
||||
* @brief <b>Defined Constants and Types for the STM32G0xx Digital-to-Analog Converter</b>
|
||||
*
|
||||
* @ingroup STM32G0xx_defines
|
||||
*
|
||||
* LGPL License Terms @ref lgpl_license
|
||||
*/
|
||||
/*
|
||||
* This file is part of the libopencm3 project.
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_DAC_H
|
||||
#define LIBOPENCM3_DAC_H
|
||||
|
||||
#include <libopencm3/stm32/common/dac_common_v1.h>
|
||||
|
||||
/**@{*/
|
||||
|
||||
/** @defgroup dac_reg_base DAC register base addresses
|
||||
@{*/
|
||||
#define DAC1 DAC_BASE
|
||||
/**@}*/
|
||||
|
||||
/**@}*/
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user