stepup
2.0.0.0
|
Functions | |
void | stepup_cfg_setup (stepup_cfg_t *cfg) |
Config Object Initialization function. More... | |
STEPUP_RETVAL | stepup_init (stepup_t *ctx, stepup_cfg_t *cfg) |
Initialization function. More... | |
void | stepup_default_cfg (stepup_t *ctx, uint16_t out_value) |
Click Default Configuration function. More... | |
void | stepup_generic_transfer (stepup_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. More... | |
void | stepup_mod_set (stepup_t *ctx, uint8_t pin_state) |
Mod Pin set function. More... | |
void | stepup_en_set (stepup_t *ctx, uint8_t pin_state) |
En Pin set function. More... | |
uint8_t | stepup_set_config (stepup_t *ctx, uint16_t config) |
En Pin set function. More... | |
uint8_t | stepup_set_out (stepup_t *ctx, uint16_t out_value) |
Setting output value. More... | |
float | stepup_get_percent (uint16_t out_value) |
Calculate ouput value in percent. More... | |
void stepup_cfg_setup | ( | stepup_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void stepup_default_cfg | ( | stepup_t * | ctx, |
uint16_t | out_value | ||
) |
Click Default Configuration function.
ctx | Click object. |
out_value | Output value (range : 0 to 4095) |
This function executes default configuration for Step Up click.
void stepup_en_set | ( | stepup_t * | ctx, |
uint8_t | pin_state | ||
) |
En Pin set function.
ctx | Click object. |
pin_state | EN pin state (0 for LOW and 1 for HIGH) |
This function sets the EN pin state
void stepup_generic_transfer | ( | stepup_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len | ||
) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
Generic SPI transfer, for sending and receiving packages
float stepup_get_percent | ( | uint16_t | out_value | ) |
Calculate ouput value in percent.
ctx | Click object. |
out_value | Output value (range : 0 to 4095) |
This function calculates ouput value in percent
STEPUP_RETVAL stepup_init | ( | stepup_t * | ctx, |
stepup_cfg_t * | cfg | ||
) |
Initialization function.
stepup | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void stepup_mod_set | ( | stepup_t * | ctx, |
uint8_t | pin_state | ||
) |
Mod Pin set function.
ctx | Click object. |
pin_state | MOD pin state (0 for LOW and 1 for HIGH) |
This function sets the MOD pin state
uint8_t stepup_set_config | ( | stepup_t * | ctx, |
uint16_t | config | ||
) |
En Pin set function.
ctx | Click object. |
config | Command word configuration bits |
This function sets first 4 bits in command word
uint8_t stepup_set_out | ( | stepup_t * | ctx, |
uint16_t | out_value | ||
) |
Setting output value.
ctx | Click object. |
out_value | Output value (range : 0 to 4095) |
This function sets output value