![]() |
G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
|
Header file of DAC DDL module. More...
#include "g32r4xx.h"Go to the source code of this file.
Data Structures | |
| struct | DDL_DAC_InitTypeDef |
| Structure definition of some features of DAC instance. More... | |
Macros | |
| #define | DDL_DAC_ENABLE (DAC_CR_EN) |
| #define | DDL_DAC_DISABLE (0x00000000UL) |
| #define | DDL_DAC_TRG1 (DAC_CR_TSEL_0) |
| #define | DDL_DAC_TRG2 (DAC_CR_TSEL_1) |
| #define | DDL_DAC_TRG3 (DAC_CR_TSEL_1 | DAC_CR_TSEL_0) |
| #define | DDL_DAC_TRG4 (DAC_CR_TSEL_2) |
| #define | DDL_DAC_TRG5 (DAC_CR_TSEL_2 | DAC_CR_TSEL_0) |
| #define | DDL_DAC_TRG6 (DAC_CR_TSEL_2 | DAC_CR_TSEL_1) |
| #define | DDL_DAC_TRG7 (DAC_CR_TSEL_2 | DAC_CR_TSEL_1 | DAC_CR_TSEL_0) |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_SOFTWARE (0x00000000UL) |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_TMR1 DDL_DAC_TRG1 |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_TMR2 DDL_DAC_TRG2 |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_TMR3 DDL_DAC_TRG3 |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_TMR4 DDL_DAC_TRG4 |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_EINT_LINE0 DDL_DAC_TRG5 |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_EINT_LINE2 DDL_DAC_TRG6 |
| #define | DDL_DAC_CHANNEL_TRIG_SOURCE_EINT_LINE11 DDL_DAC_TRG7 |
| #define | DDL_DAC_NONE_MASK_LFSR_0_0 (0x00000000UL) |
| #define | DDL_DAC_NONE_MASK_LFSR_1_0 (DAC_CR_MAMP_0) |
| #define | DDL_DAC_NONE_MASK_LFSR_2_0 (DAC_CR_MAMP_1) |
| #define | DDL_DAC_NONE_MASK_LFSR_3_0 (DAC_CR_MAMP_1 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_NONE_MASK_LFSR_4_0 (DAC_CR_MAMP_2) |
| #define | DDL_DAC_NONE_MASK_LFSR_5_0 (DAC_CR_MAMP_2 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_NONE_MASK_LFSR_6_0 (DAC_CR_MAMP_2 | DAC_CR_MAMP_1) |
| #define | DDL_DAC_NONE_MASK_LFSR_7_0 (DAC_CR_MAMP_2 | DAC_CR_MAMP_1 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_NONE_MASK_LFSR_8_0 (DAC_CR_MAMP_3) |
| #define | DDL_DAC_NONE_MASK_LFSR_9_0 (DAC_CR_MAMP_3 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_1 (0x00000000UL) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_3 (DAC_CR_MAMP_0) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_7 (DAC_CR_MAMP_1) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_15 (DAC_CR_MAMP_1 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_31 (DAC_CR_MAMP_2) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_63 (DAC_CR_MAMP_2 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_127 (DAC_CR_MAMP_2 | DAC_CR_MAMP_1) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_255 (DAC_CR_MAMP_2 | DAC_CR_MAMP_1 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_511 (DAC_CR_MAMP_3) |
| #define | DDL_DAC_TRI_WAVE_AMPLITUDE_1023 (DAC_CR_MAMP_3 | DAC_CR_MAMP_0) |
| #define | DDL_DAC_WAVE_GENERATE_NONE (0x00000000UL) |
| #define | DDL_DAC_WAVE_GENERATE_NOISE (DAC_CR_WAVE_0) |
| #define | DDL_DAC_WAVE_GENERATE_TRIANGLE (DAC_CR_WAVE_1) |
| #define | DDL_DAC_WAVE_GENERATE_SAWTOOTH (DAC_CR_WAVE_1 | DAC_CR_WAVE_0) |
| #define | DDL_DAC_OUTPUT_BUFFER_INTERNAL (0x00000000UL) |
| #define | DDL_DAC_OUTPUT_BUFFER_EXTERNAL (DAC_CR_EXT_SEL) |
| #define | DDL_DAC_SAWTOOTH_WAVE_DIRECTION_INCREASING (DAC_STR_STDIR) |
| #define | DDL_DAC_SAWTOOTH_WAVE_DIRECTION_DECREASING (0x00000000UL) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_SOFTWARE (0x00000000UL) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_TRG1 (DAC_STMODR_STRSTTRIGSEL_0) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_TRG2 (DAC_STMODR_STRSTTRIGSEL_1) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_TRG3 (DAC_STMODR_STRSTTRIGSEL_1 | DAC_STMODR_STRSTTRIGSEL_0) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_TRG4 (DAC_STMODR_STRSTTRIGSEL_2) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_TRG5 (DAC_STMODR_STRSTTRIGSEL_2 | DAC_STMODR_STRSTTRIGSEL_0) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_TRG6 (DAC_STMODR_STRSTTRIGSEL_2 | DAC_STMODR_STRSTTRIGSEL_1) |
| #define | DDL_DAC_SAWTOOTH_WAVE_RESET_TRIG_SOURCE_TRG7 (DAC_STMODR_STRSTTRIGSEL_2 | DAC_STMODR_STRSTTRIGSEL_1 | DAC_STMODR_STRSTTRIGSEL_0) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_SOFTWARE (0x00000000UL) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_TRG1 (DAC_STMODR_STINCTRIGSEL_0) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_TRG2 (DAC_STMODR_STINCTRIGSEL_1) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_TRG3 (DAC_STMODR_STINCTRIGSEL_1 | DAC_STMODR_STINCTRIGSEL_0) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_TRG4 (DAC_STMODR_STINCTRIGSEL_2) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_TRG5 (DAC_STMODR_STINCTRIGSEL_2 | DAC_STMODR_STINCTRIGSEL_0) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_TRG6 (DAC_STMODR_STINCTRIGSEL_2 | DAC_STMODR_STINCTRIGSEL_1) |
| #define | DDL_DAC_SAWTOOTH_WAVE_INCREMENT_TRIG_SOURCE_TRG7 (DAC_STMODR_STINCTRIGSEL_2 | DAC_STMODR_STINCTRIGSEL_1 | DAC_STMODR_STINCTRIGSEL_0) |
| #define | DDL_DAC_DOR_DATA_OVERFLOW_NOT_OCCURRED (0x00000000UL) |
| #define | DDL_DAC_DOR_DATA_OVERFLOW_OCCURRED (DAC_SR_UP_OW_FLAG) |
| #define | DDL_DAC_DOR_DATA_UNDERFLOW_NOT_OCCURRED (0x00000000UL) |
| #define | DDL_DAC_DOR_DATA_UNDERFLOW_OCCURRED (DAC_SR_DOWN_OW_FLAG) |
| #define | __DAC_PTR_REG_OFFSET(__REG__, __REG_OFFFSET__) |
| Driver macro reserved for internal use: set a pointer to a register from a register basis from which an offset is applied. | |
Functions | |
| __STATIC_INLINE void | DDL_DAC_Enable (DAC_TypeDef *DACx) |
| Enable DAC. | |
| __STATIC_INLINE void | DDL_DAC_Disable (DAC_TypeDef *DACx) |
| Disable DAC. | |
| __STATIC_INLINE uint32_t | DDL_DAC_IsEnabled (DAC_TypeDef *DACx) |
| Get the status of whether DAC is enabled. | |
| __STATIC_INLINE void | DDL_DAC_SetChannelTriggerSource (DAC_TypeDef *DACx, uint32_t Source) |
| Set the trigger source for the channel. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetChannelTriggerSource (DAC_TypeDef *DACx) |
| Get the trigger source for the channel. | |
| __STATIC_INLINE void | DDL_DAC_LFSR_SetNoneMask (DAC_TypeDef *DACx, uint32_t mask) |
| Set the masking bits of the LFSR channel. | |
| __STATIC_INLINE uint32_t | DDL_DAC_LFSR_GetNoneMask (DAC_TypeDef *DACx) |
| Get the masking bits of the LFSR channel. | |
| __STATIC_INLINE void | DDL_DAC_SetTriangleWaveAmplitude (DAC_TypeDef *DACx, uint32_t waveAmp) |
| Set the triangle wave amplitude selector. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetTriangleWaveAmplitude (DAC_TypeDef *DACx) |
| Get the triangle wave amplitude selector. | |
| __STATIC_INLINE void | DDL_DAC_SetWaveGenerateType (DAC_TypeDef *DACx, uint32_t type) |
| Set the type of waveform generated. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetWaveGenerateType (DAC_TypeDef *DACx) |
| Get the type of waveform generated. | |
| __STATIC_INLINE void | DDL_DAC_EnableSoftwareTrigger (DAC_TypeDef *DACx) |
| Enable the channel software triggers the generation of waveforms. | |
| __STATIC_INLINE void | DDL_DAC_EnableResistorStringOutputToOpAmplifier (DAC_TypeDef *DACx) |
| Enable DAC resistor string output signal to operational amplifier input. | |
| __STATIC_INLINE void | DDL_DAC_DisableResistorStringOutputToOpAmplifier (DAC_TypeDef *DACx) |
| Disable DAC resistor string output signal to operational amplifier input. | |
| __STATIC_INLINE void | DDL_DAC_SetBufferOutputSource (DAC_TypeDef *DACx, uint32_t outputBufferSource) |
| Set whether the BUFFER output is connected to the PAD. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetBufferOutputSource (DAC_TypeDef *DACx) |
| Get whether the BUFFER output is connected to the PAD. | |
| __STATIC_INLINE void | DDL_DAC_SetRightAlignmentData (DAC_TypeDef *DACx, uint32_t data) |
| Set right-aligned data register. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetRightAlignmentData (DAC_TypeDef *DACx) |
| Get right-aligned data register. | |
| __STATIC_INLINE void | DDL_DAC_SetLeftAlignmentData (DAC_TypeDef *DACx, uint32_t data) |
| Set left-aligned data register. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetLeftAlignmentData (DAC_TypeDef *DACx) |
| Get left-aligned data register. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetOutputData (DAC_TypeDef *DACx) |
| Get data output data register. | |
| __STATIC_INLINE void | DDL_DAC_EnableSawtoothSoftwareTriggerB (DAC_TypeDef *DACx) |
| Enable channel software trigger to generate sawtooth wave incrementally. | |
| __STATIC_INLINE void | DDL_DAC_SetSawtoothResetValue (DAC_TypeDef *DACx, uint32_t value) |
| Set channel sawtooth reset value. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetSawtoothResetValue (DAC_TypeDef *DACx) |
| Get channel sawtooth reset value. | |
| __STATIC_INLINE void | DDL_DAC_SetSawtoothDirection (DAC_TypeDef *DACx, uint32_t Direction) |
| Set DAC channel sawtooth wave direction. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetSawtoothDirection (DAC_TypeDef *DACx) |
| Get DAC channel sawtooth wave direction. | |
| __STATIC_INLINE void | DDL_DAC_SetSawtoothIncrementValue (DAC_TypeDef *DACx, uint32_t value) |
| Set the increment value of the DAC channel sawtooth wave. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetSawtoothIncrementValue (DAC_TypeDef *DACx) |
| Get the increment value of the DAC channel sawtooth wave. | |
| __STATIC_INLINE void | DDL_DAC_SetSawtoothResetTriggerSource (DAC_TypeDef *DACx, uint32_t source) |
| Set the sawtooth wave reset trigger source. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetSawtoothResetTriggerSource (DAC_TypeDef *DACx) |
| Get the sawtooth wave reset trigger source. | |
| __STATIC_INLINE void | DDL_DAC_SetSawtoothIncrementTriggerSource (DAC_TypeDef *DACx, uint32_t source) |
| Set the sawtooth wave increment trigger source. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetSawtoothIncrementTriggerSource (DAC_TypeDef *DACx) |
| Get the sawtooth wave increment trigger source. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetDORDataOverFlowStatus (DAC_TypeDef *DACx) |
| Get DOR data overflow status. | |
| __STATIC_INLINE void | DDL_DAC_ClearDORDataOverFlowStatus (DAC_TypeDef *DACx) |
| Clear DOR data overflow status. | |
| __STATIC_INLINE uint32_t | DDL_DAC_GetDORDataUnderFlowStatus (DAC_TypeDef *DACx) |
| Get DOR data underflow status. | |
| __STATIC_INLINE void | DDL_DAC_ClearDORDataUnderFlowStatus (DAC_TypeDef *DACx) |
| Clear DOR data underflow status. | |
| ErrorStatus | DDL_DAC_DeInit (DAC_TypeDef *DACx) |
| Initialization and de-initialization functions. | |
| ErrorStatus | DDL_DAC_Init (DAC_TypeDef *DACx, DDL_DAC_InitTypeDef *DAC_InitStruct) |
| Initialize some features of DAC channel. or one of the supported autogenerated wave. | |
| void | DDL_DAC_StructInit (DDL_DAC_InitTypeDef *DAC_InitStruct) |
| Set each DDL_DAC_InitTypeDef field to default value. | |
Header file of DAC DDL module.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The original code has been modified by Geehy Semiconductor.
Copyright (c) 2016 STMicroelectronics. Copyright (C) 2025 Geehy Semiconductor. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file g32r4xx_ddl_dac.h.