IDAC - Current DAC
Description
Current Digital-to-Analog Converter (IDAC) Peripheral API.
IDAC can source or sink a configurable constant current, which can be output on, or sinked from pin or ADC. Current is configurable with several ranges of various step sizes. IDAC can be used with PRS and can operate down to EM3.
The following steps are necessary for basic operation:
Clock enable:
/* IDAC is a HFPERCLK peripheral */
Initialize peripheral with default settings and modify selected fields, such as output select:
/* Initialize with default settings. Change output to APORT1YCH1. */
IDAC_Init_TypeDef
init =
IDAC_INIT_DEFAULT
;
init.
outMode
=
idacOutputAPORT1YCH1
;
IDAC_Init
(IDAC0, &init);
Set output:
Data Structures |
|
struct | IDAC_Init_TypeDef |
IDAC initialization structure, common for both channels.
|
|
Functions |
|
void | IDAC_Init (IDAC_TypeDef *idac, const IDAC_Init_TypeDef *init) |
Initialize IDAC.
|
|
void | IDAC_Enable (IDAC_TypeDef *idac, bool enable) |
Enable/disable IDAC.
|
|
void | IDAC_Reset (IDAC_TypeDef *idac) |
Reset IDAC to the same state that it was in after a hardware reset.
|
|
void | IDAC_MinimalOutputTransitionMode (IDAC_TypeDef *idac, bool enable) |
Enable/disable Minimal Output Transition mode.
|
|
void | IDAC_RangeSet (IDAC_TypeDef *idac, const IDAC_Range_TypeDef range) |