|
buck24 2.2.0
|
API for configuring and manipulating Buck 24 Click driver. More...
Topics | |
| Buck 24 Registers List | |
| List of registers of Buck 24 Click driver. | |
| Buck 24 Registers Settings | |
| Settings for registers of Buck 24 Click driver. | |
| Buck 24 MikroBUS Map | |
| MikroBUS pin mapping of Buck 24 Click driver. | |
Functions | |
| void | buck24_cfg_setup (buck24_cfg_t *cfg) |
| Buck 24 configuration object setup function. | |
| err_t | buck24_init (buck24_t *ctx, buck24_cfg_t *cfg) |
| Buck 24 initialization function. | |
| err_t | buck24_default_cfg (buck24_t *ctx) |
| Buck 24 default configuration function. | |
| void | buck24_enable_device (buck24_t *ctx) |
| Buck 24 enable device function. | |
| void | buck24_disable_device (buck24_t *ctx) |
| Buck 24 disable device function. | |
| uint8_t | buck24_get_pg_pin (buck24_t *ctx) |
| Buck 24 get power-good pin function. | |
| err_t | buck24_write_reg (buck24_t *ctx, uint8_t reg, uint16_t data_in) |
| Buck 24 write register function. | |
| err_t | buck24_read_reg (buck24_t *ctx, uint8_t reg, uint16_t *data_out) |
| Buck 24 read register function. | |
| err_t | buck24_read_data (buck24_t *ctx, buck24_data_t *data_out) |
| Buck 24 read measurement data function. | |
| err_t | buck24_read_data_avg (buck24_t *ctx, uint16_t num_conv, buck24_data_t *data_out) |
| Buck 24 read averaged measurement data function. | |
API for configuring and manipulating Buck 24 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void buck24_cfg_setup | ( | buck24_cfg_t * | cfg | ) |
Buck 24 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See buck24_cfg_t object definition for detailed explanation. |
| err_t buck24_default_cfg | ( | buck24_t * | ctx | ) |
Buck 24 default configuration function.
This function executes a default configuration of Buck 24 Click board.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void buck24_disable_device | ( | buck24_t * | ctx | ) |
Buck 24 disable device function.
This function sets the RST pin to low logic level to disable the device.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| void buck24_enable_device | ( | buck24_t * | ctx | ) |
Buck 24 enable device function.
This function sets the RST pin to high logic level to enable the device.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| uint8_t buck24_get_pg_pin | ( | buck24_t * | ctx | ) |
Buck 24 get power-good pin function.
This function reads the logic level of the PG (power-good) pin.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| err_t buck24_init | ( | buck24_t * | ctx, |
| buck24_cfg_t * | cfg ) |
Buck 24 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See buck24_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t buck24_read_data | ( | buck24_t * | ctx, |
| buck24_data_t * | data_out ) |
Buck 24 read measurement data function.
This function reads shunt voltage, bus voltage, current, and power measurements from the device.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| [out] | data_out | : Pointer to structure where measurement data will be stored. See buck24_data_t structure definition. |
0 - Success, -1 - Error. | err_t buck24_read_data_avg | ( | buck24_t * | ctx, |
| uint16_t | num_conv, | ||
| buck24_data_t * | data_out ) |
Buck 24 read averaged measurement data function.
This function reads multiple samples of measurement data and returns their average values.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| [in] | num_conv | : Number of measurement conversions to average. |
| [out] | data_out | : Pointer to structure where averaged data will be stored. See buck24_data_t structure definition. |
0 - Success, -1 - Error. | err_t buck24_read_reg | ( | buck24_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t * | data_out ) |
Buck 24 read register function.
This function reads a 16-bit data value from the specified register.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| [in] | reg | : Register address (valid range: 0x00 to 0x05). |
| [out] | data_out | : Pointer to 16-bit variable where read data will be stored. |
0 - Success, -1 - Error. | err_t buck24_write_reg | ( | buck24_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t | data_in ) |
Buck 24 write register function.
This function writes a 16-bit data value to the specified register.
| [in] | ctx | : Click context object. See buck24_t object definition for detailed explanation. |
| [in] | reg | : Register address (valid range: 0x00 to 0x05). |
| [in] | data_in | : 16-bit data to be written. |
0 - Success, -1 - Error.