adac3 2.0.0.0
|
API for configuring and manipulating ADAC 3 Click driver. More...
Topics | |
ADAC 3 Registers Settings | |
Settings for registers of ADAC 3 Click driver. | |
ADAC 3 MikroBUS Map | |
MikroBUS pin mapping of ADAC 3 Click driver. | |
Functions | |
void | adac3_cfg_setup (adac3_cfg_t *cfg) |
ADAC 3 configuration object setup function. | |
err_t | adac3_init (adac3_t *ctx, adac3_cfg_t *cfg) |
ADAC 3 initialization function. | |
err_t | adac3_default_cfg (adac3_t *ctx) |
ADAC 3 default configuration function. | |
err_t | adac3_write_control (adac3_t *ctx, uint8_t control) |
ADAC 3 write control function. | |
err_t | adac3_write_dac (adac3_t *ctx, uint8_t dac) |
ADAC 3 write dac function. | |
err_t | adac3_read_adc (adac3_t *ctx, uint8_t *adc) |
ADAC 3 read adc function. | |
API for configuring and manipulating ADAC 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void adac3_cfg_setup | ( | adac3_cfg_t * | cfg | ) |
ADAC 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See adac3_cfg_t object definition for detailed explanation. |
err_t adac3_default_cfg | ( | adac3_t * | ctx | ) |
ADAC 3 default configuration function.
This function executes a default configuration of ADAC 3 click board.
[in] | ctx | : Click context object. See adac3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adac3_init | ( | adac3_t * | ctx, |
adac3_cfg_t * | cfg ) |
ADAC 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See adac3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See adac3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adac3_read_adc | ( | adac3_t * | ctx, |
uint8_t * | adc ) |
ADAC 3 read adc function.
This function reads the AD conversion byte by using I2C serial interface.
[in] | ctx | : Click context object. See adac3_t object definition for detailed explanation. |
[out] | adc | : AD conversion byte. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adac3_write_control | ( | adac3_t * | ctx, |
uint8_t | control ) |
ADAC 3 write control function.
This function writes a control byte by using I2C serial interface.
[in] | ctx | : Click context object. See adac3_t object definition for detailed explanation. |
[in] | control | : Control byte to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adac3_write_dac | ( | adac3_t * | ctx, |
uint8_t | dac ) |
ADAC 3 write dac function.
This function writes a DAC byte by using I2C serial interface.
[in] | ctx | : Click context object. See adac3_t object definition for detailed explanation. |
[in] | dac | : DAC value [0-255]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.