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
5560e971
Commit
5560e971
authored
Oct 04, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move setting_t declaration to settings.h
parent
81a5945e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
menu_struct.h
sw/freertos/src/apps/menu_struct.h
+1
-6
settings.c
sw/freertos/src/apps/settings/settings.c
+2
-2
settings.h
sw/freertos/src/apps/settings/settings.h
+6
-1
No files found.
sw/freertos/src/apps/menu_struct.h
View file @
5560e971
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "application.h"
#include "application.h"
#include "bitmaps.h"
#include "bitmaps.h"
#include "settings/settings.h"
/**
/**
* @brief Type of menu entry.
* @brief Type of menu entry.
...
@@ -40,12 +41,6 @@ enum entry_type {
...
@@ -40,12 +41,6 @@ enum entry_type {
END
// sentinel, should be put as the last entry
END
// sentinel, should be put as the last entry
};
};
typedef
struct
setting
{
char
name
[
16
];
uint32_t
val
;
uint32_t
valmod
;
}
setting_t
;
/**
/**
* @brief Structure that represents a single
* @brief Structure that represents a single
* entry - either application or submenu.
* entry - either application or submenu.
...
...
sw/freertos/src/apps/settings/settings.c
View file @
5560e971
...
@@ -30,11 +30,11 @@ setting_t setting_coord_style = {"Coord style", 1, 3};
...
@@ -30,11 +30,11 @@ setting_t setting_coord_style = {"Coord style", 1, 3};
void
setting_change
(
setting_t
*
setting
)
void
setting_change
(
setting_t
*
setting
)
{
{
uint32_
t
v
=
setting
->
val
;
in
t
v
=
setting
->
val
;
char
s
[
16
];
char
s
[
16
];
v
++
;
v
++
;
v
%=
setting
->
valmod
;
v
%=
setting
->
nrvals
;
sprintf
(
s
,
": %d"
,
v
);
sprintf
(
s
,
": %d"
,
v
);
...
...
sw/freertos/src/apps/settings/settings.h
View file @
5560e971
...
@@ -29,7 +29,12 @@
...
@@ -29,7 +29,12 @@
#define SETTINGS_H
#define SETTINGS_H
#include "application.h"
#include "application.h"
#include "menu_struct.h"
typedef
struct
setting
{
char
name
[
16
];
int
val
;
int
nrvals
;
}
setting_t
;
extern
application
set_time
;
extern
application
set_time
;
extern
application
set_date
;
extern
application
set_date
;
...
...
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