buck12 2.0.0.0
|
Functions | |
void | buck12_cfg_setup (buck12_cfg_t *cfg) |
Config Object Initialization function. | |
BUCK12_RETVAL | buck12_init (buck12_t *ctx, buck12_cfg_t *cfg) |
Initialization function. | |
void | buck12_default_cfg (buck12_t *ctx) |
Click Default Configuration function. | |
void | buck12_generic_transfer (buck12_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | buck12_control (buck12_t *ctx, uint8_t ctrl) |
Function for enable or disable device. | |
uint16_t | buck12_get_channel_adc (buck12_t *ctx, uint8_t channel) |
Function for read ADC on the channel. | |
float | buck12_get_voltage (buck12_t *ctx, uint8_t select_volt) |
Function for get Voltage. | |
void buck12_cfg_setup | ( | buck12_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void buck12_control | ( | buck12_t * | ctx, |
uint8_t | ctrl ) |
Function for enable or disable device.
ctx | Click object. |
ctrl | Disable or enable device. |
@description This function for enable or disable device.
void buck12_default_cfg | ( | buck12_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Buck 12 click.
void buck12_generic_transfer | ( | buck12_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 |
@description Generic SPI transfer, for sending and receiving packages
uint16_t buck12_get_channel_adc | ( | buck12_t * | ctx, |
uint8_t | channel ) |
Function for read ADC on the channel.
ctx | Click object. |
channel | Select channel (0 or 1). |
@description This function reads ADC on the channel.
float buck12_get_voltage | ( | buck12_t * | ctx, |
uint8_t | select_volt ) |
Function for get Voltage.
ctx | Click object. |
select_volt | Select voltage. |
@description This function gets Voltage.
BUCK12_RETVAL buck12_init | ( | buck12_t * | ctx, |
buck12_cfg_t * | cfg ) |
Initialization function.
buck12 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.