STSW-STLKT01: Drivers/BSP/SensorTile/SensorTile_gg.h Source File

STSW-STLKT01

STSW-STLKT01
SensorTile_gg.h
Go to the documentation of this file.
1 
40 /* Define to prevent recursive inclusion -------------------------------------*/
41 #ifndef __SENSORTILE_GG_H
42 #define __SENSORTILE_GG_H
43 
44 #ifdef __cplusplus
45  extern "C" {
46 #endif
47 
48 /* Includes ------------------------------------------------------------------*/
49 #include "SensorTile.h"
50 /* Include GG sensor component driver */
51 #include "../Components/stc3115/STC3115_Driver.h"
52 
68 typedef enum
69 {
70  GG_OK = 0,
71  GG_ERROR = 1,
72  GG_TIMEOUT = 2
73 }
74 GG_StatusTypeDef;
75 
76 typedef enum
77 {
78  GG_AUTO = -1, /* Always first element and equal to -1 */
79  STC3115_0, /* GG on SensorTile Cradle */
80 } GG_ID_t;
81 
89 #define GG_MAX_NUM 1
90 #define GG1 0
91 
107 /* Sensor Configuration Functions */
108 DrvStatusTypeDef BSP_GG_Init( void **handle );
109 
110 DrvStatusTypeDef BSP_GG_DeInit( void **handle );
111 DrvStatusTypeDef BSP_GG_IsInitialized( void *handle, uint8_t *status );
112 DrvStatusTypeDef BSP_GG_IsCombo( void *handle, uint8_t *status );
113 DrvStatusTypeDef BSP_GG_Get_WhoAmI( void *handle, uint8_t *who_am_i );
114 
115 
116 DrvStatusTypeDef BSP_GG_Task( void *handle, uint8_t*);
117 DrvStatusTypeDef BSP_GG_Reset( void *handle );
118 DrvStatusTypeDef BSP_GG_Stop( void *handle );
119 DrvStatusTypeDef BSP_GG_GetOCV( void *handle, uint32_t* );
120 DrvStatusTypeDef BSP_GG_GetSOC( void *handle, uint32_t* );
121 DrvStatusTypeDef BSP_GG_GetChargeValue( void *handle, uint32_t* );
122 DrvStatusTypeDef BSP_GG_GetPresence( void *handle, uint32_t* );
123 DrvStatusTypeDef BSP_GG_GetCurrent( void *handle, int32_t* );
124 DrvStatusTypeDef BSP_GG_GetTemperature( void *handle, int32_t* );
125 DrvStatusTypeDef BSP_GG_GetVoltage( void *handle, uint32_t* );
126 DrvStatusTypeDef BSP_GG_GetRemTime( void *handle, int32_t* );
127 
144 #ifdef __cplusplus
145  }
146 #endif
147 
148 #endif /* __SENSORTILE_GG_H */
149 
150 
151 
152 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
DrvStatusTypeDef BSP_GG_GetSOC(void *handle, uint32_t *soc)
Get the SOC.
DrvStatusTypeDef BSP_GG_Stop(void *handle)
Stop the gas gauge system.
DrvStatusTypeDef BSP_GG_GetPresence(void *handle, uint32_t *presence)
Get the presence.
DrvStatusTypeDef BSP_GG_IsInitialized(void *handle, uint8_t *status)
Check if the gas gauge sensor is initialized.
DrvStatusTypeDef BSP_GG_Get_WhoAmI(void *handle, uint8_t *who_am_i)
Get the WHO_AM_I ID of the gas gauge sensor.
DrvStatusTypeDef BSP_GG_GetRemTime(void *handle, int32_t *remTime)
Get the estimated remaining time.
DrvStatusTypeDef BSP_GG_IsCombo(void *handle, uint8_t *status)
Check if the gas gauge sensor is combo.
DrvStatusTypeDef BSP_GG_GetChargeValue(void *handle, uint32_t *chrgValue)
Get the charge value.
This file contains definitions for SensorTile.c file.
DrvStatusTypeDef BSP_GG_GetCurrent(void *handle, int32_t *current)
Get the current.
DrvStatusTypeDef BSP_GG_Task(void *handle, uint8_t *vm_mode)
Task to read periodically data of STC3115.
DrvStatusTypeDef BSP_GG_GetVoltage(void *handle, uint32_t *voltage)
Get the voltage.
DrvStatusTypeDef BSP_GG_Init(void **handle)
Set GG Initialization.
DrvStatusTypeDef BSP_GG_GetOCV(void *handle, uint32_t *ocv)
Get the OCV.
DrvStatusTypeDef BSP_GG_GetTemperature(void *handle, int32_t *temp)
Get the temperature.
DrvStatusTypeDef BSP_GG_DeInit(void **handle)
Deinitialize a gas gauge sensor.
DrvStatusTypeDef BSP_GG_Reset(void *handle)
Reboot memory content of GG.
Generated by   doxygen 1.8.13