mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Add FreeRTOS-Plus directory.
This commit is contained in:
parent
7bd5f21ad5
commit
f508a5f653
6798 changed files with 134949 additions and 19 deletions
632
FreeRTOS/Demo/PIC18_WizC/Demo6/Demo6.PC
Normal file
632
FreeRTOS/Demo/PIC18_WizC/Demo6/Demo6.PC
Normal file
|
@ -0,0 +1,632 @@
|
|||
[F29012549]
|
||||
x=0
|
||||
y=111
|
||||
[F15207742]
|
||||
x=0
|
||||
y=48
|
||||
[F28463201]
|
||||
x=0
|
||||
y=0
|
||||
[F30163998]
|
||||
x=60
|
||||
y=44
|
||||
[F29565822]
|
||||
x=2
|
||||
y=23
|
||||
[F26101515]
|
||||
x=0
|
||||
y=269
|
||||
[ProjectGroup]
|
||||
nFiles=1
|
||||
FileName0=Demo6.PC
|
||||
[Project]
|
||||
nFiles=6
|
||||
UseAD=0
|
||||
CompatOpts=0
|
||||
AutoHead=
|
||||
IdentifierPrint=0
|
||||
TreePrint=0
|
||||
StatementResultPrint=0
|
||||
SourcePrint=0
|
||||
spoPrint=0
|
||||
AsmPrint=0
|
||||
CaseSens=1
|
||||
Optimise=45
|
||||
AProcFreq=40000000
|
||||
LOptBytes=16
|
||||
LOptBytesReg=6
|
||||
TopROM=32767
|
||||
StackPointer=3839
|
||||
HeapPointer=3584
|
||||
HasDoneOptionDialog=1
|
||||
ASMProcessor=18F4620
|
||||
UseLinker=0
|
||||
DEBUGADV=1
|
||||
Column0=-1
|
||||
Column1=-1
|
||||
Column2=258
|
||||
TabIndex=0
|
||||
ShowIcons=0
|
||||
WindowState=0
|
||||
Top=418
|
||||
Left=0
|
||||
Width=339
|
||||
Height=209
|
||||
FileType0_Name=main.c
|
||||
FileType0_FileType=0
|
||||
FileType0_DoLast=0
|
||||
FileType1_Name=interrupt.c
|
||||
FileType1_FileType=0
|
||||
FileType1_DoLast=0
|
||||
FileType2_Name=fuses.c
|
||||
FileType2_FileType=0
|
||||
FileType2_DoLast=0
|
||||
FileType3_Name=..\..\Common\Minimal\comtest.c
|
||||
FileType3_FileType=0
|
||||
FileType3_DoLast=0
|
||||
FileType4_Name=..\serial\serial.c
|
||||
FileType4_FileType=0
|
||||
FileType4_DoLast=0
|
||||
FileType5_Name=..\ParTest\ParTest.c
|
||||
FileType5_FileType=0
|
||||
FileType5_DoLast=0
|
||||
[Debug]
|
||||
WindowState=0
|
||||
Top=0
|
||||
Left=679
|
||||
Width=338
|
||||
Height=626
|
||||
WinNumberIsIndex0=4097
|
||||
WinNumberIsIndex1=4096
|
||||
WinNumberIsIndex2=12
|
||||
WinNumberIsIndex3=9
|
||||
WinNumberIsIndex4=8
|
||||
WinNumberIsIndex5=7
|
||||
WinNumberIsIndex6=5
|
||||
WinNumberIsIndex7=4
|
||||
WinNumberIsIndex8=3
|
||||
WinNumberIsIndex9=2
|
||||
WinNumberIsIndex10=1
|
||||
WinNumberIsIndex11=11
|
||||
WinNumberIsIndex12=0
|
||||
nWin=13
|
||||
HType=0
|
||||
HFreq=19
|
||||
ScenixTurbo=1
|
||||
Watchdog=0
|
||||
LocalVariables=0
|
||||
DBPort=3970
|
||||
DBBit=3
|
||||
UseICD=0
|
||||
AutoSet=1
|
||||
DBVars=3824
|
||||
DBRate=19200
|
||||
DBSerPort=4
|
||||
UsePICKey=2
|
||||
nTabs=4
|
||||
Tab0=Main
|
||||
Tab1=Memory
|
||||
Tab2=Special
|
||||
Tab3=History
|
||||
WinNumberIsIndex13=0
|
||||
WinNumberIsIndex14=0
|
||||
LocalVariablesTop=31
|
||||
LocalVariablesLeft=681
|
||||
[Window4097]
|
||||
aHeight=0
|
||||
aWidth=0
|
||||
Height=121
|
||||
Width=200
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=10
|
||||
y=299
|
||||
Left=0
|
||||
Top=157
|
||||
Group=0
|
||||
Page=-1
|
||||
[ExtDev4097]
|
||||
Type=2
|
||||
TypeN=Terminal
|
||||
Pars0=10
|
||||
Name=Terminal
|
||||
FileName=
|
||||
Layer=0
|
||||
Ports0=2
|
||||
Bit0=6
|
||||
ConLev0=-1
|
||||
Ports1=2
|
||||
Bit1=7
|
||||
ConLev1=-1
|
||||
Pars1=0
|
||||
Pars2=0
|
||||
[Window4096]
|
||||
aHeight=0
|
||||
aWidth=0
|
||||
Height=200
|
||||
Width=90
|
||||
isMinimised=0
|
||||
isVisible=1
|
||||
ShowBorder=0
|
||||
ShowCaption=0
|
||||
Sizeable=0
|
||||
x=10
|
||||
y=299
|
||||
Left=43
|
||||
Top=131
|
||||
Group=0
|
||||
Page=-1
|
||||
[ExtDev4096]
|
||||
Type=12
|
||||
TypeN=Pin Out
|
||||
Ports0=2
|
||||
Bit0=6
|
||||
ConLev0=-1
|
||||
Ports1=2
|
||||
Bit1=7
|
||||
ConLev1=-1
|
||||
Pars0=0
|
||||
Pars1=0
|
||||
Pars2=0
|
||||
Name=Pin Out : 18F4620
|
||||
FileName=
|
||||
Layer=1
|
||||
ConPars0_0=1
|
||||
[Window12]
|
||||
aHeight=274
|
||||
aWidth=732
|
||||
Height=141
|
||||
Width=241
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=0
|
||||
y=38
|
||||
Left=0
|
||||
Top=100
|
||||
Group=0
|
||||
Page=1
|
||||
[Window9]
|
||||
aHeight=250
|
||||
aWidth=250
|
||||
Height=247
|
||||
Width=231
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=0
|
||||
x=98
|
||||
y=133
|
||||
Left=49
|
||||
Top=149
|
||||
Group=0
|
||||
Page=15
|
||||
[Window8]
|
||||
aHeight=250
|
||||
aWidth=250
|
||||
Height=266
|
||||
Width=283
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=139
|
||||
y=0
|
||||
Left=45
|
||||
Top=81
|
||||
Group=0
|
||||
Page=8
|
||||
[Window7]
|
||||
aHeight=947
|
||||
aWidth=978
|
||||
Height=490
|
||||
Width=322
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=16
|
||||
y=45
|
||||
Left=5
|
||||
Top=104
|
||||
Group=0
|
||||
Page=3
|
||||
[Window5]
|
||||
aHeight=955
|
||||
aWidth=490
|
||||
Height=494
|
||||
Width=161
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=504
|
||||
y=42
|
||||
Left=166
|
||||
Top=102
|
||||
Group=0
|
||||
Page=2
|
||||
[Window4]
|
||||
aHeight=766
|
||||
aWidth=1000
|
||||
Height=396
|
||||
Width=330
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=0
|
||||
y=0
|
||||
Left=0
|
||||
Top=81
|
||||
Group=0
|
||||
Page=2
|
||||
[Window3]
|
||||
aHeight=306
|
||||
aWidth=985
|
||||
Height=158
|
||||
Width=325
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=0
|
||||
y=577
|
||||
Left=0
|
||||
Top=379
|
||||
Group=0
|
||||
Page=7
|
||||
[Window2]
|
||||
aHeight=1000
|
||||
aWidth=538
|
||||
Height=518
|
||||
Width=177
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=462
|
||||
y=0
|
||||
Left=152
|
||||
Top=81
|
||||
Group=0
|
||||
Page=4
|
||||
[Window1]
|
||||
aHeight=283
|
||||
aWidth=998
|
||||
Height=146
|
||||
Width=329
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=0
|
||||
y=714
|
||||
Left=0
|
||||
Top=450
|
||||
Group=0
|
||||
Page=1
|
||||
[Window11]
|
||||
aHeight=335
|
||||
aWidth=560
|
||||
Height=173
|
||||
Width=184
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=200
|
||||
y=666
|
||||
Left=66
|
||||
Top=425
|
||||
Group=0
|
||||
Page=11
|
||||
[Window0]
|
||||
aHeight=550
|
||||
aWidth=930
|
||||
Height=284
|
||||
Width=306
|
||||
isMinimised=1
|
||||
isVisible=1
|
||||
ShowBorder=1
|
||||
ShowCaption=1
|
||||
Sizeable=1
|
||||
x=9
|
||||
y=73
|
||||
Left=2
|
||||
Top=118
|
||||
Group=0
|
||||
Page=1
|
||||
[APPWIZ]
|
||||
AProcFreq=4000000
|
||||
nUserTemp=0
|
||||
Proc=16F84
|
||||
Left=-92
|
||||
Top=-4584
|
||||
Width=750
|
||||
Heigth=600
|
||||
nElem=0
|
||||
[GLOBAL]
|
||||
LoadCheck=2
|
||||
SimulateAll=1
|
||||
[MainWindow]
|
||||
WindowState=2
|
||||
Top=-4
|
||||
Left=-4
|
||||
Width=1032
|
||||
Height=748
|
||||
Update=25000
|
||||
StopOnError=1
|
||||
[FindRep]
|
||||
nTextFind=4
|
||||
nTextReplace=0
|
||||
TextFind0=USERisrs
|
||||
TextFind1=spbrg16
|
||||
TextFind2=xSerialPortInitMinimal
|
||||
TextFind3=bgie
|
||||
[EditWindow]
|
||||
Tab=0
|
||||
nFiles=1
|
||||
nMRU=9
|
||||
MarginOn=1
|
||||
MarginType=2
|
||||
WindowState=0
|
||||
Top=0
|
||||
Left=0
|
||||
Width=679
|
||||
Height=418
|
||||
Files0=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo6\main.c
|
||||
MRU0=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\Demo6\main.c
|
||||
Files1=C:\PROGRA~1\FED\PIXIE\Libs\LibCore\Bit16.asm
|
||||
MRU1=C:\PROGRA~1\FED\PIXIE\Libs\LibCore\Bit16.asm
|
||||
Files2=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo6\Demo6.rep
|
||||
MRU2=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo6\Demo6.rep
|
||||
Files3=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\serial\serial.c
|
||||
MRU3=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Tasks.c
|
||||
MRU4=C:\Program Files\FED\PIXIE\Libs\LibsUser\FreeRTOS.h
|
||||
MRU5=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Port.c
|
||||
MRU6=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Queue.c
|
||||
MRU7=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\serial\isrSerialTx.c
|
||||
Files4=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Queue.c
|
||||
MRU8=C:\DOCUMENTS AND SETTINGS\MARCEL\MY DOCUMENTS\PIC\FREERTOS\FREERTOS\DEMO\PIC18_WIZC\DEMO6\INTERRUPT_pp.asm
|
||||
Files5=C:\Program Files\FED\PIXIE\Libs\LibsUser\libFreeRTOS\Drivers\Tick\isrTick.c
|
||||
Files6=C:\Program Files\FED\PIXIE\Libs\LibsUser\libFreeRTOS\Modules\Port.c
|
||||
Files7=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo6\interrupt.c
|
||||
Files8=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\serial\isrSerialRx.c
|
||||
Files9=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\serial\isrSerialTx.c
|
||||
Files10=C:\Documents and Settings\marcel\My Documents\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WizC\Demo6\FreeRTOSConfig.h
|
||||
Files11=C:\DOCUMENTS AND SETTINGS\marcel\MY DOCUMENTS\pic\FreeRTOS\FreeRTOS\Demo\PIC18_WIZC\ParTest\ParTest.c
|
||||
Files12=C:\DOCUMENTS AND SETTINGS\MARCEL\MY DOCUMENTS\PIC\FREERTOS\FREERTOS\DEMO\PIC18_WIZC\DEMO6\INTERRUPT_pp.asm
|
||||
Files13=C:\DOCUMENTS AND SETTINGS\MARCEL\MY DOCUMENTS\PIC\FREERTOS\FREERTOS\DEMO\PIC18_WIZC\SERIAL\SERIAL_pp.asm
|
||||
Files14=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\Tasks.c
|
||||
Files15=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\tasks.c
|
||||
Files16=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\tasks.c
|
||||
Files17=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBFREERTOS\Modules\port.c
|
||||
Files18=C:\PROGRAM FILES\FED\PIXIE\Libs\LibsUser\LIBMALLOC\Malloc.c
|
||||
Files19=C:\PROGRAM FILES\FED\PIXIE\Libs\LIBSTRINGS\STRINGS16.C
|
||||
[PinConnections]
|
||||
nPins=0
|
||||
[AssCode]
|
||||
ProcType=18F4620
|
||||
[Information]
|
||||
Column0=-1
|
||||
Column1=8
|
||||
Column2=4
|
||||
Column3=16
|
||||
Column4=-1
|
||||
Column5=50
|
||||
MemoHeight=154
|
||||
WindowState=0
|
||||
Top=418
|
||||
Left=339
|
||||
Width=339
|
||||
Height=209
|
||||
[F29012805]
|
||||
x=0
|
||||
y=110
|
||||
[F29217358]
|
||||
x=0
|
||||
y=163
|
||||
[F30243933]
|
||||
x=0
|
||||
y=4673
|
||||
[F29217125]
|
||||
x=17
|
||||
y=37
|
||||
[F30827659]
|
||||
x=0
|
||||
y=4704
|
||||
[F20376480]
|
||||
x=0
|
||||
y=1329
|
||||
[F30164254]
|
||||
x=57
|
||||
y=45
|
||||
[F29566078]
|
||||
x=30
|
||||
y=28
|
||||
[Window4098]
|
||||
aHeight=0
|
||||
aWidth=0
|
||||
Height=38
|
||||
Width=25
|
||||
isMinimised=0
|
||||
isVisible=1
|
||||
ShowBorder=0
|
||||
ShowCaption=0
|
||||
Sizeable=1
|
||||
x=10
|
||||
y=299
|
||||
Left=13
|
||||
Top=137
|
||||
Group=0
|
||||
Page=-1
|
||||
[ExtDev4098]
|
||||
Type=4
|
||||
TypeN=PushButton
|
||||
Ports0=2
|
||||
Bit0=6
|
||||
ConLev0=-1
|
||||
ConPars0_0=1
|
||||
Ports1=2
|
||||
Bit1=7
|
||||
ConLev1=-1
|
||||
Pars0=0
|
||||
Pars1=1
|
||||
Name=PushButton
|
||||
FileName=
|
||||
Layer=0
|
||||
Pars2=0
|
||||
[F28479841]
|
||||
x=0
|
||||
y=78
|
||||
[F30090026]
|
||||
x=13
|
||||
y=50
|
||||
[F29453097]
|
||||
x=0
|
||||
y=144
|
||||
[F20121086]
|
||||
x=23
|
||||
y=71
|
||||
[F20258362]
|
||||
x=0
|
||||
y=7159
|
||||
[F20414028]
|
||||
x=0
|
||||
y=6113
|
||||
[F10478061]
|
||||
x=0
|
||||
y=48
|
||||
[F29011525]
|
||||
x=0
|
||||
y=145
|
||||
[F28396641]
|
||||
x=10
|
||||
y=9
|
||||
[F30162974]
|
||||
x=0
|
||||
y=0
|
||||
[F29564798]
|
||||
x=30
|
||||
y=28
|
||||
[F30146592]
|
||||
x=0
|
||||
y=59
|
||||
[F20220814]
|
||||
x=0
|
||||
y=497
|
||||
[F20539803]
|
||||
x=0
|
||||
y=228
|
||||
[F15568046]
|
||||
x=1
|
||||
y=293
|
||||
[Window4099]
|
||||
aHeight=0
|
||||
aWidth=0
|
||||
Height=38
|
||||
Width=25
|
||||
isMinimised=0
|
||||
isVisible=1
|
||||
ShowBorder=0
|
||||
ShowCaption=0
|
||||
Sizeable=1
|
||||
x=10
|
||||
y=299
|
||||
Left=13
|
||||
Top=137
|
||||
Group=0
|
||||
Page=-1
|
||||
[ExtDev4099]
|
||||
Type=4
|
||||
TypeN=PushButton
|
||||
Ports0=2
|
||||
Bit0=6
|
||||
ConLev0=-1
|
||||
ConPars0_0=1
|
||||
Ports1=2
|
||||
Bit1=7
|
||||
ConLev1=-1
|
||||
Pars0=0
|
||||
Pars1=1
|
||||
Name=PushButton
|
||||
FileName=
|
||||
Layer=0
|
||||
[F15679330]
|
||||
x=0
|
||||
y=112
|
||||
[F30165122]
|
||||
x=0
|
||||
y=4469
|
||||
[F30427679]
|
||||
x=0
|
||||
y=46
|
||||
[F30394911]
|
||||
x=0
|
||||
y=0
|
||||
[F20441499]
|
||||
x=0
|
||||
y=0
|
||||
[F29730335]
|
||||
x=0
|
||||
y=78
|
||||
[F24752775]
|
||||
x=40
|
||||
y=52
|
||||
[F24752903]
|
||||
x=40
|
||||
y=52
|
||||
[F29013061]
|
||||
x=0
|
||||
y=113
|
||||
[F27123467]
|
||||
x=55
|
||||
y=67
|
||||
[F28496481]
|
||||
x=8
|
||||
y=29
|
||||
[F20528681]
|
||||
x=18
|
||||
y=94
|
||||
[F28479879]
|
||||
x=49
|
||||
y=2522
|
||||
[F28931976]
|
||||
x=0
|
||||
y=0
|
||||
[F29801213]
|
||||
x=24
|
||||
y=36
|
||||
[F29801181]
|
||||
x=24
|
||||
y=36
|
||||
[F24754146]
|
||||
x=0
|
||||
y=0
|
||||
[F20122654]
|
||||
x=0
|
||||
y=44
|
||||
[F20558577]
|
||||
x=6
|
||||
y=5403
|
||||
[F29471871]
|
||||
x=13
|
||||
y=4972
|
||||
[F15787712]
|
||||
x=0
|
||||
y=47
|
118
FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h
Normal file
118
FreeRTOS/Demo/PIC18_WizC/Demo6/FreeRTOSConfig.h
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V3.0.0
|
||||
+ TickRate reduced to 250Hz.
|
||||
|
||||
+ configIDLE_SHOULD_YIELD added.
|
||||
|
||||
Changes from V3.0.1
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION ( 1 )
|
||||
#define configUSE_IDLE_HOOK ( 0 )
|
||||
#define configUSE_TICK_HOOK ( 0 )
|
||||
#define configTICK_RATE_HZ ( 250 )
|
||||
#define configMAX_PRIORITIES ( 3 )
|
||||
#define configMINIMAL_STACK_SIZE portMINIMAL_STACK_SIZE
|
||||
#define configMAX_TASK_NAME_LEN ( 3 )
|
||||
#define configUSE_TRACE_FACILITY ( 0 )
|
||||
#define configUSE_16_BIT_TICKS ( 1 )
|
||||
#define configIDLE_SHOULD_YIELD ( 1 )
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
|
||||
/* Set the following definitions to 1 to include the component, or zero
|
||||
to exclude the component. */
|
||||
|
||||
/* Include/exclude the stated API function. */
|
||||
#define INCLUDE_vTaskPrioritySet ( 0 )
|
||||
#define INCLUDE_uxTaskPriorityGet ( 0 )
|
||||
#define INCLUDE_vTaskDelete ( 0 )
|
||||
#define INCLUDE_vTaskCleanUpResources ( 0 )
|
||||
#define INCLUDE_vTaskSuspend ( 0 )
|
||||
#define INCLUDE_vTaskDelayUntil ( 1 )
|
||||
#define INCLUDE_vTaskDelay ( 1 )
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
41
FreeRTOS/Demo/PIC18_WizC/Demo6/MallocConfig.h
Normal file
41
FreeRTOS/Demo/PIC18_WizC/Demo6/MallocConfig.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef _MALLOC_SETTINGS_H
|
||||
#define _MALLOC_SETTINGS_H
|
||||
/*********************************************************************
|
||||
** Title: Dynamic memory (de-)allocation library for wizC.
|
||||
**
|
||||
** Author: Marcel van Lieshout
|
||||
**
|
||||
** Copyright: (c) 2005, HMCS, Marcel van Lieshout
|
||||
**
|
||||
** License: This software is released to the public domain and comes
|
||||
** without warranty and/or guarantees of any kind. You have
|
||||
** the right to use, copy, modify and/or (re-)distribute the
|
||||
** software as long as the reference to the author is
|
||||
** maintained in the software and a reference to the author
|
||||
** is included in any documentation of each product in which
|
||||
** this library (in it's original or in a modified form)
|
||||
** is used.
|
||||
*********************************************************************/
|
||||
|
||||
/*********************************************************************
|
||||
** The model to use
|
||||
*********************************************************************/
|
||||
//#define MALLOC_SMALL
|
||||
#define MALLOC_LARGE
|
||||
|
||||
/*********************************************************************
|
||||
** The size of the heap
|
||||
*********************************************************************/
|
||||
#define MALLOC_HEAP_SIZE (3200)
|
||||
|
||||
/*********************************************************************
|
||||
** Should released memory be scribbled with 0x55 before releasing it?
|
||||
*********************************************************************/
|
||||
//#define MALLOC_SCRIBBLE
|
||||
|
||||
/********************************************************************
|
||||
** Enable Debug-mode?
|
||||
*********************************************************************/
|
||||
//#define MALLOC_DEBUG
|
||||
|
||||
#endif /* _MALLOC_SETTINGS_H */
|
87
FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h
Normal file
87
FreeRTOS/Demo/PIC18_WizC/Demo6/WIZCmake.h
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V3.0.0
|
||||
+ Several modules predefined to avoid linker problems
|
||||
|
||||
Changes from V3.0.1
|
||||
*/
|
||||
|
||||
#ifndef _memcpy
|
||||
#define _memcpy 1
|
||||
#endif
|
||||
|
||||
#ifndef _memset
|
||||
#define _memset 1
|
||||
#endif
|
||||
|
||||
#ifndef _strncpy
|
||||
#define _strncpy 1
|
||||
#endif
|
||||
|
||||
|
||||
#pragma wizcpp searchpath <../../Common/Include/>
|
92
FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c
Normal file
92
FreeRTOS/Demo/PIC18_WizC/Demo6/fuses.c
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V3.0.0
|
||||
|
||||
Changes from V3.0.1
|
||||
*/
|
||||
|
||||
/*
|
||||
** Here are the configuration words set. See the PIC datasheet
|
||||
** and the wizC manual for an explanation
|
||||
*/
|
||||
#include <pic.h>
|
||||
|
||||
/*
|
||||
** These fuses are for PIC18F4620
|
||||
*/
|
||||
#pragma __config _CONFIG1H,_IESO_OFF_1H & _FCMEN_OFF_1H & _OSC_HSPLL_1H
|
||||
#pragma __config _CONFIG2L,_BORV_21_2L & _BOREN_SBORDIS_2L & _PWRT_ON_2L
|
||||
#pragma __config _CONFIG2H,_WDTPS_32768_2H & _WDT_OFF_2H
|
||||
#pragma __config _CONFIG3H,_MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_PORTC_3H
|
||||
#pragma __config _CONFIG4L,_DEBUG_OFF_4L & _XINST_OFF_4L & _LVP_OFF_4L & _STVREN_OFF_4L
|
||||
#pragma __config _CONFIG5L,_CP3_OFF_5L & _CP2_OFF_5L & _CP1_OFF_5L & _CP0_OFF_5L
|
||||
#pragma __config _CONFIG5H,_CPD_OFF_5H & _CPB_OFF_5H
|
||||
#pragma __config _CONFIG6L,_WRT3_OFF_6L & _WRT2_OFF_6L & _WRT1_OFF_6L & _WRT0_OFF_6L
|
||||
#pragma __config _CONFIG6H,_WRTD_OFF_6H & _WRTB_OFF_6H & _WRTC_OFF_6H
|
||||
#pragma __config _CONFIG7L,_EBTR3_OFF_7L & _EBTR2_OFF_7L & _EBTR1_OFF_7L & _EBTR0_OFF_7L
|
||||
#pragma __config _CONFIG7H,_EBTRB_OFF_7H
|
152
FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c
Normal file
152
FreeRTOS/Demo/PIC18_WizC/Demo6/interrupt.c
Normal file
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V3.0.0
|
||||
+ Added functionality to only call vTaskSwitchContext() once
|
||||
when handling multiple interruptsources in a single interruptcall.
|
||||
|
||||
+ Included Filenames changed to a .c extension to allow stepping through
|
||||
code using F7.
|
||||
|
||||
Changes from V3.0.1
|
||||
*/
|
||||
|
||||
#include <pic.h>
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
#include <queue.h>
|
||||
|
||||
static bit uxSwitchRequested;
|
||||
|
||||
/*
|
||||
* Vector for the ISR.
|
||||
*/
|
||||
void pointed Interrupt()
|
||||
{
|
||||
/*
|
||||
* Save the context of the current task.
|
||||
*/
|
||||
portSAVE_CONTEXT( portINTERRUPTS_FORCED );
|
||||
|
||||
/*
|
||||
* No contextswitch requested yet
|
||||
*/
|
||||
uxSwitchRequested = pdFALSE;
|
||||
|
||||
/*
|
||||
* Was the interrupt the FreeRTOS SystemTick?
|
||||
*/
|
||||
#include <libFreeRTOS/Drivers/Tick/isrTick.c>
|
||||
|
||||
/*******************************************************************************
|
||||
** DO NOT MODIFY ANYTHING ABOVE THIS LINE
|
||||
********************************************************************************
|
||||
** Enter the includes for the ISR-code of the FreeRTOS drivers below.
|
||||
**
|
||||
** You cannot use local variables. Alternatives are:
|
||||
** - Use static variables (Global RAM usage increases)
|
||||
** - Call a function (Additional cycles are needed)
|
||||
** - Use unused SFR's (preferred, no additional overhead)
|
||||
** See "../Serial/isrSerialTx.c" for an example of this last option
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Was the interrupt a byte being received?
|
||||
*/
|
||||
#include "../Serial/isrSerialRx.c"
|
||||
|
||||
|
||||
/*
|
||||
* Was the interrupt the Tx register becoming empty?
|
||||
*/
|
||||
#include "../Serial/isrSerialTx.c"
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** DO NOT MODIFY ANYTHING BELOW THIS LINE
|
||||
*******************************************************************************/
|
||||
/*
|
||||
* Was a contextswitch requested by one of the
|
||||
* interrupthandlers?
|
||||
*/
|
||||
if ( uxSwitchRequested )
|
||||
{
|
||||
vTaskSwitchContext();
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore the context of the (possibly other) task.
|
||||
*/
|
||||
portRESTORE_CONTEXT();
|
||||
|
||||
#pragma asmline retfie 0
|
||||
}
|
204
FreeRTOS/Demo/PIC18_WizC/Demo6/main.c
Normal file
204
FreeRTOS/Demo/PIC18_WizC/Demo6/main.c
Normal file
|
@ -0,0 +1,204 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V3.0.0
|
||||
|
||||
Changes from V3.0.1
|
||||
*/
|
||||
|
||||
/*
|
||||
* Instead of the normal single demo application, the PIC18F demo is split
|
||||
* into several smaller programs of which this is the sixth. This enables the
|
||||
* demo's to be executed on the RAM limited PIC-devices.
|
||||
*
|
||||
* The Demo6 project is configured for a PIC18F4620 device. Main.c starts 4
|
||||
* tasks (including the idle task). See the indicated files in the demo/common
|
||||
* directory for more information.
|
||||
*
|
||||
* demo/common/minimal/comtest.c: Creates 2 tasks
|
||||
* ATTENTION: Comtest needs a loopback-connector on the serial port.
|
||||
*
|
||||
* Main.c also creates a check task. This periodically checks that all the
|
||||
* other tasks are still running and have not experienced any unexpected
|
||||
* results. If all the other tasks are executing correctly an LED is flashed
|
||||
* once every mainCHECK_PERIOD milliseconds. If any of the tasks have not
|
||||
* executed, or report an error, the frequency of the LED flash will increase
|
||||
* to mainERROR_FLASH_RATE.
|
||||
*
|
||||
* http://www.FreeRTOS.org contains important information on the use of the
|
||||
* wizC PIC18F port.
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
/* Demo app include files. */
|
||||
#include "partest.h"
|
||||
#include "serial.h"
|
||||
#include "comtest.h"
|
||||
|
||||
/* The period between executions of the check task before and after an error
|
||||
has been discovered. If an error has been discovered the check task runs
|
||||
more frequently - increasing the LED flash rate. */
|
||||
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
|
||||
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
|
||||
|
||||
/* Priority definitions for some of the tasks. Other tasks just use the idle
|
||||
priority. */
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainCOMM_TEST_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
|
||||
|
||||
/* The LED that is toggled whenever a character is transmitted.
|
||||
mainCOMM_TX_RX_LED + 1 will be toggled every time a character is received. */
|
||||
#define mainCOMM_TX_RX_LED ( ( unsigned char ) 0 )
|
||||
|
||||
/* Constants required for the communications. */
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
*/
|
||||
static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
|
||||
|
||||
/*
|
||||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
|
||||
*/
|
||||
static char prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Creates the tasks, then starts the scheduler. */
|
||||
void main( void )
|
||||
{
|
||||
/* Initialise the required hardware. */
|
||||
vParTestInitialise();
|
||||
|
||||
/* Start a few of the standard demo tasks found in the demo\common directory. */
|
||||
vAltStartComTestTasks( mainCOMM_TEST_PRIORITY, mainBAUD_RATE, mainCOMM_TX_RX_LED );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. Will never return here. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
while(1) /* This point should never be reached. */
|
||||
{
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
||||
{
|
||||
portTickType xLastCheckTime;
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
char cErrorOccurred;
|
||||
|
||||
/* We need to initialise xLastCheckTime prior to the first call to
|
||||
vTaskDelayUntil(). */
|
||||
xLastCheckTime = xTaskGetTickCount();
|
||||
|
||||
/* Cycle for ever, delaying then checking all the other tasks are still
|
||||
operating without error. */
|
||||
for( ;; )
|
||||
{
|
||||
/* Wait until it is time to check the other tasks again. */
|
||||
vTaskDelayUntil( &xLastCheckTime, xDelayTime );
|
||||
|
||||
/* Check all the other tasks are running, and running without ever
|
||||
having an error. */
|
||||
cErrorOccurred = prvCheckOtherTasksAreStillRunning();
|
||||
|
||||
/* If an error was detected increase the frequency of the LED flash. */
|
||||
if( cErrorOccurred == pdTRUE )
|
||||
{
|
||||
xDelayTime = mainERROR_CHECK_PERIOD;
|
||||
}
|
||||
|
||||
/* Flash the LED for visual feedback. */
|
||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static char prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
char cErrorHasOccurred = ( char ) pdFALSE;
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
return cErrorHasOccurred;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue