main_ubi_sdk v 0.1.3
This is UBI4 documentation
BQ25883_Driver.h
Go to the documentation of this file.
1/*
2 ******************************************************************************
3 * @file BQ25883_Driver.h
4 * @author A.Alborov
5 ******************************************************************************
6*/
7
8#ifndef SRC_BQ25883_DRIVER_H_
9#define SRC_BQ25883_DRIVER_H_
10
11#include "UBI_SDK.h"
12#include "HAL_DRIVERS.h"
13#include "stdint.h"
14#include "stdbool.h"
15
16#ifdef ENABLE_BQ25883
17
18typedef enum
19{
20 BQ25883_I2C_STATUS_OK = 0x00,
21 BQ25883_I2C_STATUS_ERROR = 0x01,
22 BQ25883_I2C_STATUS_BUSY = 0x02,
23 BQ25883_I2C_STATUS_TIMEOUT = 0x03
24
25}BQ25883_I2C_STATUS_ENUM;
26
27void BQ25883_Driver_Init(I2C_HandleTypeDef* i2c);
28
29BQ25883_I2C_STATUS_ENUM BQ25883_Read(uint8_t Address, uint8_t Register, uint8_t* Data, uint8_t size);
30
31BQ25883_I2C_STATUS_ENUM BQ25883_Write(uint8_t Address, uint8_t Register, uint8_t* Data, uint8_t size);
32
33void BQ25883_Dalay(uint32_t time_ms);
34
35#endif /* ENABLE_BQ25883 */
36
37#endif /* SRC_BQ25883_DRIVER_H_ */