Update to V5.0.0.

This commit is contained in:
Richard Barry 2008-04-16 08:00:30 +00:00
parent 4c8425da01
commit 7e529c281f
240 changed files with 3640 additions and 1314 deletions

View file

@ -1,5 +1,5 @@
/*
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
@ -60,19 +60,20 @@
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 1
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 50000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 70 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )
#define configMAX_TASK_NAME_LEN ( 12 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 0
#define configUSE_CO_ROUTINES 0
#define configUSE_MUTEXES 1
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 1
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 50000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 70 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )
#define configMAX_TASK_NAME_LEN ( 12 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 0
#define configUSE_CO_ROUTINES 0
#define configUSE_MUTEXES 1
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )

View file

@ -1,5 +1,5 @@
/*
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.

View file

@ -20,37 +20,39 @@ OPTFFF 1,1,1,0,0,0,0,0,<..\Common\Minimal\BlockQ.c><BlockQ.c>
OPTFFF 1,2,1,0,0,0,0,0,<..\Common\Minimal\blocktim.c><blocktim.c>
OPTFFF 1,3,1,0,0,0,0,0,<..\Common\Minimal\death.c><death.c>
OPTFFF 1,4,1,0,0,0,0,0,<..\Common\Minimal\integer.c><integer.c>
OPTFFF 1,5,1,0,0,0,0,0,<.\main.c><main.c>
OPTFFF 1,5,1,2,0,1,1,0,<.\main.c><main.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,232,255,255,255,110,0,0,0,115,0,0,0,248,3,0,0,22,2,0,0 }
OPTFFF 1,6,1,0,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
OPTFFF 1,7,1,0,0,0,0,0,<..\Common\Minimal\PollQ.c><PollQ.c>
OPTFFF 1,8,1,0,0,0,0,0,<..\Common\Minimal\semtest.c><semtest.c>
OPTFFF 1,9,2,0,0,0,0,0,<.\startup_rvmdk.S><startup_rvmdk.S>
OPTFFF 1,10,1,0,0,0,0,0,<.\timertest.c><timertest.c>
OPTFFF 1,11,5,822083584,0,0,0,0,<.\FreeRTOSConfig.h><FreeRTOSConfig.h>
OPTFFF 1,11,5,922746880,0,0,0,0,<.\FreeRTOSConfig.h><FreeRTOSConfig.h>
OPTFFF 1,12,1,0,0,0,0,0,<..\Common\Minimal\GenQTest.c><GenQTest.c>
OPTFFF 1,13,1,0,0,0,0,0,<..\Common\Minimal\QPeek.c><QPeek.c>
OPTFFF 2,14,1,0,0,0,0,0,<.\rit128x96x4.c><rit128x96x4.c>
OPTFFF 2,15,1,0,0,0,0,0,<.\osram128x64x4.c><osram128x64x4.c>
OPTFFF 2,16,4,0,0,0,0,0,<..\Common\drivers\LuminaryMicro\Keil\driverlib.lib><driverlib.lib>
OPTFFF 3,17,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
OPTFFF 3,18,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
OPTFFF 3,19,1,0,0,0,0,0,<..\..\Source\queue.c><queue.c>
OPTFFF 3,20,1,335544320,0,0,0,0,<..\..\Source\portable\RVDS\ARM_CM3\port.c><port.c>
OPTFFF 3,21,1,0,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
OPTFFF 4,22,1,822083584,0,0,0,0,<.\webserver\uIP_Task.c><uIP_Task.c>
OPTFFF 4,23,1,754974720,0,0,0,0,<.\webserver\emac.c><emac.c>
OPTFFF 4,24,1,0,0,0,0,0,<.\webserver\httpd.c><httpd.c>
OPTFFF 4,25,1,0,0,0,0,0,<.\webserver\httpd-cgi.c><httpd-cgi.c>
OPTFFF 4,26,1,0,0,0,0,0,<.\webserver\httpd-fs.c><httpd-fs.c>
OPTFFF 4,27,1,0,0,0,0,0,<.\webserver\http-strings.c><http-strings.c>
OPTFFF 4,28,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\uip_arp.c><uip_arp.c>
OPTFFF 4,29,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\psock.c><psock.c>
OPTFFF 4,30,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\timer.c><timer.c>
OPTFFF 4,31,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\uip.c><uip.c>
OPTFFF 2,17,1,0,0,0,0,0,<.\formike128x128x16.c><formike128x128x16.c>
OPTFFF 2,18,4,0,0,0,0,0,<..\Common\drivers\LuminaryMicro\Keil\grlib.lib><grlib.lib>
OPTFFF 3,19,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
OPTFFF 3,20,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
OPTFFF 3,21,1,0,0,0,0,0,<..\..\Source\queue.c><queue.c>
OPTFFF 3,22,1,402653184,0,0,0,0,<..\..\Source\portable\RVDS\ARM_CM3\port.c><port.c>
OPTFFF 3,23,1,0,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
OPTFFF 4,24,1,822083584,0,0,0,0,<.\webserver\uIP_Task.c><uIP_Task.c>
OPTFFF 4,25,1,0,0,0,0,0,<.\webserver\emac.c><emac.c>
OPTFFF 4,26,1,0,0,0,0,0,<.\webserver\httpd.c><httpd.c>
OPTFFF 4,27,1,0,0,0,0,0,<.\webserver\httpd-cgi.c><httpd-cgi.c>
OPTFFF 4,28,1,0,0,0,0,0,<.\webserver\httpd-fs.c><httpd-fs.c>
OPTFFF 4,29,1,0,0,0,0,0,<.\webserver\http-strings.c><http-strings.c>
OPTFFF 4,30,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\uip_arp.c><uip_arp.c>
OPTFFF 4,31,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\psock.c><psock.c>
OPTFFF 4,32,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\timer.c><timer.c>
OPTFFF 4,33,1,0,0,0,0,0,<..\Common\ethernet\uIP\uip-1.0\uip\uip.c><uip.c>
TARGOPT 1, (FreeRTOS_Demo)
ADSCLK=8000000
ADSCLK=6000000
OPTTT 1,1,1,0
OPTHX 1,65535,0,0,0
OPTLX 79,66,8,<.\rvmdk\>
@ -59,10 +61,10 @@ TARGOPT 1, (FreeRTOS_Demo)
OPTXL 1,1,1,1,1,1,1,0,0
OPTFL 1,0,1
OPTAX 255
OPTBL 0,(Data Sheet)<DATASHTS\Luminary\LM3S6965.PDF>
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S6965)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S6965)
OPTBL 0,(Data Sheet)<DATASHTS\Luminary\LM3S2965.PDF>
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S2965)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S2965)
OPTDBG 48126,4,()()()()()()()()()() (BIN\lmidk-agdi.dll)()()()
OPTKEY 0,(DLGTARM)((1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(102=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(1014=-1,-1,-1,-1,0)(1016=-1,-1,-1,-1,0))
OPTKEY 0,(DLGTARM)((1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(102=-1,-1,-1,-1,0)(103=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(163=-1,-1,-1,-1,0)(164=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)(152=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(1014=-1,-1,-1,-1,0)(1016=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0))
OPTKEY 0,(ARMDBGFLAGS)()
OPTKEY 0,(lmidk-agdi)(-B0 -O1792)
OPTMM 1,2,(0)

View file

@ -24,6 +24,8 @@ File 1,1,<..\Common\Minimal\QPeek.c><QPeek.c>
File 2,1,<.\rit128x96x4.c><rit128x96x4.c>
File 2,1,<.\osram128x64x4.c><osram128x64x4.c>
File 2,4,<..\Common\drivers\LuminaryMicro\Keil\driverlib.lib><driverlib.lib>
File 2,1,<.\formike128x128x16.c><formike128x128x16.c>
File 2,4,<..\Common\drivers\LuminaryMicro\Keil\grlib.lib><grlib.lib>
File 3,1,<..\..\Source\tasks.c><tasks.c>
File 3,1,<..\..\Source\list.c><list.c>
File 3,1,<..\..\Source\queue.c><queue.c>
@ -42,13 +44,13 @@ File 4,1,<..\Common\ethernet\uIP\uip-1.0\uip\uip.c><uip.c>
Options 1,0,0 // Target 'FreeRTOS_Demo'
Device (LM3S6965)
Device (LM3S2965)
Vendor (Luminary Micro)
Cpu (IRAM(0x20000000-0x2000FFFF) IROM(0-0x3FFFF) CLOCK(6000000) CPUTYPE("Cortex-M3"))
FlashUt ()
StupF ("STARTUP\Luminary\Startup.s" ("Luminary Startup Code"))
FlashDR (UL2CM3(-UU0101L5E -O14 -S0 -C0 -N00("ARM Cortex-M3") -D00(1BA00477) -L00(4) -FO7 -FD20000000 -FC800 -FN1 -FF0LM3S_256 -FS00 -FL040000))
DevID (4337)
DevID (4322)
Rgf (LM3Sxxxx.H)
Mem ()
C ()
@ -123,33 +125,11 @@ Options 1,0,0 // Target 'FreeRTOS_Demo'
ADSLDMC (--entry Reset_Handler)
ADSLDIF ()
ADSLDDW ()
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S6965)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S6965)
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S2965)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S2965)
OPTDBG 48126,4,()()()()()()()()()() (BIN\lmidk-agdi.dll)()()()
FLASH1 { 1,0,0,0,1,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (BIN\lmidk-agdi.dll)
FLASH3 ("" ())
FLASH3 ()
FLASH4 ()
EndOpt
Options 1,4,0 // Group 'uIP_Source'
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
IncBld=1
AlwaysBuild=2
GenAsm=2
AsmAsm=2
PublicsOnly=2
StopCode=11
CustArgs ()
LibMods ()
ADSCCFLG { 2,84,85,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSCMISC ()
ADSCDEFN ()
ADSCUDEF ()
ADSCINCD ()
ADSASFLG { 170,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSAMISC ()
ADSADEFN ()
ADSAUDEF ()
ADSAINCD ()
EndOpt

View file

@ -665,6 +665,7 @@
<option>
<name>IlinkAdditionalLibs</name>
<state>$PROJ_DIR$\..\Common\drivers\LuminaryMicro\IAR\driverlib.a</state>
<state>$PROJ_DIR$\..\Common\drivers\LuminaryMicro\IAR\grlib.a</state>
</option>
<option>
<name>IlinkOverrideProgramEntryLabel</name>
@ -812,7 +813,13 @@
<group>
<name>Library files</name>
<file>
<name>$PROJ_DIR$\..\Common\drivers\LuminaryMicro\IAR\driverlib.r79</name>
<name>$PROJ_DIR$\..\Common\drivers\LuminaryMicro\IAR\driverlib.a</name>
</file>
<file>
<name>$PROJ_DIR$\formike128x128x16.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Common\drivers\LuminaryMicro\IAR\grlib.a</name>
</file>
<file>
<name>$PROJ_DIR$\osram128x64x4.c</name>

View file

@ -1,7 +1,10 @@
#ifndef BITMAP_H
#define BITMAP_H
const unsigned char pucImage[] =
#define bmpBITMAP_HEIGHT 50
#define bmpBITMAP_WIDTH 128
const unsigned char pucBasicBitmap[] =
{
0x00, 0x0a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@ -165,7 +168,169 @@ const unsigned char pucImage[] =
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00,
0x00 };
#define bmpBITMAP_HEIGHT 50
#define bmpBITMAP_WIDTH 128
const unsigned char pucGrLibBitmap[] =
{
IMAGE_FMT_4BPP_COMP,
124, 0,
49, 0,
15,
0x00, 0x00, 0x00,
0x00, 0x0c, 0x00,
0x20, 0x44, 0x20,
0x00, 0x75, 0x00,
0x69, 0x69, 0x69,
0x00, 0xc2, 0x00,
0x00, 0xd2, 0x00,
0x38, 0xb6, 0x38,
0x00, 0xea, 0x00,
0x00, 0xf2, 0x00,
0xaa, 0xb2, 0xaa,
0x65, 0xff, 0x65,
0x69, 0xff, 0x69,
0x6d, 0xff, 0x6d,
0x71, 0xff, 0x71,
0xff, 0xff, 0xff,
0x03, 0x21, 0x33, 0x53, 0x33, 0x33, 0x33, 0xe9, 0xd4, 0xf8, 0xa7, 0x5f,
0x17, 0x07, 0x06, 0x35, 0x33, 0x12, 0x03, 0x23, 0x96, 0x68, 0x88, 0x88,
0x88, 0xe9, 0xd4, 0xf8, 0xa7, 0x5f, 0x17, 0x07, 0x06, 0x86, 0x69, 0x32,
0x03, 0x29, 0x66, 0x65, 0x66, 0x66, 0x66, 0xe9, 0xd4, 0xf8, 0xa7, 0x5f,
0x17, 0x07, 0x06, 0x56, 0x66, 0x92, 0x07, 0x78, 0x63, 0x11, 0x11, 0x11,
0xe9, 0xd4, 0xa7, 0xf0, 0x5f, 0x17, 0x07, 0x07, 0x11, 0x36, 0x87, 0x78,
0x0f, 0x63, 0x00, 0x00, 0x00, 0xe9, 0xd4, 0xa7, 0x5f, 0xe0, 0x17, 0x07,
0x07, 0x00, 0x36, 0x87, 0x78, 0x63, 0xfe, 0x07, 0x07, 0x77, 0x2f, 0x07,
0x07, 0x02, 0x36, 0x1e, 0x87, 0x78, 0x63, 0x07, 0x07, 0x77, 0x2f, 0x00,
0x10, 0x01, 0x22, 0x20, 0x07, 0x00, 0x00, 0x22, 0x21, 0x84, 0x03, 0x36,
0x87, 0x78, 0x63, 0x02, 0x02, 0xaa, 0x01, 0xa2, 0x22, 0x20, 0x02, 0x77,
0x77, 0x77, 0xe9, 0x3a, 0x22, 0x22, 0x7a, 0xa4, 0x71, 0x20, 0x0a, 0x27,
0xb8, 0x29, 0x72, 0xb2, 0x9e, 0x93, 0x36, 0x87, 0x78, 0x40, 0x63, 0x62,
0x2a, 0xff, 0xf2, 0xaa, 0x40, 0x07, 0x08, 0xad, 0xdd, 0xdd, 0xdd, 0xe9,
0xd7, 0x72, 0x00, 0x40, 0x00, 0xa6, 0xdd, 0xda, 0x70, 0x00, 0x00, 0x02,
0x00, 0x77, 0xdd, 0xdc, 0xcc, 0xcd, 0xde, 0xc7, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x27, 0xde, 0xdc, 0x08, 0xcc, 0xcc, 0xdd, 0xea, 0x99,
0x36, 0x87, 0x78, 0x40, 0x63, 0x69, 0x02, 0xaf, 0xaa, 0xf2, 0x2f, 0xa0,
0x04, 0x02, 0xdb, 0xbb, 0xbb, 0xbb, 0xe9, 0xbc, 0xe7, 0x10, 0x20, 0x00,
0x07, 0xa5, 0xbb, 0xbd, 0x70, 0x00, 0x10, 0x00, 0x27, 0xec, 0x3b, 0xcd,
0xd7, 0x00, 0x00, 0x80, 0x9f, 0xbd, 0x20, 0x00, 0x00, 0x36, 0x87, 0x78,
0x40, 0x63, 0x69, 0x02, 0xfa, 0x2a, 0xf2, 0x2f, 0xa0, 0x31, 0x02, 0xdb,
0x43, 0x31, 0x42, 0x00, 0x07, 0xa7, 0x0a, 0x70, 0x00, 0x02, 0xdd, 0x41,
0xcc, 0x21, 0xce, 0x04, 0x70, 0x00, 0x00, 0x02, 0x7d, 0x39, 0xbc, 0xcb,
0x00, 0xbb, 0xbd, 0x20, 0x00, 0x00, 0x36, 0x87, 0x78, 0x20, 0x63, 0x00,
0x69, 0xfa, 0x0a, 0xf2, 0x2f, 0xa0, 0x01, 0x02, 0xdb, 0xbb, 0xbb, 0xdd,
0xdd, 0xdc, 0x11, 0x08, 0xe7, 0x00, 0x07, 0xad, 0xbb, 0xcd, 0xdd, 0xda,
0x09, 0x70, 0x00, 0x2d, 0xcb, 0x41, 0xcc, 0xdd, 0xd1, 0x04, 0xe7, 0x00,
0x00, 0x07, 0xeb, 0x51, 0xdc, 0xcd, 0x00, 0xdd, 0xdd, 0x20, 0x00, 0x00,
0x36, 0x87, 0x78, 0x00, 0x63, 0x00, 0x00, 0x00, 0x02, 0xfa, 0x2a, 0xf2,
0x00, 0xaf, 0xa0, 0x02, 0xdb, 0xbb, 0xbd, 0x72, 0x22, 0x00, 0x77, 0xdc,
0xbb, 0xbb, 0xc7, 0x20, 0x07, 0x77, 0x04, 0x77, 0x77, 0xcb, 0xbb, 0xbc,
0xd1, 0x20, 0x01, 0x28, 0x7d, 0xbb, 0x42, 0x27, 0x41, 0xcd, 0x20, 0x00,
0x40, 0x27, 0x51, 0x72, 0x22, 0x22, 0x27, 0x7c, 0x20, 0x00, 0x00, 0x00,
0x36, 0x87, 0x78, 0x63, 0x00, 0x00, 0x00, 0x00, 0x02, 0xaf, 0xaa, 0xfa,
0xff, 0x20, 0x02, 0x10, 0xdb, 0xbb, 0xbe, 0x61, 0x2d, 0xbb, 0xbb, 0xcc,
0xa8, 0x29, 0x00, 0x89, 0xbd, 0xc3, 0xeb, 0xbb, 0xbb, 0x00, 0xd7, 0x10,
0x00, 0x00, 0x2c, 0xcb, 0xbb, 0xbd, 0x58, 0x70, 0x12, 0xc7, 0x13, 0x29,
0x36, 0x87, 0x78, 0x40, 0x63, 0xa9, 0x00, 0xaf, 0xff, 0xff, 0xfa, 0x20,
0x08, 0x02, 0xdb, 0xbb, 0xbd, 0x39, 0x07, 0xdb, 0xbb, 0x72, 0xcc, 0x03,
0x8c, 0x82, 0xbd, 0x70, 0x84, 0xbc, 0x03, 0xd2, 0x00, 0x2d, 0xbb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 0xcc, 0x81, 0xce, 0x29, 0x08, 0x36, 0x87, 0x78, 0x63, 0x02,
0xaa, 0xff, 0xff, 0x02, 0xff, 0xa0, 0x02, 0xdb, 0xbb, 0xbd, 0x61, 0x02,
0x0e, 0xeb, 0xbb, 0xbd, 0x70, 0x5a, 0x8c, 0x09, 0x27, 0x00, 0xec, 0xbb,
0xbb, 0xbb, 0xbb, 0xbb, 0xbd, 0xd7, 0x54, 0x10, 0xa1, 0xcb, 0xa4, 0xd2,
0x31, 0x36, 0x87, 0x20, 0x78, 0x63, 0x01, 0x02, 0xff, 0xff, 0xff, 0xff,
0x02, 0xa0, 0x07, 0xad, 0xdd, 0xda, 0x20, 0x99, 0xde, 0x1c, 0xdd, 0xde,
0xc2, 0x21, 0x8d, 0x0a, 0x7c, 0xed, 0x04, 0xcc, 0xcc, 0xcc, 0xde, 0xd7,
0x92, 0x2c, 0xed, 0x40, 0xdc, 0xa7, 0x36, 0x87, 0x78, 0x63, 0x00, 0x02,
0x00, 0x22, 0x02, 0xaa, 0xaa, 0xaa, 0xaa, 0x20, 0x02, 0x1b, 0x77, 0x77,
0x77, 0x5a, 0xc9, 0x72, 0x21, 0x8e, 0x88, 0xaa, 0x27, 0x77, 0x7b, 0x9d,
0x12, 0x27, 0x77, 0x20, 0x77, 0xb7, 0x3d, 0x36, 0x87, 0x78, 0x63, 0x00,
0x3e, 0x02, 0xaa, 0x43, 0x22, 0xc6, 0x87, 0x3e, 0x12, 0x21, 0x22, 0x22,
0x06, 0x01, 0x22, 0x22, 0x21, 0x04, 0x00, 0x36, 0x87, 0x78, 0x63, 0x00,
0x02, 0xfa, 0x22, 0x3f, 0xaa, 0x20, 0x26, 0xc6, 0x87, 0x3f, 0x07, 0x07,
0x00, 0x36, 0x87, 0x78, 0x63, 0x00, 0x02, 0xfa, 0x02, 0x7e, 0xff, 0x07,
0x07, 0x77, 0x2f, 0x07, 0x06, 0x36, 0x00, 0x87, 0x78, 0x63, 0x00, 0x02,
0xff, 0xaa, 0xfa, 0x07, 0x44, 0x44, 0x44, 0x20, 0x02, 0xd9, 0xc1, 0xd4,
0xf0, 0xa7, 0x5f, 0x17, 0x04, 0x42, 0x00, 0x00, 0x36, 0x00, 0x87, 0x78,
0x63, 0x00, 0x02, 0xff, 0xff, 0xff, 0x9f, 0xe9, 0xa0, 0x0a, 0xc4, 0x94,
0xa7, 0x5f, 0x17, 0x80, 0x04, 0xfa, 0x20, 0x00, 0x36, 0x87, 0x78, 0x63,
0x13, 0x00, 0x00, 0xaf, 0x03, 0xa0, 0x0a, 0x07, 0xbf, 0xe0, 0x77, 0x2f,
0x07, 0xfa, 0x20, 0x00, 0x36, 0x87, 0x00, 0x78, 0x63, 0x00, 0x00, 0x02,
0xaa, 0xfa, 0xaa, 0x0f, 0xaa, 0xaa, 0x20, 0x02, 0xd9, 0xc1, 0xd4, 0xa7,
0xe0, 0x5f, 0x17, 0x05, 0x00, 0x00, 0x36, 0x87, 0x78, 0x03, 0x63, 0x00,
0x00, 0x00, 0x02, 0xff, 0xd9, 0xc1, 0xfc, 0xd4, 0xa7, 0x5f, 0x17, 0x07,
0x03, 0x36, 0x87, 0x23, 0x78, 0x63, 0x01, 0x02, 0x44, 0x20, 0x07, 0x07,
0xf0, 0x77, 0x2f, 0x07, 0x05, 0x36, 0x87, 0x78, 0x63, 0xfe, 0x07, 0x07,
0x77, 0x2f, 0x07, 0x07, 0x02, 0x36, 0x1f, 0x87, 0x78, 0x63, 0x07, 0x07,
0x77, 0x2f, 0x07, 0xc0, 0x07, 0x02, 0x36, 0x87, 0x78, 0x63, 0x11, 0x11,
0x7f, 0x11, 0xe9, 0xd4, 0xa7, 0x5f, 0x17, 0x07, 0x07, 0x00, 0x11, 0x36,
0x87, 0x29, 0x66, 0x55, 0x55, 0x55, 0xfe, 0xe9, 0xd4, 0xa7, 0x5f, 0x17,
0x07, 0x07, 0x55, 0x00, 0x66, 0x92, 0x23, 0x96, 0x68, 0x88, 0x88, 0x88,
0xfe, 0xe9, 0xd4, 0xa7, 0x5f, 0x17, 0x07, 0x06, 0x86, 0x01, 0x69, 0x32,
0x21, 0x33, 0x55, 0x55, 0x55, 0xe9, 0xfc, 0xd4, 0xa7, 0x5f, 0x17, 0x07,
0x07, 0x55, 0x33, 0x00, 0x12,
};
#endif

View file

@ -0,0 +1,902 @@
//*****************************************************************************
//
// formike128x128x16.c - Display driver for the Formike Electronic
// KWH015C04-F01 CSTN panel with an ST7637 controller.
//
// Copyright (c) 2008 Luminary Micro, Inc. All rights reserved.
//
// Software License Agreement
//
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws. All rights are reserved. You may not combine
// this software with "viral" open-source software in order to form a larger
// program. Any use in violation of the foregoing restrictions may subject
// the user to criminal sanctions under applicable laws, as well as to civil
// liability for the breach of the terms and conditions of this license.
//
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 2523 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************
//*****************************************************************************
//
//! \addtogroup ek_lm3s3748_api
//! @{
//
//*****************************************************************************
#include "hw_gpio.h"
#include "hw_memmap.h"
#include "hw_types.h"
#include "gpio.h"
#include "sysctl.h"
#include "rom.h"
#include "grlib.h"
#include "formike128x128x16.h"
#include <string.h>
//*****************************************************************************
//
// Defines for the pins that are used to communicate with the ST7637.
//
//*****************************************************************************
#define LCD_A0_BASE GPIO_PORTB_BASE
#define LCD_A0_PIN GPIO_PIN_2
#define LCD_WR_BASE GPIO_PORTC_BASE
#define LCD_WR_PIN GPIO_PIN_4
#define LCD_RD_BASE GPIO_PORTC_BASE
#define LCD_RD_PIN GPIO_PIN_5
#define LCD_BL_BASE GPIO_PORTF_BASE
#define LCD_BL_PIN GPIO_PIN_1
#define LCD_DATA_BASE GPIO_PORTG_BASE
//*****************************************************************************
//
// Translates a 24-bit RGB color to a display driver-specific color.
//
// \param c is the 24-bit RGB color. The least-significant byte is the blue
// channel, the next byte is the green channel, and the third byte is the red
// channel.
//
// This macro translates a 24-bit RGB color into a value that can be written
// into the display's frame buffer in order to reproduce that color, or the
// closest possible approximation of that color.
//
// \return Returns the display-driver specific color.
//
//*****************************************************************************
#define DPYCOLORTRANSLATE(c) ((((c) & 0x00ff0000) >> 19) | \
((((c) & 0x0000ff00) >> 5) & 0x000007e0) | \
((((c) & 0x000000ff) << 8) & 0x0000f800))
//*****************************************************************************
//
// Writes a data word to the ST7637.
//
//*****************************************************************************
static void
WriteData(unsigned char ucData)
{
//
// Write the data to the data bus.
//
HWREG(LCD_DATA_BASE + GPIO_O_DATA + (0xff << 2)) = ucData;
//
// Assert the write enable signal.
//
HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = 0;
//
// Deassert the write enable signal.
//
HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = LCD_WR_PIN;
}
//*****************************************************************************
//
// Writes a command to the ST7637.
//
//*****************************************************************************
static void
WriteCommand(unsigned char ucData)
{
//
// Write the command to the data bus.
//
HWREG(LCD_DATA_BASE + GPIO_O_DATA + (0xff << 2)) = ucData;
//
// Set the A0 signal low, indicating a command.
//
HWREG(LCD_A0_BASE + GPIO_O_DATA + (LCD_A0_PIN << 2)) = 0;
//
// Assert the write enable signal.
//
HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = 0;
//
// Deassert the write enable signal.
//
HWREG(LCD_WR_BASE + GPIO_O_DATA + (LCD_WR_PIN << 2)) = LCD_WR_PIN;
//
// Set the A0 signal high, indicating that following writes are data.
//
HWREG(LCD_A0_BASE + GPIO_O_DATA + (LCD_A0_PIN << 2)) = LCD_A0_PIN;
}
//*****************************************************************************
//
//! Initializes the display driver.
//!
//! This function initializes the ST7637 display controller on the panel,
//! preparing it to display data.
//!
//! \return None.
//
//*****************************************************************************
void
Formike128x128x16Init(void)
{
unsigned long ulClockMS, ulCount;
//
// Get the value to pass to SysCtlDelay() in order to delay for 1 ms.
//
ulClockMS = SysCtlClockGet() / (3 * 1000);
//
// Enable the GPIO peripherals used to interface to the ST7637.
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
//
// Configure the pins that connect to the LCD as GPIO outputs.
//
GPIOPinTypeGPIOOutput(LCD_A0_BASE, LCD_A0_PIN);
GPIOPinTypeGPIOOutput(LCD_WR_BASE, LCD_WR_PIN);
GPIOPinTypeGPIOOutput(LCD_RD_BASE, LCD_RD_PIN);
GPIOPinTypeGPIOOutput(LCD_BL_BASE, LCD_BL_PIN);
GPIOPinTypeGPIOOutput(LCD_DATA_BASE, 0xff);
//
// Set the LCD control pins to their default values.
//
GPIOPinWrite(LCD_A0_BASE, LCD_A0_PIN, LCD_A0_PIN);
GPIOPinWrite(LCD_WR_BASE, LCD_WR_PIN | LCD_RD_PIN,
LCD_WR_PIN | LCD_RD_PIN);
GPIOPinWrite(LCD_BL_BASE, LCD_BL_PIN, 0);
GPIOPinWrite(LCD_DATA_BASE, 0xff, 0x00);
//
// Perform a software reset of the ST7637.
//
WriteCommand(0x01);
//
// Delay for 120ms.
//
SysCtlDelay(ulClockMS * 120);
//
// Disable auto-load of mask rom data.
//
WriteCommand(0xD7);
WriteData(0xBF);
//
// Set the OTP control mode to read.
//
WriteCommand(0xE0);
WriteData(0x00);
//
// Delay for 10ms.
//
SysCtlDelay(ulClockMS * 10);
//
// Start the OTP read.
//
WriteCommand(0xE3);
//
// Delay for 20ms.
//
SysCtlDelay(ulClockMS * 20);
//
// Cancel the OTP read (it should have finished by now).
//
WriteCommand(0xE1);
//
// Turn off the display.
//
WriteCommand(0x28);
//
// Exit sleep mode.
//
WriteCommand(0x11);
//
// Delay for 50ms.
//
SysCtlDelay(ulClockMS * 50);
//
// Program the LCD supply voltage V0 to 14V.
//
WriteCommand(0xC0);
WriteData(0x04);
WriteData(0x01);
//
// Select an LCD bias voltage ratio of 1/12.
//
WriteCommand(0xC3);
WriteData(0x00);
//
// Enable the x8 booster circuit.
//
WriteCommand(0xC4);
WriteData(0x07);
//
// Invert the column scan direction for the panel.
//
WriteCommand(0xB7);
WriteData(0xC0);
//
// Select 16bpp, 5-6-5 data input mode.
//
WriteCommand(0x3A);
WriteData(0x05);
//
// Select the memory scanning direction. The scanning mode does not matter
// for this driver since the row/column selects will constrain the writes
// to the desired area of the display.
//
WriteCommand(0x36);
WriteData(0x00);
//
// Turn on the display.
//
WriteCommand(0x29);
//
// Clear the contents of the display buffer.
//
WriteCommand(0x2A);
WriteData(0x00);
WriteData(0x7F);
WriteCommand(0x2B);
WriteData(0x01);
WriteData(0x80);
WriteCommand(0x2c);
for(ulCount = 0; ulCount < (128 * 128); ulCount++)
{
WriteData(0x00);
WriteData(0x00);
}
//
// Enable normal operation of the LCD.
//
WriteCommand(0x13);
}
//*****************************************************************************
//
//! Turns on the backlight.
//!
//! This function turns on the backlight on the display.
//!
//! \return None.
//
//*****************************************************************************
void
Formike128x128x16BacklightOn(void)
{
//
// Assert the signal that turns on the backlight.
//
HWREG(LCD_BL_BASE + GPIO_O_DATA + (LCD_BL_PIN << 2)) = LCD_BL_PIN;
}
//*****************************************************************************
//
//! Turns off the backlight.
//!
//! This function turns off the backlight on the display.
//!
//! \return None.
//
//*****************************************************************************
void
Formike128x128x16BacklightOff(void)
{
//
// Deassert the signal that turns on the backlight.
//
HWREG(LCD_BL_BASE + GPIO_O_DATA + (LCD_BL_PIN << 2)) = 0;
}
//*****************************************************************************
//
//! Draws a pixel on the screen.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX is the X coordinate of the pixel.
//! \param lY is the Y coordinate of the pixel.
//! \param ulValue is the color of the pixel.
//!
//! This function sets the given pixel to a particular color. The coordinates
//! of the pixel are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Formike128x128x16PixelDraw(void *pvDisplayData, long lX, long lY,
unsigned long ulValue)
{
//
// Set the X address of the display cursor.
//
WriteCommand(0x2a);
WriteData(lX);
WriteData(lX);
//
// Set the Y address of the display cursor.
//
WriteCommand(0x2b);
WriteData(lY + 1);
WriteData(lY + 1);
//
// Write the pixel value.
//
WriteCommand(0x2c);
WriteData(ulValue >> 8);
WriteData(ulValue);
}
//*****************************************************************************
//
//! Draws a horizontal sequence of pixels on the screen.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX is the X coordinate of the first pixel.
//! \param lY is the Y coordinate of the first pixel.
//! \param lX0 is sub-pixel offset within the pixel data, which is valid for 1
//! or 4 bit per pixel formats.
//! \param lCount is the number of pixels to draw.
//! \param lBPP is the number of bits per pixel; must be 1, 4, or 8.
//! \param pucData is a pointer to the pixel data. For 1 and 4 bit per pixel
//! formats, the most significant bit(s) represent the left-most pixel.
//! \param pucPalette is a pointer to the palette used to draw the pixels.
//!
//! This function draws a horizontal sequence of pixels on the screen, using
//! the supplied palette. For 1 bit per pixel format, the palette contains
//! pre-translated colors; for 4 and 8 bit per pixel formats, the palette
//! contains 24-bit RGB values that must be translated before being written to
//! the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Formike128x128x16PixelDrawMultiple(void *pvDisplayData, long lX, long lY,
long lX0, long lCount, long lBPP,
const unsigned char *pucData,
const unsigned char *pucPalette)
{
unsigned long ulByte;
//
// Set the extent of the line along the X axis.
//
WriteCommand(0x2a);
WriteData(lX);
WriteData(lX + lCount - 1);
//
// Set the Y address of the display cursor.
//
WriteCommand(0x2b);
WriteData(lY + 1);
WriteData(lY + 1);
//
// Write the data RAM write command.
//
WriteCommand(0x2c);
//
// Determine how to interpret the pixel data based on the number of bits
// per pixel.
//
switch(lBPP)
{
//
// The pixel data is in 1 bit per pixel format.
//
case 1:
{
//
// Loop while there are more pixels to draw.
//
while(lCount)
{
//
// Get the next byte of image data.
//
ulByte = *pucData++;
//
// Loop through the pixels in this byte of image data.
//
for(; (lX0 < 8) && lCount; lX0++, lCount--)
{
//
// Draw this pixel in the appropriate color.
//
lBPP = ((unsigned long *)pucPalette)[(ulByte >>
(7 - lX0)) & 1];
WriteData(lBPP >> 8);
WriteData(lBPP);
}
//
// Start at the beginning of the next byte of image data.
//
lX0 = 0;
}
//
// The image data has been drawn.
//
break;
}
//
// The pixel data is in 4 bit per pixel format.
//
case 4:
{
//
// Loop while there are more pixels to draw. "Duff's device" is
// used to jump into the middle of the loop if the first nibble of
// the pixel data should not be used. Duff's device makes use of
// the fact that a case statement is legal anywhere within a
// sub-block of a switch statement. See
// http://en.wikipedia.org/wiki/Duff's_device for detailed
// information about Duff's device.
//
switch(lX0 & 1)
{
case 0:
while(lCount)
{
//
// Get the upper nibble of the next byte of pixel data
// and extract the corresponding entry from the
// palette.
//
ulByte = (*pucData >> 4) * 3;
ulByte = (*(unsigned long *)(pucPalette + ulByte) &
0x00ffffff);
//
// Translate this palette entry and write it to the
// screen.
//
ulByte = DPYCOLORTRANSLATE(ulByte);
WriteData(ulByte >> 8);
WriteData(ulByte);
//
// Decrement the count of pixels to draw.
//
lCount--;
//
// See if there is another pixel to draw.
//
if(lCount)
{
case 1:
//
// Get the lower nibble of the next byte of pixel
// data and extract the corresponding entry from
// the palette.
//
ulByte = (*pucData++ & 15) * 3;
ulByte = (*(unsigned long *)(pucPalette + ulByte) &
0x00ffffff);
//
// Translate this palette entry and write it to the
// screen.
//
ulByte = DPYCOLORTRANSLATE(ulByte);
WriteData(ulByte >> 8);
WriteData(ulByte);
//
// Decrement the count of pixels to draw.
//
lCount--;
}
}
}
//
// The image data has been drawn.
//
break;
}
//
// The pixel data is in 8 bit per pixel format.
//
case 8:
{
//
// Loop while there are more pixels to draw.
//
while(lCount--)
{
//
// Get the next byte of pixel data and extract the
// corresponding entry from the palette.
//
ulByte = *pucData++ * 3;
ulByte = *(unsigned long *)(pucPalette + ulByte) & 0x00ffffff;
//
// Translate this palette entry and write it to the screen.
//
ulByte = DPYCOLORTRANSLATE(ulByte);
WriteData(ulByte >> 8);
WriteData(ulByte);
}
//
// The image data has been drawn.
//
break;
}
}
}
//*****************************************************************************
//
//! Flushes any cached drawing operations.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//!
//! This functions flushes any cached drawing operations to the display. This
//! is useful when a local frame buffer is used for drawing operations, and the
//! flush would copy the local frame buffer to the display. For the ST7637
//! driver, the flush is a no operation.
//!
//! \return None.
//
//*****************************************************************************
static void
Formike128x128x16Flush(void *pvDisplayData)
{
//
// There is nothing to be done.
//
}
//*****************************************************************************
//
//! Draws a horizontal line.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX1 is the X coordinate of the start of the line.
//! \param lX2 is the X coordinate of the end of the line.
//! \param lY is the Y coordinate of the line.
//! \param ulValue is the color of the line.
//!
//! This function draws a horizontal line on the display. The coordinates of
//! the line are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Formike128x128x16LineDrawH(void *pvDisplayData, long lX1, long lX2, long lY,
unsigned long ulValue)
{
//
// Set the extent of the line along the X axis.
//
WriteCommand(0x2a);
WriteData(lX1);
WriteData(lX2);
//
// Set the Y address of the display cursor.
//
WriteCommand(0x2b);
WriteData(lY + 1);
WriteData(lY + 1);
//
// Write the data RAM write command.
//
WriteCommand(0x2c);
//
// Loop through the pixels of this horizontal line.
//
while(lX1++ <= lX2)
{
//
// Write the pixel value.
//
WriteData(ulValue >> 8);
WriteData(ulValue);
}
}
//*****************************************************************************
//
//! Draws a vertical line.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX is the X coordinate of the line.
//! \param lY1 is the Y coordinate of the start of the line.
//! \param lY2 is the Y coordinate of the end of the line.
//! \param ulValue is the color of the line.
//!
//! This function draws a vertical line on the display. The coordinates of the
//! line are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Formike128x128x16LineDrawV(void *pvDisplayData, long lX, long lY1, long lY2,
unsigned long ulValue)
{
//
// Set the X address of the display cursor.
//
WriteCommand(0x2a);
WriteData(lX);
WriteData(lX);
//
// Set the extent of the line along the Y axis.
//
WriteCommand(0x2b);
WriteData(lY1 + 1);
WriteData(lY2 + 1);
//
// Write the data RAM write command.
//
WriteCommand(0x2c);
//
// Loop through the pixels of this vertical line.
//
while(lY1++ <= lY2)
{
//
// Write the pixel value.
//
WriteData(ulValue >> 8);
WriteData(ulValue);
}
}
//*****************************************************************************
//
//! Fills a rectangle.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param pRect is a pointer to the structure describing the rectangle.
//! \param ulValue is the color of the rectangle.
//!
//! This function fills a rectangle on the display. The coordinates of the
//! rectangle are assumed to be within the extents of the display, and the
//! rectangle specification is fully inclusive (i.e. both sXMin and sXMax are
//! drawn, along with sYMin and sYMax).
//!
//! \return None.
//
//*****************************************************************************
static void
Formike128x128x16RectFill(void *pvDisplayData, const tRectangle *pRect,
unsigned long ulValue)
{
long lCount;
//
// Set the extent of the rectangle along the X axis.
//
WriteCommand(0x2a);
WriteData(pRect->sXMin);
WriteData(pRect->sXMax);
//
// Set the extent of the rectangle along the Y axis.
//
WriteCommand(0x2b);
WriteData(pRect->sYMin + 1);
WriteData(pRect->sYMax + 1);
//
// Write the data RAM write command.
//
WriteCommand(0x2c);
//
// Loop through the pixels in this rectangle.
//
for(lCount = ((pRect->sXMax - pRect->sXMin + 1) *
(pRect->sYMax - pRect->sYMin + 1)); lCount > 0; lCount--)
{
//
// Write the pixel value.
//
WriteData(ulValue >> 8);
WriteData(ulValue);
}
}
//*****************************************************************************
//
//! Translates a 24-bit RGB color to a display driver-specific color.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param ulValue is the 24-bit RGB color. The least-significant byte is the
//! blue channel, the next byte is the green channel, and the third byte is the
//! red channel.
//!
//! This function translates a 24-bit RGB color into a value that can be
//! written into the display's frame buffer in order to reproduce that color,
//! or the closest possible approximation of that color.
//!
//! \return Returns the display-driver specific color.
//
//*****************************************************************************
static unsigned long
Formike128x128x16ColorTranslate(void *pvDisplayData, unsigned long ulValue)
{
//
// Translate from a 24-bit RGB color to a 5-6-5 RGB color.
//
return(DPYCOLORTRANSLATE(ulValue));
}
//*****************************************************************************
//
//! The display structure that describes the driver for the Formike Electronic
//! KWH015C04-F01 CSTN panel with an ST7637 controller.
//
//*****************************************************************************
const tDisplay g_sFormike128x128x16 =
{
sizeof(tDisplay),
0,
128,
128,
Formike128x128x16PixelDraw,
Formike128x128x16PixelDrawMultiple,
Formike128x128x16LineDrawH,
Formike128x128x16LineDrawV,
Formike128x128x16RectFill,
Formike128x128x16ColorTranslate,
Formike128x128x16Flush
};
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************
/* FreeRTOS.org demo wrappers. These are required so the prototypes for the
functions are the same as for the display drivers used by other evaluation
kits. */
static tContext sContext;
void vFormike128x128x16Clear( void )
{
const tRectangle xRectangle = { 0, 0, 127, 127 };
GrContextForegroundSet( &sContext, ClrBlack );
GrRectFill( &sContext, &xRectangle );
GrContextForegroundSet(&sContext, ClrWhite);
}
/*-----------------------------------------------------------*/
void vFormike128x128x16StringDraw( const char *pcString, unsigned long lX, unsigned long lY, unsigned char ucColor )
{
GrContextForegroundSet(&sContext, ClrWhite);
GrStringDraw( &sContext, pcString, strlen( pcString ), lX, lY, false );
}
/*-----------------------------------------------------------*/
void vFormike128x128x16Init( unsigned long ul )
{
tRectangle rectScreen;
( void ) ul;
Formike128x128x16Init();
Formike128x128x16BacklightOn();
GrContextInit(&sContext, &g_sFormike128x128x16);
GrContextFontSet(&sContext, &g_sFontCmss12);
rectScreen.sXMin = 0;
/* Fill the screen with a black rectangle. */
rectScreen.sYMin = 0;
rectScreen.sXMax = g_sFormike128x128x16.usWidth - 1;
rectScreen.sYMax = g_sFormike128x128x16.usHeight - 1;
GrContextForegroundSet(&sContext, ClrBlack);
GrRectFill(&sContext, &rectScreen);
}
/*-----------------------------------------------------------*/
void vFormike128x128x16ImageDraw( const unsigned char *pucImage, unsigned long ulX, unsigned long ulY, unsigned long ulWidth, unsigned long ulHeight )
{
GrImageDraw( &sContext, pucImage, ( long ) ulX, ( long ) ulY);
}

