buck18
2.1.0.0
|
API for configuring and manipulating Buck 18 Click driver. More...
Modules | |
Buck 18 Registers List | |
List of registers of Buck 18 Click driver. | |
Buck 18 Registers Settings | |
Settings for registers of Buck 18 Click driver. | |
Buck 18 MikroBUS Map | |
MikroBUS pin mapping of Buck 18 Click driver. | |
Functions | |
void | buck18_cfg_setup (buck18_cfg_t *cfg) |
Buck 18 configuration object setup function. More... | |
err_t | buck18_init (buck18_t *ctx, buck18_cfg_t *cfg) |
Buck 18 initialization function. More... | |
err_t | buck18_default_cfg (buck18_t *ctx) |
Buck 18 default configuration function. More... | |
err_t | buck18_read_raw_adc (buck18_t *ctx, uint16_t *raw_adc) |
Buck 18 read raw ADC value function. More... | |
err_t | buck18_read_voltage (buck18_t *ctx, float *voltage) |
Buck 18 read voltage level function. More... | |
err_t | buck18_set_vref (buck18_t *ctx, float vref) |
Buck 18 set vref function. More... | |
void | buck18_enable (buck18_t *ctx) |
Buck 18 enable the device function. More... | |
void | buck18_disable (buck18_t *ctx) |
Buck 18 disable the device function. More... | |
err_t | buck18_write_data (buck18_t *ctx, uint8_t cmd, uint8_t data_in) |
Buck 18 data writing function. More... | |
err_t | buck18_read_data (buck18_t *ctx, uint8_t *data_out) |
Buck 18 data reading function. More... | |
err_t | buck18_write_rdac (buck18_t *ctx, uint8_t wiper_pos) |
Buck 18 data writing function. More... | |
err_t | buck18_set_resistance (buck18_t *ctx, float res_kohm) |
Buck 18 sets the resistance function. More... | |
err_t | buck18_set_vout (buck18_t *ctx, buck18_vout_t vout) |
Buck 18 sets the VOUT function. More... | |
API for configuring and manipulating Buck 18 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void buck18_cfg_setup | ( | buck18_cfg_t * | cfg | ) |
Buck 18 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See buck18_cfg_t object definition for detailed explanation. |
err_t buck18_default_cfg | ( | buck18_t * | ctx | ) |
Buck 18 default configuration function.
This function executes a default configuration of Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void buck18_disable | ( | buck18_t * | ctx | ) |
Buck 18 disable the device function.
This function turns off power switch and disable the buck mode of the MAXM38643, Tiny, 1.8V to 5.5V Input, 330nA IQ, 600mA nanoPower Buck Module on the Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
void buck18_enable | ( | buck18_t * | ctx | ) |
Buck 18 enable the device function.
This function turns on the power switch and enables the buck mode of the MAXM38643, Tiny, 1.8V to 5.5V Input, 330nA IQ, 600mA nanoPower Buck Module on the Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
err_t buck18_init | ( | buck18_t * | ctx, |
buck18_cfg_t * | cfg | ||
) |
Buck 18 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See buck18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_read_data | ( | buck18_t * | ctx, |
uint8_t * | data_out | ||
) |
Buck 18 data reading function.
This function reads a data byte of the AD5171, 64-Position OTP Digital Potentiometer on the Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[out] | data_out | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_read_raw_adc | ( | buck18_t * | ctx, |
uint16_t * | raw_adc | ||
) |
Buck 18 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_read_voltage | ( | buck18_t * | ctx, |
float * | voltage | ||
) |
Buck 18 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_set_resistance | ( | buck18_t * | ctx, |
float | res_kohm | ||
) |
Buck 18 sets the resistance function.
This function sets a desired resistance of the AD5171, 64-Position OTP Digital Potentiometer on the Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[in] | res_kohm | : Resistance [0-50kOhm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_set_vout | ( | buck18_t * | ctx, |
buck18_vout_t | vout | ||
) |
Buck 18 sets the VOUT function.
This function sets the voltage output level of the MAXM38643, Tiny, 1.8V to 5.5V Input, 330nA IQ, 600mA nanoPower Buck Module on the Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[in] | vout | : Voltage output [0.9-3.3V]. See buck18_vout_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_set_vref | ( | buck18_t * | ctx, |
float | vref | ||
) |
Buck 18 set vref function.
This function sets the voltage reference for Buck 18 Click driver.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_write_data | ( | buck18_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | data_in | ||
) |
Buck 18 data writing function.
This function writes a desired data byte using the selected command of the AD5171, 64-Position OTP Digital Potentiometer on the Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[in] | cmd | : Command. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t buck18_write_rdac | ( | buck18_t * | ctx, |
uint8_t | wiper_pos | ||
) |
Buck 18 data writing function.
This function writes a RDAC by sets the position of the wiper position of the AD5171, 64-Position OTP Digital Potentiometer on the Buck 18 Click board.
[in] | ctx | : Click context object. See buck18_t object definition for detailed explanation. |
[in] | wiper_pos | : Wiper position [0-63]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.