| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
UM1836 bảng dữ liệu(PDF) 7 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1836 bảng dữ liệu(HTML) 7 Page - STMicroelectronics |
|
7 / 16 page ![]() UM1836 API overview DocID027146 Rev 1 7/16 3 API overview The STC3115 open source driver comes with a full API which allows the driver to be more easily used. The API is declared in the stc3115_Driver.h file and is described in the two sections below. The first of these sections deals with exchange data structures which are used to exchange information between the STC3115 layer and the upper software layer (see Figure 1: "STC3115 software driver architecture"). The second section describes the main functions of the API. 3.1 Exchange data structures There are two exchange data structures: • STC3115_ConfigData_TypeDef • STC3115_BatteryData_TypeDef They have to be created to exchange information between the STC3115 layer and the upper software layer (see Figure 1: "STC3115 software driver architecture"). The STC3115_ConfigData_TypeDef structure is filled by the STSW-BAT001 driver based on the stc3115_Driver.h file content. Its content is used to configure the STC3115. The STC3115_BatteryData_TypeDef structure is filled by the STSW-BAT001 driver and is returned to the upper software layer with an updated battery state. It contains the battery state information. The text below shows an extract of the ConfigData code and the BatteryData code respectively. /*stc3115 configuration structure ----------------------------------- */ typedef struct { int Vmode; /* 1=Voltage mode, 0=mixed mode */ int Alm_SOC; /* SOC alarm level in % */ int Alm_Vbat; /* Vbat alarm level in mV */ int CC_cnf; /* nominal battery CC_cnf */ int VM_cnf; /* nominal battery VM cnf */ int Cnom; /* nominal battery capacity in mAh */ int Rsense; /* sense resistor in mOhms */ int RelaxCurrent; /* relaxation current(< C/20) in mA */ unsigned char OCVOffset[16]; /* OCV curve adjustment in 0.55mV */ } STC3115_ConfigData_TypeDef; /*battery output structure ------------------------------------------ */ typedef struct { int status; /* STC3115 status registers */ int HRSOC; /* battery relative SOC (%) in 1/512% */ int SOC; /* battery relative SOC (%) in 0.1% */ int Voltage; /* battery voltage in mV */ int Current; /* battery current in mA */ int Temperature; /* battery temperature in 0.1°C */ int ConvCounter; /* STC3115 convertion counter in 0.5s */ int OCV; /* battery relax voltage in mV */ int Presence; /* battery presence */ int ChargeValue; /* battery remaining capacity in mAh */ int RemTime; /* battery remaining operating time during discharge */ } STC3115_BatteryData_TypeDef; |
|
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |