STM8L15x Standard Peripherals Drivers
|
stm8l15x_dac.h File Reference
This file contains all the functions prototypes for the DAC firmware library. More...
#include "stm8l15x.h"
Go to the source code of this file.
Defines | |
#define | CH1RDHRH_Offset ((uint8_t)0x08) |
#define | CH2RDHRH_Offset ((uint8_t)0x14) |
#define | CR1_Offset ((uint8_t)0x00) |
#define | CR2_Offset ((uint8_t)0x01) |
#define | DAC_NoiseWaveLFSR DAC_SetNoiseWaveLFSR |
#define | DAC_TriangleWaveAmplitude DAC_SetTriangleWaveAmplitude |
#define | DCH1RDHRH_Offset ((uint8_t)0x20) |
#define | IS_DAC_ALIGN(ALIGN) |
#define | IS_DAC_CHANNEL(CHANNEL) |
#define | IS_DAC_DATA_08R(DATA) ((DATA) <= 0x00FF) |
#define | IS_DAC_FLAG(FLAG) (((FLAG) == DAC_FLAG_DMAUDR)) |
#define | IS_DAC_GET_FLAG(FLAG) (((FLAG) == DAC_FLAG_DMAUDR)) |
#define | IS_DAC_IT(IT) (((IT) == DAC_IT_DMAUDR)) |
#define | IS_DAC_LFSR_UNMASK_TRIANGLE_AMPLITUDE(VALUE) ((VALUE) <= 0x0F) |
#define | IS_DAC_OUTPUT_BUFFER_STATE(STATE) |
#define | IS_DAC_TRIGGER(TRIGGER) |
#define | IS_DAC_WAVE(WAVE) |
Enumerations | |
enum | DAC_Align_TypeDef { DAC_Align_12b_R = ((uint8_t)0x00), DAC_Align_12b_L = ((uint8_t)0x04), DAC_Align_8b_R = ((uint8_t)0x08) } |
enum | DAC_Channel_TypeDef { DAC_Channel_1 = ((uint8_t)0x00), DAC_Channel_2 = ((uint8_t)0x01) } |
enum | DAC_FLAG_TypeDef { DAC_FLAG_DMAUDR = ((uint8_t)0x01) } |
enum | DAC_IT_TypeDef { DAC_IT_DMAUDR = ((uint8_t)0x20) } |
enum | DAC_LFSRUnmask_TypeDef { DAC_LFSRUnmask_Bit0 = ((uint8_t)0x00), DAC_LFSRUnmask_Bits1_0 = ((uint8_t)0x01), DAC_LFSRUnmask_Bits2_0 = ((uint8_t)0x02), DAC_LFSRUnmask_Bits3_0 = ((uint8_t)0x03), DAC_LFSRUnmask_Bits4_0 = ((uint8_t)0x04), DAC_LFSRUnmask_Bits5_0 = ((uint8_t)0x05), DAC_LFSRUnmask_Bits6_0 = ((uint8_t)0x06), DAC_LFSRUnmask_Bits7_0 = ((uint8_t)0x07), DAC_LFSRUnmask_Bits8_0 = ((uint8_t)0x08), DAC_LFSRUnmask_Bits9_0 = ((uint8_t)0x09), DAC_LFSRUnmask_Bits10_0 = ((uint8_t)0x0A), DAC_LFSRUnmask_Bits11_0 = ((uint8_t)0x0B) } |
enum | DAC_OutputBuffer_TypeDef { DAC_OutputBuffer_Enable = ((uint8_t)0x00), DAC_OutputBuffer_Disable = ((uint8_t)0x02) } |
enum | DAC_TriangleAmplitude_TypeDef { DAC_TriangleAmplitude_1 = ((uint8_t)0x00), DAC_TriangleAmplitude_3 = ((uint8_t)0x01), DAC_TriangleAmplitude_7 = ((uint8_t)0x02), DAC_TriangleAmplitude_15 = ((uint8_t)0x03), DAC_TriangleAmplitude_31 = ((uint8_t)0x04), DAC_TriangleAmplitude_63 = ((uint8_t)0x05), DAC_TriangleAmplitude_127 = ((uint8_t)0x06), DAC_TriangleAmplitude_255 = ((uint8_t)0x07), DAC_TriangleAmplitude_511 = ((uint8_t)0x08), DAC_TriangleAmplitude_1023 = ((uint8_t)0x09), DAC_TriangleAmplitude_2047 = ((uint8_t)0x0A), DAC_TriangleAmplitude_4095 = ((uint8_t)0x0B) } |
enum | DAC_Trigger_TypeDef { DAC_Trigger_None = ((uint8_t)0x30), DAC_Trigger_T4_TRGO = ((uint8_t)0x00), DAC_Trigger_T5_TRGO = ((uint8_t)0x08), DAC_Trigger_Ext = ((uint8_t)0x10), DAC_Trigger_Software = ((uint8_t)0x38) } |
enum | DAC_Wave_TypeDef { DAC_Wave_Noise = ((uint8_t)0x40), DAC_Wave_Triangle = ((uint8_t)0x80) } |
Functions | |
void | DAC_ClearFlag (DAC_Channel_TypeDef DAC_Channel, DAC_FLAG_TypeDef DAC_FLAG) |
Clears the DAC channel's pending flags. | |
void | DAC_ClearITPendingBit (DAC_Channel_TypeDef DAC_Channel, DAC_IT_TypeDef DAC_IT) |
Clears the DAC channel's interrupt pending bits. | |
void | DAC_Cmd (DAC_Channel_TypeDef DAC_Channel, FunctionalState NewState) |
Enables or disables the specified DAC channel. | |
void | DAC_DeInit (void) |
Deinitializes the DAC peripheral registers to their default reset values. | |
void | DAC_DMACmd (DAC_Channel_TypeDef DAC_Channel, FunctionalState NewState) |
Enables or disables the specified DAC channel DMA request. | |
void | DAC_DualSoftwareTriggerCmd (FunctionalState NewState) |
Enables or disables simultaneously the two DAC channels software triggers. | |
uint16_t | DAC_GetDataOutputValue (DAC_Channel_TypeDef DAC_Channel) |
Returns the last data output value of the selected DAC channel. | |
FlagStatus | DAC_GetFlagStatus (DAC_Channel_TypeDef DAC_Channel, DAC_FLAG_TypeDef DAC_FLAG) |
Checks whether the specified DAC flag is set or not. | |
ITStatus | DAC_GetITStatus (DAC_Channel_TypeDef DAC_Channel, DAC_IT_TypeDef DAC_IT) |
Checks whether the specified DAC interrupt has occurred or not. | |
void | DAC_Init (DAC_Channel_TypeDef DAC_Channel, DAC_Trigger_TypeDef DAC_Trigger, DAC_OutputBuffer_TypeDef DAC_OutputBuffer) |
Initializes the DAC according to the specified parameters. | |
void | DAC_ITConfig (DAC_Channel_TypeDef DAC_Channel, DAC_IT_TypeDef DAC_IT, FunctionalState NewState) |
Enables or disables the specified DAC interrupts. | |
void | DAC_SetChannel1Data (DAC_Align_TypeDef DAC_Align, uint16_t DAC_Data) |
Set the specified data holding register value for DAC channel1. | |
void | DAC_SetChannel2Data (DAC_Align_TypeDef DAC_Align, uint16_t DAC_Data) |
Set the specified data holding register value for DAC channel2. | |
void | DAC_SetDualChannelData (DAC_Align_TypeDef DAC_Align, uint16_t DAC_Data2, uint16_t DAC_Data1) |
Set the specified data holding register value for dual channel DAC. | |
void | DAC_SetNoiseWaveLFSR (DAC_Channel_TypeDef DAC_Channel, DAC_LFSRUnmask_TypeDef DAC_LFSRUnmask) |
Select DAC Noise Wave Generation LFSR according to the specified parameters. | |
void | DAC_SetTriangleWaveAmplitude (DAC_Channel_TypeDef DAC_Channel, DAC_TriangleAmplitude_TypeDef DAC_TriangleAmplitude) |
Select DAC Triangle Wave Generation Amplitude according to the specified parameters. | |
void | DAC_SoftwareTriggerCmd (DAC_Channel_TypeDef DAC_Channel, FunctionalState NewState) |
Enables or disables the selected DAC channel software trigger. | |
void | DAC_WaveGenerationCmd (DAC_Channel_TypeDef DAC_Channel, DAC_Wave_TypeDef DAC_Wave, FunctionalState NewState) |
Enables or disables the selected DAC channel wave generation. |
Detailed Description
This file contains all the functions prototypes for the DAC firmware library.
- Attention:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
© COPYRIGHT 2011 STMicroelectronics
Definition in file stm8l15x_dac.h.