dac6 2.0.0.0
|
Functions | |
void | dac6_cfg_setup (dac6_cfg_t *cfg) |
Config Object Initialization function. | |
DAC6_RETVAL | dac6_init (dac6_t *ctx, dac6_cfg_t *cfg) |
Initialization function. | |
void | dac6_generic_transfer (dac6_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | dac6_write_data (dac6_t *ctx, uint16_t wr_data) |
Generic write function. | |
float | dac6_set_output (dac6_t *ctx) |
Set DAC output function. | |
void dac6_cfg_setup | ( | dac6_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void dac6_generic_transfer | ( | dac6_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
DAC6_RETVAL dac6_init | ( | dac6_t * | ctx, |
dac6_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
float dac6_set_output | ( | dac6_t * | ctx | ) |
Set DAC output function.
ctx | Click object. Strucrure arguments: - chan 8-bit data that defines output channel - op_mod 8-bit data that defines mode of operation - set_out 16-bit data that defines output level - v_ref 16-bit reference voltage input [ mv ] |
@description Function is used to set operation mode output channel and level.
- Device's output levels range from 0 to 4095. - Device's ideal output voltage can be calculated by using the equation : Vout = Vrefin � (set_out / 4095). - It is advisable to use predefined values or to consult the datasheet.
void dac6_write_data | ( | dac6_t * | ctx, |
uint16_t | wr_data ) |
Generic write function.
ctx | Click object. |
wr_data | 16-bit write data |
@description Sends 16-bit data to the device's input shift register.