ldo
2.1.0.0
|
API for configuring and manipulating LDO Click driver. More...
Modules | |
LDO Registers List | |
List of registers of LDO Click driver. | |
LDO Registers Settings | |
Settings for registers of LDO Click driver. | |
LDO MikroBUS Map | |
MikroBUS pin mapping of LDO Click driver. | |
Functions | |
void | ldo_cfg_setup (ldo_cfg_t *cfg) |
LDO configuration object setup function. More... | |
err_t | ldo_init (ldo_t *ctx, ldo_cfg_t *cfg) |
LDO initialization function. More... | |
err_t | ldo_default_cfg (ldo_t *ctx) |
LDO default configuration function. More... | |
err_t | ldo_write_register (ldo_t *ctx, uint8_t reg, uint8_t data_in) |
LDO write register function. More... | |
err_t | ldo_read_register (ldo_t *ctx, uint8_t reg, uint8_t *data_out) |
LDO read register function. More... | |
err_t | ldo_set_pin_state (ldo_t *ctx, uint8_t pin_mask, uint8_t state) |
LDO set pin state function. More... | |
err_t | ldo_set_vout (ldo_t *ctx, uint16_t vout) |
LDO set vout function. More... | |
void | ldo_enable_device (ldo_t *ctx) |
LDO enable device function. More... | |
void | ldo_disable_device (ldo_t *ctx) |
LDO disable device function. More... | |
API for configuring and manipulating LDO Click driver.
void ldo_cfg_setup | ( | ldo_cfg_t * | cfg | ) |
LDO configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ldo_cfg_t object definition for detailed explanation. |
err_t ldo_default_cfg | ( | ldo_t * | ctx | ) |
LDO default configuration function.
This function executes a default configuration of LDO click board.
[in] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void ldo_disable_device | ( | ldo_t * | ctx | ) |
LDO disable device function.
This function disables the device by setting the EN pin to LOW logic state.
[in] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
void ldo_enable_device | ( | ldo_t * | ctx | ) |
LDO enable device function.
This function enables the device by setting the EN pin to HIGH logic state.
[in] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
LDO initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ldo_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldo_read_register | ( | ldo_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
LDO read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldo_set_pin_state | ( | ldo_t * | ctx, |
uint8_t | pin_mask, | ||
uint8_t | state | ||
) |
LDO set pin state function.
This function sets the state of the selected pins. Others remain unchanged.
[in] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
[in] | pin_mask | : Bit-mask of pins to configure. |
[in] | state | : State of pins (0-LOW, 1-OPEN). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldo_set_vout | ( | ldo_t * | ctx, |
uint16_t | vout | ||
) |
LDO set vout function.
This function sets the voltage output.
[in] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
[in] | vout | : Voltage output in a range of 800 to 3950 mV. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldo_write_register | ( | ldo_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
LDO write register function.
This function writes a data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See ldo_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.