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
5f803468
Commit
5f803468
authored
Oct 07, 2014
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed xQueueReceive() ticks-to-wait parameter in tasks.
parent
347afa14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
16 additions
and
18 deletions
+16
-18
buzzer.c
sw/common/drivers/buzzer.c
+0
-2
clock.c
sw/freertos/src/apps/clock.c
+1
-1
compass.c
sw/freertos/src/apps/compass.c
+1
-1
example_app.c
sw/freertos/src/apps/example_app.c
+3
-3
game.c
sw/freertos/src/apps/game.c
+2
-2
gpscoord.c
sw/freertos/src/apps/gpscoord.c
+1
-1
menu.c
sw/freertos/src/apps/menu.c
+1
-1
reset.c
sw/freertos/src/apps/reset.c
+1
-1
set_date.c
sw/freertos/src/apps/settings/set_date.c
+1
-1
set_gmt_ofs.c
sw/freertos/src/apps/settings/set_gmt_ofs.c
+1
-1
set_time.c
sw/freertos/src/apps/settings/set_time.c
+1
-1
usb_mass_storage.c
sw/freertos/src/apps/usb_mass_storage.c
+1
-1
battery_task.c
sw/freertos/src/battery_task.c
+1
-1
blight_task.c
sw/freertos/src/blight_task.c
+1
-1
No files found.
sw/common/drivers/buzzer.c
View file @
5f803468
...
...
@@ -31,8 +31,6 @@
#include <em_gpio.h>
#include <em_timer.h>
#define BUZZER_PWM_FREQ 10000
void
buzzer_init
(
void
)
{
// Configure buzzer pin as push/pull output
...
...
sw/freertos/src/apps/clock.c
View file @
5f803468
...
...
@@ -105,7 +105,7 @@ void clock_main(void* params) {
// Event loop
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TR
)
...
...
sw/freertos/src/apps/compass.c
View file @
5f803468
...
...
@@ -132,7 +132,7 @@ void compass_main(void *params)
/*main loop*/
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
100
/
portTICK_RATE_MS
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TR
)
...
...
sw/freertos/src/apps/example_app.c
View file @
5f803468
...
...
@@ -69,14 +69,14 @@ static void widget_event(struct ui_widget *w, const struct event *evt)
// short vibration
vibra_enable
();
vTaskDelay
(
100
);
vTaskDelay
(
400
/
portTICK_RATE_MS
);
vibra_disable
();
break
;
case
RTC_TICK
:
// tick-tock with a buzzer
buzzer_enable
();
vTaskDelay
(
100
);
vTaskDelay
(
400
/
portTICK_RATE_MS
);
buzzer_disable
();
// ok, we do not need redrawing
w
->
flags
&=
~
WF_DIRTY
;
...
...
@@ -137,7 +137,7 @@ void example_main(void* params) {
// "0" in the line below, if you set it to a positive value then
// you may have a block of code that is executed when no event arrives
// for details, see below (else block)
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
// decide which events are relevant and should be handled
// you may save some cycles if you list them here instead of
...
...
sw/freertos/src/apps/game.c
View file @
5f803468
...
...
@@ -126,7 +126,7 @@ void game_main(void *params)
/*main loop*/
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
30
/
portTICK_RATE_MS
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TR
)
{
...
...
@@ -173,7 +173,7 @@ void game_main(void *params)
win_y1
=
S_WIN_Y1
;
vibra_enable
();
buzzer_enable
();
vTaskDelay
(
100
);
vTaskDelay
(
300
/
portTICK_RATE_MS
);
vibra_disable
();
buzzer_disable
();
}
else
{
...
...
sw/freertos/src/apps/gpscoord.c
View file @
5f803468
...
...
@@ -153,7 +153,7 @@ void gpscoord_main(void *params)
ui_update
(
NULL
);
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TR
)
...
...
sw/freertos/src/apps/menu.c
View file @
5f803468
...
...
@@ -195,7 +195,7 @@ void menu_main(void* params) {
// Once it is deactivated - display the menu
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TL
)
{
...
...
sw/freertos/src/apps/reset.c
View file @
5f803468
...
...
@@ -60,7 +60,7 @@ void reset_main(void *params)
ui_update
(
NULL
);
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TR
)
...
...
sw/freertos/src/apps/settings/set_date.c
View file @
5f803468
...
...
@@ -175,7 +175,7 @@ void set_date_main(void* params) {
// event loop
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TL
)
{
...
...
sw/freertos/src/apps/settings/set_gmt_ofs.c
View file @
5f803468
...
...
@@ -165,7 +165,7 @@ void set_gmt_ofs_main(void* params) {
// event loop
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TL
)
{
...
...
sw/freertos/src/apps/settings/set_time.c
View file @
5f803468
...
...
@@ -140,7 +140,7 @@ void set_time_main(void* params) {
// event loop
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
0
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TL
)
{
...
...
sw/freertos/src/apps/usb_mass_storage.c
View file @
5f803468
...
...
@@ -90,7 +90,7 @@ void usb_ms_main(void* params) {
while
(
1
)
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
1
))
{
if
(
xQueueReceive
(
appQueue
,
&
evt
,
portMAX_DELAY
))
{
switch
(
evt
.
type
)
{
case
BUTTON_PRESSED
:
if
(
evt
.
data
.
button
==
BUT_TR
)
{
...
...
sw/freertos/src/battery_task.c
View file @
5f803468
...
...
@@ -36,7 +36,7 @@
#include <stdbool.h>
///> Number of ticks between battery status polling
#define BATTERY_TASK_PERIOD
4000
#define BATTERY_TASK_PERIOD
(4000 / portTICK_RATE_MS)
///> Timer handle
static
xTimerHandle
timer_handle
;
...
...
sw/freertos/src/blight_task.c
View file @
5f803468
...
...
@@ -35,7 +35,7 @@
#include <drivers/light_sensor.h>
///> Number of ticks between backlight adjustments
#define BLIGHT_TASK_PERIOD
3000
#define BLIGHT_TASK_PERIOD
(5000 / portTICK_RATE_MS)
///> Entry that stores an appropriate backlight level value
///> depending on the light sensor readings.
...
...
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