View file

@ -0,0 +1,51 @@
//*****************************************************************************
//
// formike128x128x16.h - Prototypes for the Formike Electronic KWH015C04-F01
// display driver.
//
// Copyright (c) 2008 Luminary Micro, Inc. All rights reserved.
//
// Software License Agreement
//
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws. All rights are reserved. You may not combine
// this software with "viral" open-source software in order to form a larger
// program. Any use in violation of the foregoing restrictions may subject
// the user to criminal sanctions under applicable laws, as well as to civil
// liability for the breach of the terms and conditions of this license.
//
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 2523 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************
#ifndef __FORMIKE128X128X16_H__
#define __FORMIKE128X128X16_H__
//*****************************************************************************
//
// Prototypes for the globals exported by this driver.
//
//*****************************************************************************
extern void Formike128x128x16Init(void);
extern void Formike128x128x16BacklightOn(void);
extern void Formike128x128x16BacklightOff(void);
extern const tDisplay g_sFormike128x128x16;
/* FreeRTOS.org demo wrappers. These are required so the prototypes for the
functions are the same as for the display drivers used by other evaluation
kits. */
void vFormike128x128x16Clear( void );
void vFormike128x128x16StringDraw( const char *pcString, unsigned long lX, unsigned long lY, unsigned char ucColor );
void vFormike128x128x16Init( unsigned long ul );
void vFormike128x128x16ImageDraw( const unsigned char *pucImage, unsigned long ulX, unsigned long ulY, unsigned long ulWidth, unsigned long ulHeight );
#endif // __FORMIKE128X128X16_H__

