RA Flexible Software Package Documentation
Release v5.7.0
|
|
Interface for D/A converters.
The DAC interface provides standard Digital/Analog Converter functionality. A DAC application writes digital sample data to the device and generates analog output on the DAC output pin.
Data Structures | |
struct | dac_info_t |
struct | dac_cfg_t |
struct | dac_api_t |
struct | dac_instance_t |
Typedefs | |
typedef void | dac_ctrl_t |
Enumerations | |
enum | dac_data_format_t |
struct dac_info_t |
struct dac_cfg_t |
struct dac_api_t |
DAC driver structure. General DAC functions implemented at the HAL layer follow this API.
Data Fields | |
fsp_err_t(* | open )(dac_ctrl_t *const p_ctrl, dac_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(dac_ctrl_t *const p_ctrl) |
fsp_err_t(* | write )(dac_ctrl_t *const p_ctrl, uint16_t value) |
fsp_err_t(* | start )(dac_ctrl_t *const p_ctrl) |
fsp_err_t(* | stop )(dac_ctrl_t *const p_ctrl) |
fsp_err_t(* dac_api_t::open) (dac_ctrl_t *const p_ctrl, dac_cfg_t const *const p_cfg) |
Initial configuration.
[in] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_cfg | Pointer to configuration structure. All elements of this structure must be set by user. |
fsp_err_t(* dac_api_t::close) (dac_ctrl_t *const p_ctrl) |
Close the D/A Converter.
[in] | p_ctrl | Control block set in dac_api_t::open call for this timer. |
fsp_err_t(* dac_api_t::write) (dac_ctrl_t *const p_ctrl, uint16_t value) |
Write sample value to the D/A Converter.
[in] | p_ctrl | Control block set in dac_api_t::open call for this timer. |
[in] | value | Sample value to be written to the D/A Converter. |
fsp_err_t(* dac_api_t::start) (dac_ctrl_t *const p_ctrl) |
Start the D/A Converter if it has not been started yet.
[in] | p_ctrl | Control block set in dac_api_t::open call for this timer. |
fsp_err_t(* dac_api_t::stop) (dac_ctrl_t *const p_ctrl) |
Stop the D/A Converter if the converter is running.
[in] | p_ctrl | Control block set in dac_api_t::open call for this timer. |
struct dac_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
dac_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
dac_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
dac_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void dac_ctrl_t |
DAC control block. Allocate an instance specific control block to pass into the DAC API calls.
enum dac_data_format_t |