stepdown12  2.1.0.0
Modules | Functions
Step Down 12 Click Driver

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...
 

Detailed Description

API for configuring and manipulating Step Down 12 Click driver.

Function Documentation

◆ stepdown12_cfg_setup()

void stepdown12_cfg_setup ( stepdown12_cfg_t cfg)

Step Down 12 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See stepdown12_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ stepdown12_default_cfg()

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.

Parameters
[in]ctx: Click context object. See stepdown12_t object definition for detailed explanation.
Returns
None.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ stepdown12_disable_device()

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.

Parameters
[in]ctx: Click context object. See stepdown12_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ stepdown12_enable_device()

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.

Parameters
[in]ctx: Click context object. See stepdown12_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ stepdown12_get_pg_pin()

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.

Parameters
[in]ctx: Click context object. See stepdown12_t object definition for detailed explanation.
Returns
PG pin logic state.
Note
None.

◆ stepdown12_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ stepdown12_mode_auto_pwm()

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.

Parameters
[in]ctx: Click context object. See stepdown12_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ stepdown12_mode_forced_pwm()

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.

Parameters
[in]ctx: Click context object. See stepdown12_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ stepdown12_set_resistance()

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.

Parameters
[in]ctx: Click context object. See stepdown12_t object definition for detailed explanation.
[in]res_ohm: Resistance value in Ohms [0 to 100000 Ohm].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ stepdown12_set_vout()

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.

Parameters
[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].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.