View file

@ -1,5 +1,5 @@
/*
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
@ -82,6 +82,16 @@
/*************************************************************************
* Please ensure to read http://www.freertos.org/portlm3sx965.html
* which provides information on configuring and running this demo for the
* various Luminary Micro EKs.
*************************************************************************/
/* Standard includes. */
#include <stdio.h>
@ -91,6 +101,17 @@
#include "queue.h"
#include "semphr.h"
/* Hardware library includes. */
#include "hw_memmap.h"
#include "hw_types.h"
#include "hw_sysctl.h"
#include "sysctl.h"
#include "gpio.h"
#include "grlib.h"
#include "rit128x96x4.h"
#include "osram128x64x4.h"
#include "formike128x128x16.h"
/* Demo app includes. */
#include "BlockQ.h"
#include "death.h"
@ -105,15 +126,6 @@
#include "GenQTest.h"
#include "QPeek.h"
/* Hardware library includes. */
#include "hw_memmap.h"
#include "hw_types.h"
#include "hw_sysctl.h"
#include "sysctl.h"
#include "gpio.h"
#include "rit128x96x4.h"
#include "osram128x64x4.h"
/*-----------------------------------------------------------*/
/* The time between cycles of the 'check' functionality (defined within the
@ -148,6 +160,7 @@ the jitter time in nano seconds. */
/* Constants used when writing strings to the display. */
#define mainCHARACTER_HEIGHT ( 9 )
#define mainMAX_ROWS_128 ( mainCHARACTER_HEIGHT * 14 )
#define mainMAX_ROWS_96 ( mainCHARACTER_HEIGHT * 10 )
#define mainMAX_ROWS_64 ( mainCHARACTER_HEIGHT * 7 )
#define mainFULL_SCALE ( 15 )
@ -180,6 +193,13 @@ static void prvSetupHardware( void );
*/
extern void vSetupTimer( void );
/*
* Hook functions that can get called by the kernel.
*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName );
void vApplicationTickHook( void );
/*-----------------------------------------------------------*/
/* The queue used to send messages to the OLED task. */
@ -190,6 +210,12 @@ const portCHAR * const pcWelcomeMessage = " www.FreeRTOS.org";
/*-----------------------------------------------------------*/
/*************************************************************************
* Please ensure to read http://www.freertos.org/portlm3sx965.html
* which provides information on configuring and running this demo for the
* various Luminary Micro EKs.
*************************************************************************/
int main( void )
{
prvSetupHardware();
@ -263,6 +289,7 @@ void vApplicationTickHook( void )
{
static xOLEDMessage xMessage = { "PASS" };
static unsigned portLONG ulTicksSinceLastDisplay = 0;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Called from every tick interrupt. Have enough ticks passed to make it
time to perform our health status check again? */
@ -306,7 +333,8 @@ static unsigned portLONG ulTicksSinceLastDisplay = 0;
}
/* Send the message to the OLED gatekeeper for display. */
xQueueSendFromISR( xOLEDQueue, &xMessage, pdFALSE );
xHigherPriorityTaskWoken = pdFALSE;
xQueueSendFromISR( xOLEDQueue, &xMessage, &xHigherPriorityTaskWoken );
}
}
/*-----------------------------------------------------------*/
@ -316,14 +344,15 @@ void vOLEDTask( void *pvParameters )
xOLEDMessage xMessage;
unsigned portLONG ulY, ulMaxY;
static portCHAR cMessage[ mainMAX_MSG_LEN ];
extern unsigned portLONG ulMaxJitter;
extern volatile unsigned portLONG ulMaxJitter;
const unsigned portCHAR *pucImage;
/* Functions to access the OLED. The one used depends on the dev kit
being used. */
void ( *vOLEDInit )( unsigned portLONG );
void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portCHAR );
void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG );
void ( *vOLEDClear )( void );
void ( *vOLEDInit )( unsigned portLONG ) = NULL;
void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portCHAR ) = NULL;
void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG ) = NULL;
void ( *vOLEDClear )( void ) = NULL;
/* Map the OLED access functions to the driver functions that are appropriate
for the evaluation kit being used. */
@ -335,21 +364,33 @@ void ( *vOLEDClear )( void );
vOLEDImageDraw = OSRAM128x64x4ImageDraw;
vOLEDClear = OSRAM128x64x4Clear;
ulMaxY = mainMAX_ROWS_64;
pucImage = pucBasicBitmap;
break;
default : vOLEDInit = RIT128x96x4Init;
case SYSCTL_DID1_PRTNO_1968 :
case SYSCTL_DID1_PRTNO_8962 : vOLEDInit = RIT128x96x4Init;
vOLEDStringDraw = RIT128x96x4StringDraw;
vOLEDImageDraw = RIT128x96x4ImageDraw;
vOLEDClear = RIT128x96x4Clear;
ulMaxY = mainMAX_ROWS_96;
ulMaxY = mainMAX_ROWS_96;
pucImage = pucBasicBitmap;
break;
default : vOLEDInit = vFormike128x128x16Init;
vOLEDStringDraw = vFormike128x128x16StringDraw;
vOLEDImageDraw = vFormike128x128x16ImageDraw;
vOLEDClear = vFormike128x128x16Clear;
ulMaxY = mainMAX_ROWS_128;
pucImage = pucGrLibBitmap;
break;
}
ulY = ulMaxY;
/* Initialise the OLED and display a startup message. */
vOLEDInit( ulSSI_FREQUENCY );
vOLEDStringDraw( " POWERED BY FreeRTOS", 0, 0, mainFULL_SCALE );
vOLEDStringDraw( "POWERED BY FreeRTOS", 0, 0, mainFULL_SCALE );
vOLEDImageDraw( pucImage, 0, mainCHARACTER_HEIGHT + 1, bmpBITMAP_WIDTH, bmpBITMAP_HEIGHT );
for( ;; )
@ -372,3 +413,12 @@ void ( *vOLEDClear )( void );
vOLEDStringDraw( cMessage, 0, ulY, mainFULL_SCALE );
}
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )
{
( void ) pxTask;
( void ) pcTaskName;
for( ;; );
}

