stepdown8 2.1.0.0
|
API for configuring and manipulating Step Down 8 Click driver. More...
Topics | |
Step Down 8 Registers List | |
List of registers of Step Down 8 Click driver. | |
Step Down 8 Registers Settings | |
Settings for registers of Step Down 8 Click driver. | |
Step Down 8 MikroBUS Map | |
MikroBUS pin mapping of Step Down 8 Click driver. | |
Functions | |
void | stepdown8_cfg_setup (stepdown8_cfg_t *cfg) |
Step Down 8 configuration object setup function. | |
err_t | stepdown8_init (stepdown8_t *ctx, stepdown8_cfg_t *cfg) |
Step Down 8 initialization function. | |
err_t | stepdown8_default_cfg (stepdown8_t *ctx) |
Step Down 8 default configuration function. | |
void | stepdown8_set_en_pin (stepdown8_t *ctx, uint8_t pin_state) |
Step Down 8 set EN pin state function. | |
void | stepdown8_set_sps_pin (stepdown8_t *ctx, uint8_t pin_state) |
Step Down 8 set SPS pin state function. | |
uint8_t | stepdown8_get_pg_state (stepdown8_t *ctx) |
Step Down 8 get PG pin state function. | |
err_t | stepdown8_set_wiper_pos (stepdown8_t *ctx, uint16_t wiper_pos) |
Step Down 8 set wiper position. | |
err_t | stepdown8_set_r2_resistance (stepdown8_t *ctx, uint32_t resistance) |
Step Down 8 set potentiometer resistance. | |
err_t | stepdown8_set_output (stepdown8_t *ctx, float voltage) |
Step Down 8 set output voltage. | |
API for configuring and manipulating Step Down 8 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void stepdown8_cfg_setup | ( | stepdown8_cfg_t * | cfg | ) |
Step Down 8 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See stepdown8_cfg_t object definition for detailed explanation. |
err_t stepdown8_default_cfg | ( | stepdown8_t * | ctx | ) |
Step Down 8 default configuration function.
This function executes a default configuration of Step Down 8 click board.
[in] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t stepdown8_get_pg_state | ( | stepdown8_t * | ctx | ) |
Step Down 8 get PG pin state function.
This function is used to get state of the PG pin.
[in] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
err_t stepdown8_init | ( | stepdown8_t * | ctx, |
stepdown8_cfg_t * | cfg ) |
Step Down 8 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See stepdown8_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void stepdown8_set_en_pin | ( | stepdown8_t * | ctx, |
uint8_t | pin_state ) |
Step Down 8 set EN pin state function.
This function sets a EN pin state.
[in] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
[in] | pin_state | : State of the EN pin. |
err_t stepdown8_set_output | ( | stepdown8_t * | ctx, |
float | voltage ) |
Step Down 8 set output voltage.
This function sets a predefined output level.
[in] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
[in] | voltage | : Desired output voltage. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t stepdown8_set_r2_resistance | ( | stepdown8_t * | ctx, |
uint32_t | resistance ) |
Step Down 8 set potentiometer resistance.
This function sets a resistance of the potentiometer to the desired value.
[in] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
[in] | resistance | : Desired resistance. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void stepdown8_set_sps_pin | ( | stepdown8_t * | ctx, |
uint8_t | pin_state ) |
Step Down 8 set SPS pin state function.
This function sets a SPS pin state.
[in] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
[in] | pin_state | : State of the SPS pin. |
err_t stepdown8_set_wiper_pos | ( | stepdown8_t * | ctx, |
uint16_t | wiper_pos ) |
Step Down 8 set wiper position.
This function sets a wiper of the potentiometer to the desired position.
[in] | ctx | : Click context object. See stepdown8_t object definition for detailed explanation. |
[in] | wiper_pos | : Position of the wiper. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.