1 /* -------------------------------- Arctic Core ------------------------------
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
6 * This source code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by the
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * -------------------------------- Arctic Core ------------------------------*/
24 #include "os_config_macros.h"
\r
29 #include "blinker_main.h"
\r
34 void OsIdle( void ) {
\r
39 * This basic task should execute every 10 OS ticks
\r
42 void bTask10( void ) {
\r
44 WdgM_MainFunction_Trigger();
\r
50 * This basic task should execute every 25 OS ticks
\r
52 void bTask25( void ) {
\r
54 WdgM_UpdateAliveCounter(WDBG_ALIVE_LOOP_BLINK_COMPONENT);
\r
55 blinker_component_main();
\r
61 * This basic task should execute every 100 OS ticks
64 void bTask100( void ) {
\r
66 WdgM_MainFunction_AliveSupervision();
\r
71 * This is the startup task. It is activated once immediately after the OS i started.
73 void Startup( void ) {
\r
75 // Call second phase of startup sequence.
\r
79 * Activate scheduled tasks. OS tick is 1ms.
\r
80 * The Blink is run every 25 ms with an offset of 25ms.
\r
82 SetRelAlarm(ALARM_ID_bTask10, 10, 10); // ADC data acquisition
\r
83 SetRelAlarm(ALARM_ID_bTask25, 25, 25); // ADC data acquisition
\r
84 SetRelAlarm(ALARM_ID_bTask100, 100, 100); // ADC data acquisition
\r
86 WdgM_ActivateAliveSupervision(WDBG_ALIVE_LOOP_BLINK_COMPONENT);
\r
88 // End of startup_task().
\r