View file

@ -20,19 +20,19 @@
</Workspace>
<Disassembly>
<PreferedWindows>
<Position>2</Position>
<ScreenPosX>0</ScreenPosX>
<ScreenPosY>0</ScreenPosY>
<Windows/>
</PreferedWindows>
<Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows>
<MixedMode>1</MixedMode><CodeCovShow>0</CodeCovShow></Disassembly>
</Static>
<Watch><Format><struct_types/><watch_formats/></Format></Watch><QuickWatch><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>100</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></QuickWatch></Static>
<Windows>
<Wnd2>
<Wnd1>
<Tabs>
<Tab>
<Identity>TabID-10465-12018</Identity>
@ -48,7 +48,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
<SelectedTab>0</SelectedTab></Wnd1><Wnd3>
<Tabs>
<Tab>
<Identity>TabID-21213-12021</Identity>
@ -60,20 +60,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd3><Wnd0><Tabs><Tab><Identity>TabID-2037-3837</Identity><TabName>Disassembly</TabName><Factory>Disassembly</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd0></Windows>
<SelectedTab>0</SelectedTab></Wnd3><Wnd0><Tabs><Tab><Identity>TabID-4412-20270</Identity><TabName>Disassembly</TabName><Factory>Disassembly</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd0></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\CORTEX_LM3Sxxxx_IAR_Keil\main.c</Filename><XPos>0</XPos><YPos>167</YPos><SelStart>7004</SelStart><SelEnd>7004</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\CORTEX_LM3Sxxxx_IAR_Keil\main.c</Filename><XPos>0</XPos><YPos>193</YPos><SelStart>8396</SelStart><SelEnd>8396</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\CORTEX_LM3Sxxxx_IAR_Keil\timertest.c</Filename><XPos>0</XPos><YPos>120</YPos><SelStart>5377</SelStart><SelEnd>5377</SelEnd></Tab><ActiveTab>1</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-012825f0><key>iaridepm.enu1</key></Toolbar-012825f0><Toolbar-055365a8><key>debuggergui.enu1</key></Toolbar-055365a8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>142857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>142857</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>142857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>142857</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>200</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>142857</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-01282438><key>iaridepm.enu1</key></Toolbar-01282438><Toolbar-05fc2d28><key>debuggergui.enu1</key></Toolbar-05fc2d28></Sizes></Row0></Top><Left><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>142857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>142857</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>488</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>142857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>350000</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>200</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>142857</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>

