dac8 2.0.0.0
|
Functions | |
void | dac8_cfg_setup (dac8_cfg_t *cfg) |
Config Object Initialization function. | |
DAC8_RETVAL | dac8_init (dac8_t *ctx, dac8_cfg_t *cfg, uint8_t master_mode) |
Initialization function. | |
void | dac8_generic_write (dac8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | dac8_generic_read (dac8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
DAC8_RETVAL | dac8_enable_sync (dac8_t *ctx, uint8_t en_sync) |
Enable synchronous function. | |
DAC8_RETVAL | dac8_set_config (dac8_t *ctx, uint16_t en_ref_pwdwn, uint16_t en_dac_pwdwn) |
Set config function. | |
DAC8_RETVAL | dac8_set_gain (dac8_t *ctx, uint16_t en_ref_div, uint16_t en_buff_gain) |
Set gain function. | |
void | dac8_set_synchronously_load (dac8_t *ctx) |
Set synchronously load function. | |
void | dac8_soft_reset (dac8_t *ctx) |
Set reset function. | |
uint8_t | dac8_get_ref_alarm (dac8_t *ctx) |
Get ref alarm function. | |
DAC8_RETVAL | dac8_set_vref (dac8_t *ctx, uint16_t vref_mv) |
Set vref function. | |
void | dac8_device_enable (dac8_t *ctx, uint8_t en_sel) |
Device enable function. | |
void | dac8_set_ldac (dac8_t *ctx, uint8_t ldac_sel) |
Set LDAC function. | |
void | dac8_load_dac (dac8_t *ctx) |
Load DAC function. | |
void | dac8_generic_spi_write (dac8_t *ctx, uint32_t tx_data) |
Generic SPI write function. | |
void | dac8_device_config (dac8_t *ctx, dac8_cfg_data_t cfg_data) |
Set device config function. | |
void dac8_cfg_setup | ( | dac8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void dac8_device_config | ( | dac8_t * | ctx, |
dac8_cfg_data_t | cfg_data ) |
Set device config function.
ctx | Click object. |
dac8_cfg_t | Structure where data be stored. |
@description The function set configuration of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.
void dac8_device_enable | ( | dac8_t * | ctx, |
uint8_t | en_sel ) |
Device enable function.
ctx | Click object. |
en_sel | - 0x00 ( DAC8_DAC8554_DISABLE ) : Disable. - 0x01 ( DAC8_DAC8554_ENABLE ) : Enable. |
@description The function device enable - EN ( RST ) pin tied to a logic high or disable - tied to a logic low of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.
DAC8_RETVAL dac8_enable_sync | ( | dac8_t * | ctx, |
uint8_t | en_sync ) |
Enable synchronous function.
ctx | Click object. |
en_sync | - 0x0000 ( DAC8_SYNC_DISABLE ) : Asynchronous mode. - 0x0001 ( DAC8_SYNC_ENABLE ) : Synchronous mode. |
status | - 0x00 ( DAC8_ERROR ) : Error. - 0x01 ( DAC8_SUCCESS ) : Success. |
@description The function set synchronous or asynchronous mode of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.
void dac8_generic_read | ( | dac8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function reads data from the desired register.
void dac8_generic_spi_write | ( | dac8_t * | ctx, |
uint32_t | tx_data ) |
Generic SPI write function.
ctx | Click object. |
tx_data | 24-bit data to write. |
@description The function write the 24-bit data to the shift registe of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.
void dac8_generic_write | ( | dac8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function writes data to the desired register.
uint8_t dac8_get_ref_alarm | ( | dac8_t * | ctx | ) |
Get ref alarm function.
ctx | Click object. |
return | - 0x00 : Ok. - 0x01 : Difference between the reference and supply pins is below a minimum analog threshold. |
@description The function get reference alarm of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.
DAC8_RETVAL dac8_init | ( | dac8_t * | ctx, |
dac8_cfg_t * | cfg, | ||
uint8_t | master_mode ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void dac8_load_dac | ( | dac8_t * | ctx | ) |
Load DAC function.
ctx | Click object. |
@description The function load DAC s are simultaneously updated with the contents of the corresponding data buffers. Used as a positive edge triggered timing signal for asynchronous DAC updates. Data buffers of all channels must be loaded with desired data before call Load DAC function.
DAC8_RETVAL dac8_set_config | ( | dac8_t * | ctx, |
uint16_t | en_ref_pwdwn, | ||
uint16_t | en_dac_pwdwn ) |
Set config function.
ctx | Click object. |
en_ref_pwdwn | - 0x0000 ( DAC8_CONFIG_REF_PWDWN_ENABLE ) : Enable the internal reference. - 0x0001 ( DAC8_CONFIG_REF_PWDWN_DISABLE ) : Disables the internal reference. |
en_dac_pwdwn | - 0x0000 ( DAC8_CONFIG_DAC_PWDWN_DISABLE ) : DAC in power-up mode. - 0x0001 ( DAC8_CONFIG_DAC_PWDWN_ENABLE ) : DAC in power-down mode. |
status | - 0x00 ( DAC8_ERROR ) : Error. - 0x01 ( DAC8_SUCCESS ) : Success. |
@description The function set configuration of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.
DAC8_RETVAL dac8_set_gain | ( | dac8_t * | ctx, |
uint16_t | en_ref_div, | ||
uint16_t | en_buff_gain ) |
Set gain function.
ctx | Click object. |
en_ref_div | - 0x0000 ( DAC8_GAIN_REF_DIV_DISABLE ) : Reference voltage is unaffected. - 0x0001 ( DAC8_GAIN_REF_DIV_2 ) : Reference voltage is internally divided by a factor of 2. |
en_buff_gain | - 0x0000 ( DAC8_GAIN_BUFF_GAIN_1 ) : DAC has a gain of 1. - 0x0001 ( DAC8_GAIN_BUFF_GAIN_2 ) : DAC has a gain of 2. |
status | - 0x00 ( DAC8_ERROR ) : Error. - 0x01 ( DAC8_SUCCESS ) : Success. |
@description The function set gain of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.
void dac8_set_ldac | ( | dac8_t * | ctx, |
uint8_t | ldac_sel ) |
Set LDAC function.
ctx | Click object. |
en_sel | - 0x00 ( DAC8_LDAC_LOW ) : Low state. - 0x01 ( DAC8_LDAC_HIGH ) : High state. |
@description The function states of the LD ( PWM ) pin of the DAC8554, 16-bit, quad-channel, ultra-low glitch, voltage output digital-to-analog converter on DAC 8 Click board.
void dac8_set_synchronously_load | ( | dac8_t * | ctx | ) |
Set synchronously load function.
ctx | Click object. |
@description The function set synchronously load the DAC in synchronous mode of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.
DAC8_RETVAL dac8_set_vref | ( | dac8_t * | ctx, |
uint16_t | vref_mv ) |
Set vref function.
ctx | Click object. |
vref_mv | Vref in mV. |
status | - 0x00 ( DAC8_ERROR ) : Error. - 0x01 ( DAC8_SUCCESS ) : Success. |
@description The function set Vref ( mV ) by write 12-bit to the DAC data register of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.
void dac8_soft_reset | ( | dac8_t * | ctx | ) |
Set reset function.
ctx | Click object. |
@description The function set reset of the DAC60501, 16-Bit, 14-Bit, and 12-Bit, 1-LSB INL, Voltage-Output DACs With Precision Internal Reference on DAC 8 Click board.