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
f9419a5a
Commit
f9419a5a
authored
Jan 30, 2015
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added checking of GPS WAKEUP pin
parent
ea178110
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
gps.c
sw/common/drivers/gps.c
+12
-0
gps.h
sw/common/drivers/gps.h
+1
-0
status_bar.c
sw/freewatch/src/apps/widgets/status_bar.c
+1
-1
No files found.
sw/common/drivers/gps.c
View file @
f9419a5a
...
@@ -141,6 +141,18 @@ void gps_on_off_pulse()
...
@@ -141,6 +141,18 @@ void gps_on_off_pulse()
fixed
=
0
;
fixed
=
0
;
}
}
/**
* @brief
* Get state of the GPS WAKUP pin.
* @return
* '1' when the GPS is on (WAKUP = 1)
* '0' when the GPS is off (WAKUP = 0)
*/
int
gps_on
()
{
return
GPIO_PinInGet
(
gpioPortA
,
1
);
}
/**
/**
* @brief
* @brief
* Set state of the GPS reset pin.
* Set state of the GPS reset pin.
...
...
sw/common/drivers/gps.h
View file @
f9419a5a
...
@@ -59,6 +59,7 @@ struct gps_utc {
...
@@ -59,6 +59,7 @@ struct gps_utc {
/*=====================*/
/*=====================*/
void
gps_init
(
int
pulse_onoff
);
void
gps_init
(
int
pulse_onoff
);
void
gps_on_off_pulse
();
void
gps_on_off_pulse
();
int
gps_on
();
void
gps_reset
(
int
val
);
void
gps_reset
(
int
val
);
int
gps_get_irq_sync
();
int
gps_get_irq_sync
();
void
gps_set_irq_sync
();
void
gps_set_irq_sync
();
...
...
sw/freewatch/src/apps/widgets/status_bar.c
View file @
f9419a5a
...
@@ -54,7 +54,7 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
...
@@ -54,7 +54,7 @@ static void status_bar_event(struct ui_widget *w, const struct event *evt)
{
{
switch
(
evt
->
type
)
{
switch
(
evt
->
type
)
{
case
GPS_TICK
:
case
GPS_TICK
:
if
(
setting_get
(
&
setting_gps_on
))
{
if
(
gps_on
(
))
{
if
(
gps_fixed
())
{
if
(
gps_fixed
())
{
memcpy
(
&
gps_ico
,
&
gps_receiving
,
memcpy
(
&
gps_ico
,
&
gps_receiving
,
sizeof
(
struct
rle_bitmap
));
sizeof
(
struct
rle_bitmap
));
...
...
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