dac4 2.0.0.0
|
Functions | |
void | dac4_cfg_setup (dac4_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | dac4_init (dac4_t *ctx, dac4_cfg_t *cfg) |
Initialization function. | |
void | dac4_generic_write (dac4_t *ctx, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | dac4_generic_read (dac4_t *ctx, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | dac4_int_get (dac4_t *ctx) |
Getting INT pin state. | |
void | dac4_pwm_set (dac4_t *ctx, uint8_t pin_state) |
Setting PWM pin state. | |
void | dac4_i2c_get (dac4_t *ctx, uint8_t *get_buffer, uint16_t n_bytes) |
Getting data via I2C. | |
void | dac4_i2c_set (dac4_t *ctx, uint8_t *set_buffer, uint16_t n_bytes) |
Setting data via I2C. | |
uint8_t | dac4_general_call_reset (dac4_t *ctx) |
Executing reset command. | |
uint8_t | dac4_general_call_wake_up (dac4_t *ctx) |
Executing wake up command. | |
uint8_t | dac4_general_call_software_update (dac4_t *ctx) |
Executing software update command. | |
uint8_t | dac4_fast_write (dac4_t *ctx, dac4_channel_t *channels) |
Executing fast write command. | |
uint8_t | dac4_multi_write (dac4_t *ctx, dac4_channel_setting_t *channel_buffer, uint8_t n_channels) |
Executing multi-write command. | |
uint8_t | dac4_sequential_write (dac4_t *ctx, uint8_t starting_channel, dac4_channel_setting_t *channel_buffer) |
Executing sequential write command. | |
uint8_t | dac4_single_write (dac4_t *ctx, dac4_channel_setting_t *channel_x) |
Executing single write command. | |
uint8_t | dac4_voltage_reference_set (dac4_t *ctx, dac4_v_ref_channels_t *vref) |
Setting channel voltage reference values. | |
uint8_t | dac4_power_mode_set (dac4_t *ctx, dac4_pm_channels_t *pm) |
Setting channel power modes. | |
uint8_t | dac4_gain_set (dac4_t *ctx, dac4_gain_channels_t *gain) |
Writing channel gain values. | |
uint8_t | dac4_data_report (dac4_t *ctx, dac4_channel_setting_t *channel_buffer) |
void dac4_cfg_setup | ( | dac4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint8_t dac4_data_report | ( | dac4_t * | ctx, |
dac4_channel_setting_t * | channel_buffer ) |
uint8_t dac4_fast_write | ( | dac4_t * | ctx, |
dac4_channel_t * | channels ) |
Executing fast write command.
ctx | Click object. |
channels | Settings for channels |
dac_channel_setting_t.rdy_bit - set to 0 dac_channel_setting_t.por_bit - set to 0 dac_channel_setting_t.channel_select - set to 0 dac_channel_setting_t.udac_bit - set to 0 dac_channel_setting_t.voltage_reference - set to 0 dac_channel_setting_t.power_mode - set to desired value dac_channel_setting_t.gain_value - set to 0 dac_channel_setting_t.dac_input_data - set to desired value
uint8_t dac4_gain_set | ( | dac4_t * | ctx, |
dac4_gain_channels_t * | gain ) |
Writing channel gain values.
ctx | Click object. |
uint8_t | gain_channel_a - gain value for channel A |
uint8_t | gain_channel_b - gain value for channel B |
uint8_t | gain_channel_c - gain value for channel C |
uint8_t | gain_channel_d - gain value for channel D |
uint8_t dac4_general_call_reset | ( | dac4_t * | ctx | ) |
Executing reset command.
ctx | Click object. |
uint8_t dac4_general_call_software_update | ( | dac4_t * | ctx | ) |
Executing software update command.
ctx | Click object. |
uint8_t dac4_general_call_wake_up | ( | dac4_t * | ctx | ) |
Executing wake up command.
ctx | Click object. |
void dac4_generic_read | ( | dac4_t * | ctx, |
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
data_buf | Output data buf |
len | Number of the bytes to be read |
This function reads desired number of data bytes.
void dac4_generic_write | ( | dac4_t * | ctx, |
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
This function writes desired number of data bytes.
void dac4_i2c_get | ( | dac4_t * | ctx, |
uint8_t * | get_buffer, | ||
uint16_t | n_bytes ) |
Getting data via I2C.
ctx | Click object. |
uint8_t | get_buffer - data buffer |
uint16_t | n_bytes - number of bytes |
void dac4_i2c_set | ( | dac4_t * | ctx, |
uint8_t * | set_buffer, | ||
uint16_t | n_bytes ) |
Setting data via I2C.
ctx | Click object. |
uint8_t | get_buffer - data buffer |
uint16_t | n_bytes - number of bytes |
err_t dac4_init | ( | dac4_t * | ctx, |
dac4_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint8_t dac4_int_get | ( | dac4_t * | ctx | ) |
Getting INT pin state.
ctx | Click object. |
uint8_t dac4_multi_write | ( | dac4_t * | ctx, |
dac4_channel_setting_t * | channel_buffer, | ||
uint8_t | n_channels ) |
Executing multi-write command.
ctx | Click object. |
dac_channel_setting_t | channel_buffer - channel setting buffer |
uint8_t | n_channels - number of channels |
dac_channel_setting_t.rdy_bit - set to 0 dac_channel_setting_t.por_bit - set to 0 dac_channel_setting_t.channel_select - set to desired value dac_channel_setting_t.udac_bit - set to desired value dac_channel_setting_t.voltage_reference - set to desired value dac_channel_setting_t.power_mode - set to desired value dac_channel_setting_t.gain_value - set to desired value dac_channel_setting_t.dac_input_data - set to desired value
uint8_t dac4_power_mode_set | ( | dac4_t * | ctx, |
dac4_pm_channels_t * | pm ) |
Setting channel power modes.
ctx | Click object. |
uint8_t | pm_channel_a - power mode for channel A |
uint8_t | pm_channel_b - power mode for channel B |
uint8_t | pm_channel_c - power mode for channel C |
uint8_t | pm_channel_d - power mode for channel D |
void dac4_pwm_set | ( | dac4_t * | ctx, |
uint8_t | pin_state ) |
Setting PWM pin state.
ctx | Click object. |
uint8_t | pin_state - pin state |
uint8_t dac4_sequential_write | ( | dac4_t * | ctx, |
uint8_t | starting_channel, | ||
dac4_channel_setting_t * | channel_buffer ) |
Executing sequential write command.
ctx | Click object. |
uint8_t | starting_channel - starting channel |
dac_channel_setting_t | channel_buffer - channel setting buffer |
dac_channel_setting_t.rdy_bit - set to 0 dac_channel_setting_t.por_bit - set to 0 dac_channel_setting_t.channel_select - set to desired value dac_channel_setting_t.udac_bit - set to desired value dac_channel_setting_t.voltage_reference - set to desired value dac_channel_setting_t.power_mode - set to desired value dac_channel_setting_t.gain_value - set to desired value dac_channel_setting_t.dac_input_data - set to desired value
uint8_t dac4_single_write | ( | dac4_t * | ctx, |
dac4_channel_setting_t * | channel_x ) |
Executing single write command.
ctx | Click object. |
dac_channel_setting_t | channel_x[ 0 ] - channel settings |
dac_channel_setting_t.rdy_bit - set to 0 dac_channel_setting_t.por_bit - set to 0 dac_channel_setting_t.channel_select - set to desired value dac_channel_setting_t.udac_bit - set to desired value dac_channel_setting_t.voltage_reference - set to desired value dac_channel_setting_t.power_mode - set to desired value dac_channel_setting_t.gain_value - set to desired value dac_channel_setting_t.dac_input_data - set to desired value
uint8_t dac4_voltage_reference_set | ( | dac4_t * | ctx, |
dac4_v_ref_channels_t * | vref ) |
Setting channel voltage reference values.
ctx | Click object. |
uint8_t | v_ref_channel_a - voltage reference for channel A |
uint8_t | v_ref_channel_b - voltage reference for channel B |
uint8_t | v_ref_channel_c - voltage reference for channel C |
uint8_t | v_ref_channel_d - voltage reference for channel D |