RTEMS 6.1-rc4
|
Files | |
file | fsl_dac12.h |
Data Structures | |
struct | _dac12_hardware_info |
DAC12 hardware information. More... | |
struct | dac12_config_t |
DAC12 module configuration. More... | |
Driver version | |
enum | _dac12_status_flags { kDAC12_OverflowFlag = DAC_CR_OVFF_MASK , kDAC12_UnderflowFlag = DAC_CR_UDFF_MASK , kDAC12_WatermarkFlag = DAC_CR_WMF_MASK , kDAC12_NearlyEmptyFlag = DAC_CR_NEMPTF_MASK , kDAC12_FullFlag = DAC_CR_FULLF_MASK } |
DAC12 flags. More... | |
enum | _dac12_interrupt_enable { kDAC12_UnderOrOverflowInterruptEnable = DAC_CR_UVIE_MASK , kDAC12_WatermarkInterruptEnable = DAC_CR_WTMIE_MASK , kDAC12_NearlyEmptyInterruptEnable = DAC_CR_EMPTIE_MASK , kDAC12_FullInterruptEnable = DAC_CR_FULLIE_MASK } |
DAC12 interrupts. More... | |
enum | _dac12_fifo_size_info { kDAC12_FIFOSize2 = 0U , kDAC12_FIFOSize4 = 1U , kDAC12_FIFOSize8 = 2U , kDAC12_FIFOSize16 = 3U , kDAC12_FIFOSize32 = 4U , kDAC12_FIFOSize64 = 5U , kDAC12_FIFOSize128 = 6U , kDAC12_FIFOSize256 = 7U } |
DAC12 FIFO size information provided by hardware. More... | |
enum | _dac12_fifo_work_mode { kDAC12_FIFODisabled = 0U , kDAC12_FIFOWorkAsNormalMode = 1U , kDAC12_FIFOWorkAsSwingMode = 2U } |
DAC12 FIFO work mode. More... | |
enum | _dac12_reference_voltage_source { kDAC12_ReferenceVoltageSourceAlt1 = 0U , kDAC12_ReferenceVoltageSourceAlt2 = 1U } |
DAC12 reference voltage source. More... | |
enum | _dac12_fifo_trigger_mode { kDAC12_FIFOTriggerByHardwareMode = 0U , kDAC12_FIFOTriggerBySoftwareMode = 1U } |
DAC12 FIFO trigger mode. More... | |
enum | _dac12_reference_current_source { kDAC12_ReferenceCurrentSourceDisabled = 0U , kDAC12_ReferenceCurrentSourceAlt0 = 1U , kDAC12_ReferenceCurrentSourceAlt1 = 2U , kDAC12_ReferenceCurrentSourceAlt2 = 3U } |
DAC internal reference current source. More... | |
enum | _dac12_speed_mode { kDAC12_SpeedLowMode = 0U , kDAC12_SpeedMiddleMode = 1U , kDAC12_SpeedHighMode = 2U } |
DAC analog buffer speed mode for conversion. More... | |
typedef enum _dac12_fifo_size_info | dac12_fifo_size_info_t |
DAC12 FIFO size information provided by hardware. | |
typedef enum _dac12_fifo_work_mode | dac12_fifo_work_mode_t |
DAC12 FIFO work mode. | |
typedef enum _dac12_reference_voltage_source | dac12_reference_voltage_source_t |
DAC12 reference voltage source. | |
typedef enum _dac12_fifo_trigger_mode | dac12_fifo_trigger_mode_t |
DAC12 FIFO trigger mode. | |
typedef enum _dac12_reference_current_source | dac12_reference_current_source_t |
DAC internal reference current source. | |
typedef enum _dac12_speed_mode | dac12_speed_mode_t |
DAC analog buffer speed mode for conversion. | |
typedef struct _dac12_hardware_info | dac12_hardware_info_t |
DAC12 hardware information. | |
#define | FSL_DAC12_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
DAC12 driver version 2.1.0. | |
#define | DAC12_CR_W1C_FLAGS_MASK (DAC_CR_OVFF_MASK | DAC_CR_UDFF_MASK) |
Define "write 1 to clear" flags. | |
#define | DAC12_CR_ALL_FLAGS_MASK (DAC12_CR_W1C_FLAGS_MASK | DAC_CR_WMF_MASK | DAC_CR_NEMPTF_MASK | DAC_CR_FULLF_MASK) |
Define all the flag bits in DACx_CR register. | |
Initialization and de-initialization | |
void | DAC12_GetHardwareInfo (DAC_Type *base, dac12_hardware_info_t *info) |
Get hardware information about this module. | |
void | DAC12_Init (DAC_Type *base, const dac12_config_t *config) |
Initialize the DAC12 module. | |
void | DAC12_GetDefaultConfig (dac12_config_t *config) |
Initializes the DAC12 user configuration structure. | |
void | DAC12_Deinit (DAC_Type *base) |
De-initialize the DAC12 module. | |
DAC internal reference current source.
Analog module needs reference current to keep working . Such reference current can generated by IP itself, or by on-chip PMC's "reference part". If no current reference be selected, analog module can’t working normally ,even when other register can still be assigned, DAC would waste current but no function. To make the DAC work, either kDAC12_ReferenceCurrentSourceAltx should be selected.
DAC12 FIFO size information provided by hardware.
DAC12 FIFO work mode.
DAC internal reference current source.
Analog module needs reference current to keep working . Such reference current can generated by IP itself, or by on-chip PMC's "reference part". If no current reference be selected, analog module can’t working normally ,even when other register can still be assigned, DAC would waste current but no function. To make the DAC work, either kDAC12_ReferenceCurrentSourceAltx should be selected.
enum _dac12_speed_mode |
enum _dac12_status_flags |
DAC12 flags.
void DAC12_Deinit | ( | DAC_Type * | base | ) |
De-initialize the DAC12 module.
base | DAC12 peripheral base address. |
brief De-initialize the DAC12 module.
param base DAC12 peripheral base address.
void DAC12_GetDefaultConfig | ( | dac12_config_t * | config | ) |
Initializes the DAC12 user configuration structure.
This function initializes the user configuration structure to a default value. The default values are:
config | Pointer to the configuration structure. See "dac12_config_t". |
brief Initializes the DAC12 user configuration structure.
This function initializes the user configuration structure to a default value. The default values are: code config->fifoWatermarkLevel = 0U; config->fifoWorkMode = kDAC12_FIFODisabled; config->referenceVoltageSource = kDAC12_ReferenceVoltageSourceAlt1; config->fifoTriggerMode = kDAC12_FIFOTriggerByHardwareMode; config->referenceCurrentSource = kDAC12_ReferenceCurrentSourceAlt0; config->speedMode = kDAC12_SpeedLowMode; config->speedMode = false; config->currentReferenceInternalTrimValue = 0x4; endcode param config Pointer to the configuration structure. See "dac12_config_t".
void DAC12_GetHardwareInfo | ( | DAC_Type * | base, |
dac12_hardware_info_t * | info | ||
) |
Get hardware information about this module.
base | DAC12 peripheral base address. |
info | Pointer to info structure, see to dac12_hardware_info_t. |
brief Get hardware information about this module.
param base DAC12 peripheral base address. param info Pointer to info structure, see to dac12_hardware_info_t.
void DAC12_Init | ( | DAC_Type * | base, |
const dac12_config_t * | config | ||
) |
Initialize the DAC12 module.
base | DAC12 peripheral base address. |
config | Pointer to configuration structure, see to dac12_config_t. |
brief Initialize the DAC12 module.
param base DAC12 peripheral base address. param config Pointer to configuration structure, see to dac12_config_t.
uint32_t dac12_config_t::currentReferenceInternalTrimValue |
Internal reference current trim value. 3-bit value is available.
bool dac12_config_t::enableAnalogBuffer |
Enable analog buffer for high drive.
dac12_fifo_size_info_t _dac12_hardware_info::fifoSizeInfo |
The number of words in this device's DAC buffer.
uint32_t dac12_config_t::fifoWatermarkLevel |
FIFO's watermark, the max value can be the hardware FIFO size.
dac12_fifo_work_mode_t dac12_config_t::fifoWorkMode |
FIFI's work mode about pointers.
dac12_reference_current_source_t dac12_config_t::referenceCurrentSource |
Select the trigger mode for FIFO. Select the reference current source.
dac12_reference_voltage_source_t dac12_config_t::referenceVoltageSource |
Select the reference voltage source.
dac12_speed_mode_t dac12_config_t::speedMode |
Select the speed mode for conversion.