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
4a92246f
Commit
4a92246f
authored
Aug 14, 2014
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed line endings.
parent
b7086673
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
828 additions
and
836 deletions
+828
-836
FreeRTOSConfig.h
sw/freertos/src/FreeRTOSConfig.h
+208
-208
low_power_tick_management.c
sw/freertos/src/low_power_tick_management.c
+553
-553
main.c
sw/freertos/src/main.c
+67
-67
readme.txt
sw/freertos/src/readme.txt
+0
-8
No files found.
sw/freertos/src/FreeRTOSConfig.h
View file @
4a92246f
This diff is collapsed.
Click to expand it.
sw/freertos/src/low_power_tick_management.c
View file @
4a92246f
This diff is collapsed.
Click to expand it.
sw/freertos/src/main.c
View file @
4a92246f
/*
/*
* Copyright (C) 2014 Julian Lewis
* Copyright (C) 2014 Julian Lewis
* @author Maciej Suminski <maciej.suminski@cern.ch>
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
/**
/**
* @brief Main file.
* @brief Main file.
*/
*/
#include <FreeRTOSConfig.h>
#include <FreeRTOSConfig.h>
#include <FreeRTOS.h>
#include <FreeRTOS.h>
#include <task.h>
#include <task.h>
#include <em_chip.h>
#include <em_chip.h>
#include <em_gpio.h>
#include <em_gpio.h>
#include <em_cmu.h>
#include <em_cmu.h>
#include <sleep.h>
#include <sleep.h>
#include <drivers/buttons.h>
#include <drivers/buttons.h>
#define STACK_SIZE_FOR_TASK (configMINIMAL_STACK_SIZE + 10)
#define STACK_SIZE_FOR_TASK (configMINIMAL_STACK_SIZE + 10)
#define TASK_PRIORITY (tskIDLE_PRIORITY + 1)
#define TASK_PRIORITY (tskIDLE_PRIORITY + 1)
int
main
(
void
)
int
main
(
void
)
{
{
// Chip errata
// Chip errata
CHIP_Init
();
CHIP_Init
();
// Enable clocks
// Enable clocks
CMU_ClockEnable
(
cmuClock_HFPER
,
true
);
CMU_ClockEnable
(
cmuClock_HFPER
,
true
);
CMU_ClockEnable
(
cmuClock_GPIO
,
true
);
CMU_ClockEnable
(
cmuClock_GPIO
,
true
);
buttons_init
();
buttons_init
();
GPIO_PinModeSet
(
gpioPortE
,
11
,
gpioModePushPull
,
0
);
GPIO_PinModeSet
(
gpioPortE
,
11
,
gpioModePushPull
,
0
);
GPIO_PinModeSet
(
gpioPortE
,
12
,
gpioModePushPull
,
0
);
GPIO_PinModeSet
(
gpioPortE
,
12
,
gpioModePushPull
,
0
);
// Initialize SLEEP driver, no callbacks are used
// Initialize SLEEP driver, no callbacks are used
SLEEP_Init
(
NULL
,
NULL
);
SLEEP_Init
(
NULL
,
NULL
);
#if (configSLEEP_MODE < 3)
#if (configSLEEP_MODE < 3)
// do not let to sleep deeper than define
// do not let to sleep deeper than define
SLEEP_SleepBlockBegin
((
SLEEP_EnergyMode_t
)(
configSLEEP_MODE
+
1
));
SLEEP_SleepBlockBegin
((
SLEEP_EnergyMode_t
)(
configSLEEP_MODE
+
1
));
#endif
#endif
// Start FreeRTOS Scheduler
// Start FreeRTOS Scheduler
vTaskStartScheduler
();
vTaskStartScheduler
();
return
0
;
return
0
;
}
}
sw/freertos/src/readme.txt
deleted
100644 → 0
View file @
b7086673
FreeRTOS - Blink example
This example project uses the FreeRTOS, and gives a basic demonstration of using two tasks to blink the LEDs on the board.
It also shows how to use idle with different energy saving modes ( from EM1 to EM3 - configured in FreeRTOSConfig.h file).
This example is intended as a skeleton for new projects using FreeRTOS.
Board: Energy Micro EFM32GG_STK3700 Starter Kit
Device: EFM32GG990F1024
\ No newline at end of file
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