InES Hardware Abstraction Layer
|
Interface of module hal_dac. More...
Go to the source code of this file.
Data Structures | |
struct | hal_dac_init_t |
Initialization structure for digital analog converter. More... | |
Enumerations | |
enum | hal_dac_channel_t { HAL_DAC_CH1 = 0u, HAL_DAC_CH2 = 16u } |
Defines the channel of a DAC. More... | |
enum | hal_dac_trg_t { HAL_DAC_TRG_TIM6 = 0u, HAL_DAC_TRG_TIM8 = 1u, HAL_DAC_TRG_TIM7 = 2u, HAL_DAC_TRG_TIM5 = 3u, HAL_DAC_TRG_TIM2 = 4u, HAL_DAC_TRG_TIM4 = 5u, HAL_DAC_TRG_EXTI9 = 6u, HAL_DAC_TRG_SW = 7u } |
Defines the available trigger inputs. More... | |
Functions | |
void | hal_dac_reset (reg_dac_t *dac) __attribute__((deprecated("Please use DACx_RESET()."))) |
Resets DAC to default values. More... | |
void | hal_dac_init (reg_dac_t *dac, hal_dac_channel_t channel, hal_dac_init_t init) |
Initializes the specified digital analog converter. More... | |
void | hal_dac_set_dma (reg_dac_t *dac, hal_dac_channel_t channel, hal_bool_t status) |
Enables DMA on specified DAC. More... | |
Interface of module hal_dac.
The hardware abstraction layer for the digital analog converter.
enum hal_dac_channel_t |
enum hal_dac_trg_t |
void hal_dac_init | ( | reg_dac_t * | dac, |
hal_dac_channel_t | channel, | ||
hal_dac_init_t | init | ||
) |
Initializes the specified digital analog converter.
dac | : Defines DAC to interact with. |
channel | : Defines DAC channel to initialize. |
init | : Structure with DAC configuration. |
void hal_dac_reset | ( | reg_dac_t * | dac | ) |
Resets DAC to default values.
dac | : Defines DAC to reset. |
void hal_dac_set_dma | ( | reg_dac_t * | dac, |
hal_dac_channel_t | channel, | ||
hal_bool_t | status | ||
) |
Enables DMA on specified DAC.
dac | : Defines DAC to interact with. |
channel | : Defines DAC channel to interact with. |
status | : ENABLE/DISABLE DMA on specified DAC. |