solarenergy2 2.1.0.0
|
API for configuring and manipulating Solar Energy 2 Click driver. More...
Topics | |
Solar Energy 2 Registers List | |
List of registers of Solar Energy 2 Click driver. | |
Solar Energy 2 Registers Settings | |
Settings for registers of Solar Energy 2 Click driver. | |
Solar Energy 2 MikroBUS Map | |
MikroBUS pin mapping of Solar Energy 2 Click driver. | |
Functions | |
void | solarenergy2_cfg_setup (solarenergy2_cfg_t *cfg) |
Solar Energy 2 configuration object setup function. | |
err_t | solarenergy2_init (solarenergy2_t *ctx, solarenergy2_cfg_t *cfg) |
Solar Energy 2 initialization function. | |
err_t | solarenergy2_default_cfg (solarenergy2_t *ctx) |
Solar Energy 2 default configuration function. | |
err_t | solarenergy2_generic_write (solarenergy2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Solar Energy 2 I2C writing function. | |
err_t | solarenergy2_generic_read (solarenergy2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Solar Energy 2 I2C reading function. | |
err_t | solarenergy2_write_reg (solarenergy2_t *ctx, uint8_t reg, uint8_t data_in) |
Solar Energy 2 write register function. | |
err_t | solarenergy2_write_eeprom (solarenergy2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Solar Energy 2 write EEPROM function. | |
err_t | solarenergy2_soft_reset (solarenergy2_t *ctx) |
Solar Energy 2 soft reset function. | |
err_t | solarenergy2_get_status (solarenergy2_t *ctx, solarenergy2_status_t *status) |
Solar Energy 2 get status function. | |
err_t | solarenergy2_get_bat_vtg_status (solarenergy2_t *ctx, solarenergy2_bat_vtg_status_t *bat_vtg_status) |
Solar Energy 2 get storage element status function. | |
err_t | solarenergy2_set_sleep_vsup (solarenergy2_t *ctx, float sleep_vsup_sec) |
Solar Energy 2 set sleep VSUP function. | |
err_t | solarenergy2_set_mppt_ratio (solarenergy2_t *ctx, uint8_t mppt_ratio) |
Solar Energy 2 set MPPT ratio function. | |
err_t | solarenergy2_set_ldo_cfg (solarenergy2_t *ctx, uint8_t vaux_ldo, uint8_t ulp_ldo) |
Solar Energy 2 set LDO config function. | |
err_t | solarenergy2_config_abs_voltage (solarenergy2_t *ctx, solarenergy2_abs_vtg_v_t abs_vtg) |
Solar Energy 2 config absolute voltage function. | |
err_t | solarenergy2_set_pwr_current_source (solarenergy2_t *ctx, uint8_t crt_src_sel) |
Solar Energy 2 power source selection function. | |
err_t | solarenergy2_store_config (solarenergy2_t *ctx) |
Solar Energy 2 store config function. | |
void | solarenergy2_set_wup_pin (solarenergy2_t *ctx, uint8_t state) |
Solar Energy 2 set WUP pin function. | |
uint8_t | solarenergy2_get_en_hv_cell_low_state (solarenergy2_t *ctx) |
Solar Energy 2 get HLV state function. | |
uint8_t | solarenergy2_get_battery_low_state (solarenergy2_t *ctx) |
Solar Energy 2 get BLV state function. | |
API for configuring and manipulating Solar Energy 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 solarenergy2_cfg_setup | ( | solarenergy2_cfg_t * | cfg | ) |
Solar Energy 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See solarenergy2_cfg_t object definition for detailed explanation. |
err_t solarenergy2_config_abs_voltage | ( | solarenergy2_t * | ctx, |
solarenergy2_abs_vtg_v_t | abs_vtg ) |
Solar Energy 2 config absolute voltage function.
This function sets the configuration of the absolute voltage values of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | abs_vtg | : Absolute voltage data object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_default_cfg | ( | solarenergy2_t * | ctx | ) |
Solar Energy 2 default configuration function.
This function executes a default configuration of Solar Energy 2 click board.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_generic_read | ( | solarenergy2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Solar Energy 2 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_generic_write | ( | solarenergy2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Solar Energy 2 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_get_bat_vtg_status | ( | solarenergy2_t * | ctx, |
solarenergy2_bat_vtg_status_t * | bat_vtg_status ) |
Solar Energy 2 get storage element status function.
This function reads the storage element voltage and state data of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[out] | bat_vtg_status | : Storage element status data object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t solarenergy2_get_battery_low_state | ( | solarenergy2_t * | ctx | ) |
Solar Energy 2 get BLV state function.
This function gets battery low indicator state of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. See #err_t definition for detailed explanation. uint8_t solarenergy2_get_en_hv_cell_low_state | ( | solarenergy2_t * | ctx | ) |
Solar Energy 2 get HLV state function.
This function gets energy harvester cell low indicator state of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. See #err_t definition for detailed explanation. err_t solarenergy2_get_status | ( | solarenergy2_t * | ctx, |
solarenergy2_status_t * | status ) |
Solar Energy 2 get status function.
This function reads the status data of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[out] | status | : Status data object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_init | ( | solarenergy2_t * | ctx, |
solarenergy2_cfg_t * | cfg ) |
Solar Energy 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See solarenergy2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_set_ldo_cfg | ( | solarenergy2_t * | ctx, |
uint8_t | vaux_ldo, | ||
uint8_t | ulp_ldo ) |
Solar Energy 2 set LDO config function.
This function sets configuration of the LDO regulator of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | vaux_ldo | : VAUX LDO regulated voltage selection
|
[in] | ulp_ldo | : VAUX LDO regulated voltage selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_set_mppt_ratio | ( | solarenergy2_t * | ctx, |
uint8_t | mppt_ratio ) |
Solar Energy 2 set MPPT ratio function.
This function sets the Maximum Power Point Tracking of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[out] | mppt_ratio | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_set_pwr_current_source | ( | solarenergy2_t * | ctx, |
uint8_t | crt_src_sel ) |
Solar Energy 2 power source selection function.
This function sets the power current source selection of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | crt_src_sel | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_set_sleep_vsup | ( | solarenergy2_t * | ctx, |
float | sleep_vsup_sec ) |
Solar Energy 2 set sleep VSUP function.
This function sets the sleep state of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[out] | sleep_vsup_sec | : VSUP sleep time in seconds. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void solarenergy2_set_wup_pin | ( | solarenergy2_t * | ctx, |
uint8_t | state ) |
Solar Energy 2 set WUP pin function.
This function sets the Wake-up pin logic state of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t solarenergy2_soft_reset | ( | solarenergy2_t * | ctx | ) |
Solar Energy 2 soft reset function.
This function perform a software reset of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_store_config | ( | solarenergy2_t * | ctx | ) |
Solar Energy 2 store config function.
This function stores the configuration of the device in the EEPROM memory of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_write_eeprom | ( | solarenergy2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Solar Energy 2 write EEPROM function.
This function writes a desired EEPROM register by using I2C serial interface of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solarenergy2_write_reg | ( | solarenergy2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Solar Energy 2 write register function.
This function writes a desired register by using I2C serial interface of the EM8500 Power Management Controller with Energy Harvesting Interface on the Solar Energy 2 Click board™.
[in] | ctx | : Click context object. See solarenergy2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.