View file

@ -14,10 +14,10 @@
<Column0>241</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
</Workspace>
<Find-in-Files><ColumnWidth0>482</ColumnWidth0><ColumnWidth1>68</ColumnWidth1><ColumnWidth2>826</ColumnWidth2></Find-in-Files><Build><ColumnWidth0>19</ColumnWidth0><ColumnWidth1>1007</ColumnWidth1><ColumnWidth2>268</ColumnWidth2><ColumnWidth3>67</ColumnWidth3></Build><TerminalIO/></Static>
<Find-in-Files><ColumnWidth0>482</ColumnWidth0><ColumnWidth1>68</ColumnWidth1><ColumnWidth2>826</ColumnWidth2></Find-in-Files><Build><ColumnWidth0>19</ColumnWidth0><ColumnWidth1>1007</ColumnWidth1><ColumnWidth2>268</ColumnWidth2><ColumnWidth3>67</ColumnWidth3></Build><TerminalIO/><Debug-Log/></Static>
<Windows>
<Wnd0>
<Wnd2>
<Tabs>
<Tab>
<Identity>TabID-18883-22024</Identity>
@ -29,20 +29,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-29040-7360</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab><Tab><Identity>TabID-19024-10413</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab></Tabs><SelectedTab>1</SelectedTab></Wnd1></Windows>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-29040-7360</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab><Tab><Identity>TabID-19024-10413</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab></Tabs><SelectedTab>1</SelectedTab></Wnd3></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\CORTEX_LM3Sxxxx_IAR_Keil\main.c</Filename><XPos>0</XPos><YPos>167</YPos><SelStart>7004</SelStart><SelEnd>7004</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\CORTEX_LM3Sxxxx_IAR_Keil\main.c</Filename><XPos>0</XPos><YPos>193</YPos><SelStart>8396</SelStart><SelEnd>8396</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-012825f0><key>iaridepm.enu1</key></Toolbar-012825f0></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>613</Bottom><Right>315</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>142857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>226429</sizeVertCX><sizeVertCY>626273</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>325</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>327</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>332994</sizeHorzCY><sizeVertCX>142857</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-01282288><key>iaridepm.enu1</key></Toolbar-01282288></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>613</Bottom><Right>315</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>142857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>226429</sizeVertCX><sizeVertCY>626273</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>325</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>327</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>332994</sizeHorzCY><sizeVertCX>142857</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View file

