stepdown12
2.1.0.0
|
API for configuring and manipulating Step Down 12 Click driver. More...
Modules | |
Step Down 12 Settings | |
Settings of Step Down 12 Click driver. | |
Step Down 12 MikroBUS Map | |
MikroBUS pin mapping of Step Down 12 Click driver. | |
Functions | |
void | stepdown12_cfg_setup (stepdown12_cfg_t *cfg) |
Step Down 12 configuration object setup function. More... | |
err_t | stepdown12_init (stepdown12_t *ctx, stepdown12_cfg_t *cfg) |
Step Down 12 initialization function. More... | |
void | stepdown12_default_cfg (stepdown12_t *ctx) |
Step Down 12 default configuration function. More... | |
err_t | stepdown12_set_resistance (stepdown12_t *ctx, uint32_t res_ohm) |
Step Down 12 set resistance function. More... | |
err_t | stepdown12_set_vout (stepdown12_t *ctx, float vout) |
Step Down 12 set vout function. More... | |
uint8_t | stepdown12_get_pg_pin (stepdown12_t *ctx) |
Step Down 12 get pg pin function. More... | |
void | stepdown12_enable_device (stepdown12_t *ctx) |
Step Down 12 enable device function. More... | |
void | stepdown12_disable_device (stepdown12_t *ctx) |
Step Down 12 disable device function. More... | |
void | stepdown12_mode_forced_pwm (stepdown12_t *ctx) |
Step Down 12 mode forced pwm function. More... | |
void | stepdown12_mode_auto_pwm (stepdown12_t *ctx) |
Step Down 12 mode auto pwm function. More... | |
API for configuring and manipulating Step Down 12 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void stepdown12_cfg_setup | ( | stepdown12_cfg_t * | cfg | ) |
Step Down 12 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See stepdown12_cfg_t object definition for detailed explanation. |
void stepdown12_default_cfg | ( | stepdown12_t * | ctx | ) |
Step Down 12 default configuration function.
This function executes a default configuration of Step Down 12 Click board.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
void stepdown12_disable_device | ( | stepdown12_t * | ctx | ) |
Step Down 12 disable device function.
This function disables the device by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
void stepdown12_enable_device | ( | stepdown12_t * | ctx | ) |
Step Down 12 enable device function.
This function enables the device by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
uint8_t stepdown12_get_pg_pin | ( | stepdown12_t * | ctx | ) |
Step Down 12 get pg pin function.
This function returns the power good (PG) pin logic state.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
err_t stepdown12_init | ( | stepdown12_t * | ctx, |
stepdown12_cfg_t * | cfg | ||
) |
Step Down 12 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See stepdown12_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void stepdown12_mode_auto_pwm | ( | stepdown12_t * | ctx | ) |
Step Down 12 mode auto pwm function.
This function sets the device to auto PWM mode by setting the MODE pin to low logic state.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
void stepdown12_mode_forced_pwm | ( | stepdown12_t * | ctx | ) |
Step Down 12 mode forced pwm function.
This function sets the device to forced PWM mode by setting the MODE pin to high logic state.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
err_t stepdown12_set_resistance | ( | stepdown12_t * | ctx, |
uint32_t | res_ohm | ||
) |
Step Down 12 set resistance function.
This function sets the digipot wiper resistance by using I2C serial interface.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
[in] | res_ohm | : Resistance value in Ohms [0 to 100000 Ohm]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown12_set_vout | ( | stepdown12_t * | ctx, |
float | vout | ||
) |
Step Down 12 set vout function.
This function sets the voltage output by setting the digipot wiper resistance.
[in] | ctx | : Click context object. See stepdown12_t object definition for detailed explanation. |
[in] | vout | : Voltage output to be set [1.05 to 5.5 V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.