dac17 2.1.0.0
|
API for configuring and manipulating DAC 17 Click driver. More...
Modules | |
DAC 17 Registers List | |
List of registers of DAC 17 Click driver. | |
DAC 17 Registers Settings | |
Settings for registers of DAC 17 Click driver. | |
DAC 17 MikroBUS Map | |
MikroBUS pin mapping of DAC 17 Click driver. | |
Functions | |
void | dac17_cfg_setup (dac17_cfg_t *cfg) |
DAC 17 configuration object setup function. More... | |
err_t | dac17_init (dac17_t *ctx, dac17_cfg_t *cfg) |
DAC 17 initialization function. More... | |
err_t | dac17_default_cfg (dac17_t *ctx) |
DAC 17 default configuration function. More... | |
err_t | dac17_generic_write (dac17_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
DAC 17 data writing function. More... | |
void | dac17_set_rst_pin (dac17_t *ctx, uint8_t pin_state) |
DAC 17 set RST pin function. More... | |
void | dac17_set_pd_pin (dac17_t *ctx, uint8_t pin_state) |
DAC 17 set PD pin function. More... | |
void | dac17_hw_reset (dac17_t *ctx) |
DAC 17 hardware reset function. More... | |
err_t | dac17_send_command (dac17_t *ctx, uint8_t command, uint8_t ch_sel, uint16_t data_in) |
DAC 17 send command function. More... | |
err_t | dac17_set_dac_output (dac17_t *ctx, uint8_t ch_sel, uint16_t dac_data) |
DAC 17 set output level the selected channel function. More... | |
err_t | dac17_set_all_dac_output (dac17_t *ctx, uint16_t dac_data) |
DAC 17 set output level of all channels function. More... | |
API for configuring and manipulating DAC 17 Click driver.
void dac17_cfg_setup | ( | dac17_cfg_t * | cfg | ) |
DAC 17 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See dac17_cfg_t object definition for detailed explanation. |
err_t dac17_default_cfg | ( | dac17_t * | ctx | ) |
DAC 17 default configuration function.
This function executes a default configuration of DAC 17 click board.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dac17_generic_write | ( | dac17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
DAC 17 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dac17_hw_reset | ( | dac17_t * | ctx | ) |
DAC 17 hardware reset function.
This function is used to perform hardware reset of DAC 17 click board.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
err_t dac17_init | ( | dac17_t * | ctx, |
dac17_cfg_t * | cfg | ||
) |
DAC 17 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See dac17_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dac17_send_command | ( | dac17_t * | ctx, |
uint8_t | command, | ||
uint8_t | ch_sel, | ||
uint16_t | data_in | ||
) |
DAC 17 send command function.
This function is used to send specific command of the DAC 17 click board.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
[in] | command | : Command to be sent. |
[in] | ch_sel | : Selected channel. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dac17_set_all_dac_output | ( | dac17_t * | ctx, |
uint16_t | dac_data | ||
) |
DAC 17 set output level of all channels function.
This function is used to set output level of the DAC 17 click board.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
[in] | dac_data | : Value of the DAC output. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dac17_set_dac_output | ( | dac17_t * | ctx, |
uint8_t | ch_sel, | ||
uint16_t | dac_data | ||
) |
DAC 17 set output level the selected channel function.
This function is used to set output level of the sellected channel of the DAC 17 click board.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
[in] | ch_sel | : Selected channel. |
[in] | dac_data | : Value of the DAC output. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void dac17_set_pd_pin | ( | dac17_t * | ctx, |
uint8_t | pin_state | ||
) |
DAC 17 set PD pin function.
This function is used to set state of PD pin of the DAC 17 click board.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
[in] | pin_state | : State of the PD pin. |
void dac17_set_rst_pin | ( | dac17_t * | ctx, |
uint8_t | pin_state | ||
) |
DAC 17 set RST pin function.
This function is used to set state of RST pin of the DAC 17 click board.
[in] | ctx | : Click context object. See dac17_t object definition for detailed explanation. |
[in] | pin_state | : State of the RST pin. |