@ -57,6 +57,7 @@ static void IntDefaultHandler(void);
extern void __iar_program_start(void);
extern void xPortPendSVHandler(void);
extern void xPortSysTickHandler(void);
extern void vPortSVCHandler(void);
extern void vEMAC_ISR( void );
extern Timer0IntHandler( void );
@ -105,7 +106,7 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
0, // Reserved
0, // Reserved
0, // Reserved
IntDefaultHandler, // SVCall handler
vPortSVCHandler, // SVCall handler
IntDefaultHandler, // Debug monitor handler
0, // Reserved
xPortPendSVHandler, // The PendSV handler
@ -153,7 +154,11 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
IntDefaultHandler, // CAN1
IntDefaultHandler, // CAN2
vEMAC_ISR, // Ethernet
IntDefaultHandler // Power Island
IntDefaultHandler, // Hibernate
IntDefaultHandler, // USB0
IntDefaultHandler, // PWM Generator 3
IntDefaultHandler, // uDMA Software Transfer
IntDefaultHandler // uDMA Error
};

View file

@ -1,5 +1,5 @@
/*
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
@ -59,6 +59,7 @@
#include "interrupt.h"
#include "sysctl.h"
#include "lmi_timer.h"
#include "hw_timer.h"
/* The set frequency of the interrupt. Deviations from this are measured as
the jitter. */
@ -73,7 +74,7 @@ zero. */
/* Misc defines. */
#define timerMAX_32BIT_VALUE ( 0xffffffffUL )
#define timerTIMER_1_COUNT_VALUE ( * ( ( unsigned long * ) ( TIMER1_BASE + 0x48 ) ) )
#define timerTIMER_1_COUNT_VALUE ( * ( ( volatile unsigned long * ) ( ( unsigned portLONG ) TIMER1_BASE + 0x48UL ) ) )
/*-----------------------------------------------------------*/
@ -119,14 +120,15 @@ unsigned long ulFrequency;
void Timer0IntHandler( void )
{
unsigned portLONG ulDifference;
volatile unsigned portLONG ulCurrentCount;
static portLONG ulMaxDifference = 0, ulLastCount = 0;
unsigned portLONG ulDifference, ulCurrentCount;
static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;
/* We use the timer 1 counter value to measure the clock cycles between
the timer 0 interrupts. */
ulCurrentCount = timerTIMER_1_COUNT_VALUE;
TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );
if( ulCurrentCount < ulLastCount )
{
/* How many times has timer 1 counted since the last interrupt? */
@ -141,11 +143,11 @@ static portLONG ulMaxDifference = 0, ulLastCount = 0;
}
ulLastCount = ulCurrentCount;
TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );
}

View file

@ -1,5 +1,5 @@
/*
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.

View file

@ -1,5 +1,5 @@
/*
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.