vreg2 2.0.0.0
|
API for configuring and manipulating VREG 2 Click driver. More...
Topics | |
VREG 2 PWM Settings | |
Settings for configuration of VREG 2 Click driver. | |
VREG 2 MikroBUS Map | |
MikroBUS pin mapping of VREG 2 Click driver. | |
Functions | |
void | vreg2_cfg_setup (vreg2_cfg_t *cfg) |
VREG 2 configuration object setup function. | |
err_t | vreg2_init (vreg2_t *ctx, vreg2_cfg_t *cfg) |
VREG 2 initialization function. | |
err_t | vreg2_default_cfg (vreg2_t *ctx) |
VREG 2 default configuration function. | |
err_t | vreg2_set_duty_cycle (vreg2_t *ctx, float duty_cycle) |
VREG 2 sets PWM duty cycle. | |
err_t | vreg2_pwm_stop (vreg2_t *ctx) |
VREG 2 stop PWM module. | |
err_t | vreg2_pwm_start (vreg2_t *ctx) |
VREG 2 start PWM module. | |
API for configuring and manipulating VREG 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void vreg2_cfg_setup | ( | vreg2_cfg_t * | cfg | ) |
VREG 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See vreg2_cfg_t object definition for detailed explanation. |
err_t vreg2_default_cfg | ( | vreg2_t * | ctx | ) |
VREG 2 default configuration function.
This function executes a default configuration of VREG 2 click board.
[in] | ctx | : Click context object. See vreg2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t vreg2_init | ( | vreg2_t * | ctx, |
vreg2_cfg_t * | cfg ) |
VREG 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See vreg2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See vreg2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t vreg2_pwm_start | ( | vreg2_t * | ctx | ) |
VREG 2 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See vreg2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t vreg2_pwm_stop | ( | vreg2_t * | ctx | ) |
VREG 2 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See vreg2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t vreg2_set_duty_cycle | ( | vreg2_t * | ctx, |
float | duty_cycle ) |
VREG 2 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See vreg2_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.