BlueNinja BSP  0.5
Cerevo BlueNinja(CDP-TZ01B) Board Support Packageリファレンスマニュアル
BQ24250.h
[詳解]
1 
8 /*
9 Copyright 2015 Cerevo Inc.
10 
11 Licensed under the Apache License, Version 2.0 (the "License");
12 you may not use this file except in compliance with the License.
13 You may obtain a copy of the License at
14 
15  http://www.apache.org/licenses/LICENSE-2.0
16 
17 Unless required by applicable law or agreed to in writing, software
18 distributed under the License is distributed on an "AS IS" BASIS,
19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 See the License for the specific language governing permissions and
21 limitations under the License.
22 */
23 
24 #ifndef _BQ24250_H_
25 #define _BQ24250_H_
26 
27 #include <stdint.h>
28 #include <stdbool.h>
29 #include "Driver_I2C.h"
30 
31 #define BQ24250_I2C_ID (0x6a)
32 
34 /* @{ */
35 #define BQ24250_REG_01 (0x00)
36 #define BQ24250_REG_02 (0x01)
37 #define BQ24250_REG_03 (0x02)
38 #define BQ24250_REG_04 (0x03)
39 #define BQ24250_REG_05 (0x04)
40 #define BQ24250_REG_06 (0x05)
41 #define BQ24250_REG_07 (0x06)
42 /* @} */
43 
48 /* @{ */
49 #define BQ24250_DEF_01 (0x00)
50 #define BQ24250_DEF_02 (0x0c)
51 #define BQ24250_DEF_03 (0x8f)
52 #define BQ24250_DEF_04 (0xf8)
53 #define BQ24250_DEF_05 (0x02)
54 #define BQ24250_DEF_06 (0xa0)
55 #define BQ24250_DEF_07 (0xe0)
56 /* @} */
57 
58 
59 bool BQ24250_drv_reg01_set(uint8_t val);
60 uint8_t BQ24250_drv_reg01_get(void);
61 bool BQ24250_drv_reg02_set(uint8_t val);
62 uint8_t BQ24250_drv_reg02_get(void);
63 bool BQ24250_drv_reg03_set(uint8_t val);
64 uint8_t BQ24250_drv_reg03_get(void);
65 bool BQ24250_drv_reg04_set(uint8_t val);
66 uint8_t BQ24250_drv_reg04_get(void);
67 bool BQ24250_drv_reg05_set(uint8_t val);
68 uint8_t BQ24250_drv_reg05_get(void);
69 bool BQ24250_drv_reg06_set(uint8_t val);
70 uint8_t BQ24250_drv_reg06_get(void);
71 bool BQ24250_drv_reg07_set(uint8_t val);
72 uint8_t BQ24250_drv_reg07_get(void);
73 
82 bool BQ24250_drv_init(ARM_DRIVER_I2C *i2c_drv, bool ts_enable);
83 
84 #endif
bool BQ24250_drv_init(ARM_DRIVER_I2C *i2c_drv, bool ts_enable)
Initialize BQ24250.
Definition: BQ24250.c:291