adac 2.0.0.0
|
Functions | |
void | adac_cfg_setup (adac_cfg_t *cfg) |
Config Object Initialization function. | |
ADAC_RETVAL | adac_init (adac_t *ctx, adac_cfg_t *cfg) |
Initialization function. | |
void | adac_generic_write (adac_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | adac_generic_read (adac_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | adac_hardware_reset (adac_t *ctx) |
Hardware reset function. | |
void | adac_software_reset (adac_t *ctx, uint16_t cmd) |
Software reset function. | |
void | adac_power_down_settings (adac_t *ctx, uint16_t settings) |
Power down function. | |
void | adac_general_purpose_settings (adac_t *ctx, uint16_t settings) |
General purpose function. | |
uint16_t | adac_read_config (adac_t *ctx) |
Read configuration function. | |
void | adac_write_gpio (adac_t *ctx, uint8_t w_data) |
Write GPIO function. | |
uint8_t | adac_read_gpio (adac_t *ctx) |
Read GPIO function. | |
uint16_t | adac_read_dac (adac_t *ctx, uint8_t *chan) |
Read DAC function. | |
uint16_t | adac_read_adc (adac_t *ctx, uint8_t *chan) |
Read ADC function. | |
void | adac_write_dac_data (adac_t *ctx, uint8_t chan, uint16_t w_data) |
Write DAC data function. | |
void | adac_write_dac (adac_t *ctx, uint8_t chan, uint8_t msb, uint8_t lsb) |
Write DAC function. | |
void | adac_set_configuration (adac_t *ctx, uint8_t ptr, uint8_t msb, uint8_t lsb) |
Set configuration function. | |
uint16_t | adac_read_data (adac_t *ctx, uint8_t addr) |
Read data function. | |
void | adac_write_data (adac_t *ctx, uint8_t addr, uint16_t w_data) |
Write data function. | |
void adac_cfg_setup | ( | adac_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void adac_general_purpose_settings | ( | adac_t * | ctx, |
uint16_t | settings ) |
General purpose function.
ctx | Click object. |
settings | Settings. |
@description This function configures general purpose register settings of the click module.
void adac_generic_read | ( | adac_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void adac_generic_write | ( | adac_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write 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 writes data to the desired register.
void adac_hardware_reset | ( | adac_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
@description This function does a hardware reset of the click module.
ADAC_RETVAL adac_init | ( | adac_t * | ctx, |
adac_cfg_t * | cfg ) |
Initialization function.
adac | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void adac_power_down_settings | ( | adac_t * | ctx, |
uint16_t | settings ) |
Power down function.
ctx | Click object. |
settings | Settings. |
@description This function configures power down settings of the click module.
uint16_t adac_read_adc | ( | adac_t * | ctx, |
uint8_t * | chan ) |
Read ADC function.
ctx | Click object. |
chan | ADC channel. |
@description This function reads ADC data using the I2C serial interface.
uint16_t adac_read_config | ( | adac_t * | ctx | ) |
Read configuration function.
ctx | Click object. |
@description This function acquires the current settings data of the click module.
uint16_t adac_read_dac | ( | adac_t * | ctx, |
uint8_t * | chan ) |
Read DAC function.
ctx | Click object. |
chan | DAC channel. |
@description This function reads DAC data using the I2C serial interface.
uint16_t adac_read_data | ( | adac_t * | ctx, |
uint8_t | addr ) |
Read data function.
ctx | Click object. |
addr | Register address. |
@description This function reads 2 bytes of data from the specified register address using the I2C serial interface.
uint8_t adac_read_gpio | ( | adac_t * | ctx | ) |
Read GPIO function.
ctx | Click object. |
@description This function reads GPIO data using the I2C serial interface.
void adac_set_configuration | ( | adac_t * | ctx, |
uint8_t | ptr, | ||
uint8_t | msb, | ||
uint8_t | lsb ) |
Set configuration function.
ctx | Click object. |
ptr | Pointer. |
msb | Most significant byte. |
lsb | Least significant byte. |
@description This function sets the configuration for the click module.
void adac_software_reset | ( | adac_t * | ctx, |
uint16_t | cmd ) |
Software reset function.
ctx | Click object. |
cmd | Command. |
@description This function does a software reset of the click module.
void adac_write_dac | ( | adac_t * | ctx, |
uint8_t | chan, | ||
uint8_t | msb, | ||
uint8_t | lsb ) |
Write DAC function.
ctx | Click object. |
chan | ADC channel. |
msb | Most significant byte. |
lsb | Least significant byte. |
@description This function writes DAC using the I2C serial interface.
void adac_write_dac_data | ( | adac_t * | ctx, |
uint8_t | chan, | ||
uint16_t | w_data ) |
Write DAC data function.
ctx | Click object. |
chan | ADC channel. |
w_data | Write data. |
@description This function writes DAC data using the I2C serial interface.
void adac_write_data | ( | adac_t * | ctx, |
uint8_t | addr, | ||
uint16_t | w_data ) |
Write data function.
ctx | Click object. |
addr | Register address. |
@description This function writes 2 bytes of data to the specified register address using the I2C serial interface.
void adac_write_gpio | ( | adac_t * | ctx, |
uint8_t | w_data ) |
Write GPIO function.
ctx | Click object. |
w_data | Write data. |
@description This function writes GPIO data using the I2C serial interface.