| 전자부품 데이터시트 검색엔진 |
|
UM1836 데이터시트(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1836 데이터시트(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; } |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |