Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
113e686e
Commit
113e686e
authored
Aug 07, 2014
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed types in the fuel gauge driver.
parent
9152e208
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
max17047.c
sw/common/drivers/max17047.c
+5
-5
No files found.
sw/common/drivers/max17047.c
View file @
113e686e
...
...
@@ -107,16 +107,16 @@ int16_t max17047_get_current(void)
max17047_read_reg
(
MAX17047_REG_CURRENT
,
2
,
(
uint8_t
*
)
&
tmp
);
// convert to mA
u
int32_t
curr
=
tmp
*
160
>>
10
;
int32_t
curr
=
tmp
*
160
>>
10
;
return
curr
;
return
(
int16_t
)
curr
;
}
int8_t
max17047_get_temperature
(
void
)
{
u
int8_t
temperature
[
2
];
int8_t
temperature
[
2
];
max17047_read_reg
(
MAX17047_REG_TEMPERATURE
,
2
,
temperature
);
max17047_read_reg
(
MAX17047_REG_TEMPERATURE
,
2
,
(
uint8_t
*
)
temperature
);
return
temperature
[
1
];
}
...
...
@@ -134,7 +134,7 @@ uint16_t max17047_get_time_left(void)
{
uint16_t
time
;
max17047_read_reg
(
MAX17047_REG_TIME_TO_EMPTY
,
2
,
&
time
);
max17047_read_reg
(
MAX17047_REG_TIME_TO_EMPTY
,
2
,
(
uint8_t
*
)
&
time
);
// convert to minutes
time
>>=
5
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment