| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
UM1836 Datasheet(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1836 Datasheet(HTML) 13 Page - STMicroelectronics |
|
13 / 16 page ![]() UM1836 Code to call the API of the STC3115 open source driver DocID027146 Rev 1 13/16 5 Code to call the API of the STC3115 open source driver The code below is an example of how to call the API of the STC3115 open source driver to report battery information to the application. #include "stc3115_Driver.h" int main(void) { int i=0; STC3115_ConfigData_TypeDef STC3115_ConfigData; STC3115_BatteryData_TypeDef STC3115_BatteryData; /* Initialize I2C and GPIO */ IO_Init(); /* Initialize Gas Gauge */ GasGauge_Initialization(&STC3115_ConfigData, &STC3115_BatteryData); /* Read and print Gas Gauge values */ while(1){ /* Update Gas Gauge driver */ if(i == GASGAUGE_PERIOD){ GasGauge_Task(&STC3115_ConfigData, &STC3115_BatteryData); printf("Vbat: %i mV, I=%i mA SoC=%i, C=%i, P=%i A=%i , CC=%d\r\n", STC3115_BatteryData.Voltage, STC3115_BatteryData.Voltage, STC3115_BatteryData.Current, STC3115_BatteryData.SOC, STC3115_BatteryData.ChargeValue, STC3115_BatteryData.Presence, STC3115_BatteryData.status >> 13, STC3115_BatteryData.ConvCounter); i=0; } i++; } Return 0; } |
|
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |