gainamp3 2.0.0.0
|
API for configuring and manipulating GainAMP 3 Click driver. More...
Topics | |
GainAMP 3 Registers List | |
List of registers of GainAMP 3 Click driver. | |
GainAMP 3 Registers Settings | |
Settings for registers of GainAMP 3 Click driver. | |
GainAMP 3 MikroBUS Map | |
MikroBUS pin mapping of GainAMP 3 Click driver. | |
Functions | |
void | gainamp3_cfg_setup (gainamp3_cfg_t *cfg) |
GainAMP 3 configuration object setup function. | |
err_t | gainamp3_init (gainamp3_t *ctx, gainamp3_cfg_t *cfg) |
GainAMP 3 initialization function. | |
err_t | gainamp3_default_cfg (gainamp3_t *ctx) |
GainAMP 3 default configuration function. | |
err_t | gainamp3_continuous_write (gainamp3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
GainAMP 3 continuous write function. | |
err_t | gainamp3_continuous_read (gainamp3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
GainAMP 3 continuous read function. | |
err_t | gainamp3_write_register (gainamp3_t *ctx, uint8_t reg, uint8_t data_in) |
GainAMP 3 write register function. | |
err_t | gainamp3_read_register (gainamp3_t *ctx, uint8_t reg, uint8_t *data_out) |
GainAMP 3 read register function. | |
err_t | gainamp3_verify_communication (gainamp3_t *ctx) |
GainAMP 3 verify communication function. | |
err_t | gainamp3_set_amplifier_gain (gainamp3_t *ctx, uint8_t gain) |
GainAMP 3 set amplifier gain function. | |
err_t | gainamp3_set_input_channel (gainamp3_t *ctx, uint8_t channel) |
GainAMP 3 set input channel function. | |
err_t | gainamp3_software_reset (gainamp3_t *ctx) |
GainAMP 3 software reset function. | |
API for configuring and manipulating GainAMP 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 gainamp3_cfg_setup | ( | gainamp3_cfg_t * | cfg | ) |
GainAMP 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See gainamp3_cfg_t object definition for detailed explanation. |
err_t gainamp3_continuous_read | ( | gainamp3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
GainAMP 3 continuous read function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t gainamp3_continuous_write | ( | gainamp3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
GainAMP 3 continuous write 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 gainamp3_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.err_t gainamp3_default_cfg | ( | gainamp3_t * | ctx | ) |
GainAMP 3 default configuration function.
This function executes a default configuration of GainAMP 3 click board.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t gainamp3_init | ( | gainamp3_t * | ctx, |
gainamp3_cfg_t * | cfg ) |
GainAMP 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See gainamp3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t gainamp3_read_register | ( | gainamp3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
GainAMP 3 read register function.
This function reads a data byte from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t gainamp3_set_amplifier_gain | ( | gainamp3_t * | ctx, |
uint8_t | gain ) |
GainAMP 3 set amplifier gain function.
This function sets the amplifier gain level.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
[in] | gain | : Amplifier gain level [0x00-0x0B]. |
0
- Success, -1
- Error.err_t gainamp3_set_input_channel | ( | gainamp3_t * | ctx, |
uint8_t | channel ) |
GainAMP 3 set input channel function.
This function sets the input channel.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
[in] | channel | : Input channel [0x00-0x03]. |
0
- Success, -1
- Error.err_t gainamp3_software_reset | ( | gainamp3_t * | ctx | ) |
GainAMP 3 software reset function.
This function performs the software reset.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t gainamp3_verify_communication | ( | gainamp3_t * | ctx | ) |
GainAMP 3 verify communication function.
This function verifies the communication by reading and verifying the DIE revision ID number.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t gainamp3_write_register | ( | gainamp3_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
GainAMP 3 write register function.
This function writes a data byte to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See gainamp3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.