]> git.sur5r.net Git - freertos/commitdiff
Get web server and run time stats working in the Kinetis K60 demo.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 10 Jul 2011 21:10:11 +0000 (21:10 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 10 Jul 2011 21:10:11 +0000 (21:10 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1490 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_Kinetis_K60_Tower_IAR/FreeRTOSConfig.h
Demo/CORTEX_Kinetis_K60_Tower_IAR/Freescale_Code/cpu/vectors.h
Demo/CORTEX_Kinetis_K60_Tower_IAR/ParTest.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/main_blinky.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/EMAC.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/httpd-cgi.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/httpd-fs/io.shtml
Demo/CORTEX_Kinetis_K60_Tower_IAR/webserver/httpd-fsdata.c

index e086598ce0104ee8266381e28c55f6574a748ed3..2b54877c862944f45591df0b175e1c58b0084dd3 100644 (file)
@@ -87,7 +87,7 @@
 #define configIDLE_SHOULD_YIELD                        1\r
 #define configUSE_MUTEXES                              1\r
 #define configQUEUE_REGISTRY_SIZE              0\r
-#define configGENERATE_RUN_TIME_STATS  0\r
+#define configGENERATE_RUN_TIME_STATS  1\r
 #define configCHECK_FOR_STACK_OVERFLOW 2\r
 #define configUSE_RECURSIVE_MUTEXES            1\r
 #define configUSE_MALLOC_FAILED_HOOK   1\r
@@ -114,6 +114,13 @@ to exclude the API function. */
 #define INCLUDE_vTaskDelayUntil                        1\r
 #define INCLUDE_vTaskDelay                             1\r
 \r
+#ifdef __ICCARM__ /* Stop these prototypes being included in the asm files. */\r
+       void vMainConfigureTimerForRunTimeStats( void );\r
+       unsigned long ulMainGetRunTimeCounterValue( void );\r
+#endif\r
+#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vMainConfigureTimerForRunTimeStats()\r
+#define portGET_RUN_TIME_COUNTER_VALUE() ulMainGetRunTimeCounterValue()\r
+\r
 /* Use the system definition, if there is one */\r
 #ifdef __NVIC_PRIO_BITS\r
        #define configPRIO_BITS                 __NVIC_PRIO_BITS\r
index 2f412088dcd42dd207c40154a1f1c052ead690d9..f32c75f9fbce18ab743f1feddfd2eb00e714ed3c 100644 (file)
@@ -23,7 +23,6 @@ extern void vPort_E_ISRHandler( void );
 void vEMAC_TxISRHandler( void );\r
 void vEMAC_RxISRHandler( void );\r
 void vEMAC_ErrorISRHandler( void );\r
-void vEMAC_ISRHandler( void );\r
 \r
 // function prototype for default_isr in vectors.c\r
 void default_isr(void);\r
@@ -131,9 +130,9 @@ extern void __iar_program_start(void);
 #define VECTOR_089      default_isr     // 0x0000_0164 89    73     USB OTG\r
 #define VECTOR_090      default_isr     // 0x0000_0168 90    74     USB Charger Detect\r
 #define VECTOR_091      default_isr     // 0x0000_016C 91    75                ENET                     IEEE 1588 Timer interrupt                      \r
-#define VECTOR_092      vEMAC_ISRHandler     // 0x0000_0170 92    76           ENET                     Transmit interrupt\r
-#define VECTOR_093      vEMAC_ISRHandler     // 0x0000_0174 93    77           ENET                     Receive interrupt\r
-#define VECTOR_094      vEMAC_ISRHandler  // 0x0000_0178 94    78              ENET                     Error and miscellaneous interrupt\r
+#define VECTOR_092      vEMAC_TxISRHandler     // 0x0000_0170 92    76         ENET                     Transmit interrupt\r
+#define VECTOR_093      vEMAC_RxISRHandler     // 0x0000_0174 93    77         ENET                     Receive interrupt\r
+#define VECTOR_094      vEMAC_ErrorISRHandler  // 0x0000_0178 94    78         ENET                     Error and miscellaneous interrupt\r
 #define VECTOR_095      default_isr     // 0x0000_017C 95    79     I2S\r
 #define VECTOR_096      default_isr     // 0x0000_0180 96    80     SDHC\r
 #define VECTOR_097      default_isr     // 0x0000_0184 97    81     DAC0\r
index 86087e5ec265a01b380b00d454d81557ef62e047..2e2d96275cca0acd834d0766aa2827166fdc34e0 100644 (file)
@@ -85,7 +85,7 @@ void vParTestInitialise( void )
        GPIOA_PDDR=GPIO_PDDR_PDD( ulLEDs[ 0 ] | ulLEDs[ 1 ] | ulLEDs[ 2 ] | ulLEDs[ 3 ] );      \r
 \r
        /* Start with LEDs off. */\r
-       GPIOA_PTOR = ~0U;\r
+       GPIOA_PTOR = ~0U;       \r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -93,57 +93,23 @@ void vParTestSetLED( unsigned long ulLED, signed portBASE_TYPE xValue )
 {\r
        if( ulLED < partstMAX_LEDS )\r
        {\r
-               /* A critical section is used as the LEDs are also accessed from an\r
-               interrupt. */\r
-               taskENTER_CRITICAL();\r
+               if( xValue == pdTRUE )\r
                {\r
-                       if( xValue == pdTRUE )\r
-                       {\r
-                               GPIOA_PDOR &= ~GPIO_PDOR_PDO( ulLEDs[ ulLED ] );\r
-                       }\r
-                       else\r
-                       {\r
-                               GPIOA_PDOR |= GPIO_PDOR_PDO( ulLEDs[ ulLED ] );\r
-                       }\r
+                       GPIOA_PCOR = ulLEDs[ ulLED ];\r
                }\r
-               taskEXIT_CRITICAL();\r
-       }\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-void vParTestToggleLED( unsigned long ulLED )\r
-{\r
-       if( ulLED < partstMAX_LEDS )\r
-       {\r
-               /* A critical section is used as the LEDs are also accessed from an\r
-               interrupt. */\r
-               taskENTER_CRITICAL();\r
+               else\r
                {\r
-                       GPIOA_PTOR |= GPIO_PDOR_PDO( ulLEDs[ ulLED ] );         \r
+                       GPIOA_PSOR = ulLEDs[ ulLED ];\r
                }\r
-               taskEXIT_CRITICAL();\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vParTestSetLEDFromISR( unsigned long ulLED, signed portBASE_TYPE xValue )\r
+void vParTestToggleLED( unsigned long ulLED )\r
 {\r
-unsigned portBASE_TYPE uxInterruptFlags;\r
-\r
        if( ulLED < partstMAX_LEDS )\r
        {\r
-               uxInterruptFlags = portSET_INTERRUPT_MASK_FROM_ISR();\r
-               {\r
-                       if( xValue == pdTRUE )\r
-                       {\r
-                               GPIOA_PDOR &= ~GPIO_PDOR_PDO( ulLEDs[ ulLED ] );\r
-                       }\r
-                       else\r
-                       {\r
-                               GPIOA_PDOR |= GPIO_PDOR_PDO( ulLEDs[ ulLED ] );\r
-                       }\r
-               }\r
-               portCLEAR_INTERRUPT_MASK_FROM_ISR( uxInterruptFlags );\r
+               GPIOA_PTOR = ulLEDs[ ulLED ];\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -154,22 +120,16 @@ long lReturn = pdFALSE;
 \r
        if( ulLED < partstMAX_LEDS )\r
        {\r
-               /* A critical section is used as the LEDs are also accessed from an\r
-               interrupt. */\r
-               taskENTER_CRITICAL();\r
+               lReturn = GPIOA_PDOR & ulLEDs[ ulLED ];\r
+               \r
+               if( lReturn == 0 )\r
+               {\r
+                       lReturn = pdTRUE;\r
+               }\r
+               else\r
                {\r
-                       lReturn = GPIO_PDOR_PDO( ulLEDs[ ulLED ] );\r
-                       \r
-                       if( lReturn == 0 )\r
-                       {\r
-                               lReturn = pdTRUE;\r
-                       }\r
-                       else\r
-                       {\r
-                               lReturn = pdFALSE;\r
-                       }\r
+                       lReturn = pdFALSE;\r
                }\r
-               taskEXIT_CRITICAL();\r
        }\r
 \r
        return lReturn;\r
index 04d995d6837a72d3c7e92a86026b99909dc24f4c..aca6483b6ae0eded5f2b8a3878227782bd5977ee 100644 (file)
 #include "QPeek.h"\r
 #include "recmutex.h"\r
 #include "TimerDemo.h"\r
-#include "comtest2.h"\r
 #include "PollQ.h"\r
 #include "countsem.h"\r
 #include "dynamic.h"\r
@@ -158,11 +157,6 @@ the queue empty. */
 #define mainLED0                                       0UL\r
 #define mainLED1                                       1UL\r
 \r
-/* The LED used by the comtest tasks. See the comtest.c file for more\r
-information.  In this case, the LED is deliberatly out of the valid range as\r
-all the available LEDs are already used by other tasks and timers. */\r
-#define mainCOM_TEST_LED                       ( 4 )\r
-\r
 /* Constant used by the standard timer test functions. */\r
 #define mainTIMER_TEST_PERIOD          ( 50 )\r
 \r
@@ -207,9 +201,6 @@ callback functions. */
 /* A block time of zero simply means "don't block". */\r
 #define mainDONT_BLOCK                                         ( 0UL )\r
 \r
-/* Baud rate used by the comtest tasks. */\r
-#define mainCOM_TEST_BAUD_RATE                         ( 115200UL )\r
-\r
 /* The vector used by the GPIO port E.  Button SW2 is configured to generate\r
 an interrput on this port. */\r
 #define mainGPIO_E_VECTOR                                      ( 107 - 16 )\r
@@ -276,6 +267,8 @@ be set to point to a string that identifies the offending task.  This is just
 to make debugging easier. */\r
 static const char *pcStatusMessage = NULL;\r
 \r
+/* Used in the run time stats calculation. */\r
+static unsigned long ulClocksPer10thOfAMilliSecond = 0UL;\r
 /*-----------------------------------------------------------*/\r
 \r
 void main( void )\r
@@ -302,7 +295,6 @@ void main( void )
                vStartQueuePeekTasks();\r
                vStartRecursiveMutexTasks();\r
                vStartTimerDemoTask( mainTIMER_TEST_PERIOD );\r
-//_RB_         vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );\r
                vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
                vStartCountingSemaphoreTasks();\r
                vStartDynamicPriorityTasks();\r
@@ -370,11 +362,6 @@ static long lChangedTimerPeriodAlready = pdFALSE;
                pcStatusMessage = "Error: RecMutex\n";\r
        }\r
 \r
-if( 0 )//_RB_  if( xAreComTestTasksStillRunning() != pdPASS )\r
-       {\r
-               pcStatusMessage = "Error: ComTest\n";\r
-       }\r
-       \r
        if( xAreTimerDemoTasksStillRunning( ( mainCHECK_TIMER_PERIOD_MS ) ) != pdTRUE )\r
        {\r
                pcStatusMessage = "Error: TimerDemo\n";\r
@@ -611,3 +598,53 @@ char *pcGetTaskStatusMessage( void )
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
+\r
+void vMainConfigureTimerForRunTimeStats( void )\r
+{\r
+       /* How many clocks are there per tenth of a millisecond? */\r
+       ulClocksPer10thOfAMilliSecond = configCPU_CLOCK_HZ / 10000UL;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+unsigned long ulMainGetRunTimeCounterValue( void )\r
+{\r
+unsigned long ulSysTickCounts, ulTickCount, ulReturn;\r
+const unsigned long ulSysTickReloadValue = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;\r
+volatile unsigned long * const pulCurrentSysTickCount = ( ( volatile unsigned long *) 0xe000e018 );\r
+volatile unsigned long * const pulInterruptCTRLState = ( ( volatile unsigned long *) 0xe000ed04 );\r
+const unsigned long ulSysTickPendingBit = 0x04000000UL;\r
+\r
+       /* NOTE: There are potentially race conditions here.  It is ok to keep\r
+       things simple, without using any additional timer peripherals. */\r
+\r
+\r
+       /* The SysTick is a down counter.  How many clocks have passed since it was\r
+       last reloaded? */\r
+       ulSysTickCounts = ulSysTickReloadValue - *pulCurrentSysTickCount;\r
+       \r
+       /* How many times has it overflowed? */\r
+       ulTickCount = xTaskGetTickCountFromISR();\r
+       \r
+       /* Is there a SysTick interrupt pending? */\r
+       if( ( *pulInterruptCTRLState & ulSysTickPendingBit ) != 0UL )\r
+       {\r
+               /* There is a SysTick interrupt pending, so the SysTick has overflowed\r
+               but the tick count not yet incremented. */\r
+               ulTickCount++;\r
+               \r
+               /* Read the SysTick again, as the overflow might have occurred since\r
+               it was read last. */\r
+               ulSysTickCounts = ulSysTickReloadValue - *pulCurrentSysTickCount;\r
+       }       \r
+       \r
+       /* Convert the tick count into tenths of a millisecond. */\r
+       ulReturn = ( ulTickCount * 10UL ) ;\r
+               \r
+       /* Add on the number of tenths of a millisecond that have passed since the\r
+       tick count last got updated. */\r
+       ulReturn += ( ulSysTickCounts / ulClocksPer10thOfAMilliSecond );\r
+       \r
+       return ulReturn;        \r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
index 7eb2d738b0053dff5af3ca6b7f6b5646e217c113..22b07f9a35a30e64d1906b0775b998eacaca747f 100644 (file)
@@ -221,7 +221,7 @@ static void prvButtonLEDTimerCallback( xTimerHandle xTimer )
        a critical section because it is accessed from multiple tasks, and the\r
        button interrupt - in this trivial case, for simplicity, the critical\r
        section is omitted. */\r
-       GPIOA_PDOR |= GPIO_PDOR_PDO( mainTIMER_CONTROLLED_LED );\r
+       GPIOA_PSOR = mainTIMER_CONTROLLED_LED;\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -233,7 +233,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
        /* The button was pushed, so ensure the LED is on before resetting the\r
        LED timer.  The LED timer will turn the LED off if the button is not\r
        pushed within 5000ms. */\r
-       GPIOA_PDOR &= ~GPIO_PDOR_PDO( mainTIMER_CONTROLLED_LED );\r
+       GPIOA_PCOR = mainTIMER_CONTROLLED_LED;\r
 \r
        /* This interrupt safe FreeRTOS function can be called from this interrupt\r
        because the interrupt priority is below the\r
@@ -293,11 +293,7 @@ unsigned long ulReceivedValue;
                is it the expected value?  If it is, toggle the LED. */\r
                if( ulReceivedValue == 100UL )\r
                {\r
-                       /* NOTE - accessing the LED port should use a critical section\r
-                       because it is accessed from multiple tasks, and the button interrupt\r
-                       - in this trivial case, for simplicity, the critical section is\r
-                       omitted. */\r
-                   GPIOA_PTOR |= GPIO_PDOR_PDO( mainTASK_CONTROLLED_LED );\r
+                   GPIOA_PTOR = mainTASK_CONTROLLED_LED;\r
                }\r
        }\r
 }\r
@@ -379,6 +375,22 @@ volatile size_t xFreeHeapSpace;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+/* The Blinky build configuration does not include Ethernet functionality,\r
+however, the Full and Blinky build configurations share a vectors.h header file.\r
+Therefore, dummy Ethernet interrupt handers need to be defined to keep the\r
+linker happy. */\r
+void vEMAC_TxISRHandler( void ) {}\r
+void vEMAC_RxISRHandler( void ){}\r
+void vEMAC_ErrorISRHandler( void ) {}\r
+\r
+/* The Blinky build configuration does not include run time stats gathering,\r
+however, the Full and Blinky build configurations share a FreeRTOSConfig.h\r
+file.  Therefore, dummy run time stats functions need to be defined to keep the\r
+linker happy. */\r
+void vMainConfigureTimerForRunTimeStats( void ) {}\r
+unsigned long ulMainGetRunTimeCounterValue( void ) { return 0UL; }\r
+\r
+\r
 \r
 \r
 \r
index 43aadc6a7e6f5f8182a87899b5536e19f4defac4..f08818b7efd948e60ff2639c9a3c76be3fefd7b1 100644 (file)
@@ -319,6 +319,7 @@ static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;
 void vApplicationProcessFormInput( char *pcInputString )\r
 {\r
 char *c;\r
+const unsigned long ulYellowLED = 2UL;\r
 \r
        /* Only interested in processing form input if this is the IO page. */\r
        c = strstr( pcInputString, "io.shtml" );\r
@@ -333,21 +334,18 @@ char *c;
                        if( strstr( c, "LED0=1" ) != NULL )\r
                        {\r
                                /* Turn the LEDs on. */\r
-                               vParTestSetLED( 3, 1 );\r
-                               vParTestSetLED( 4, 1 );\r
+                               vParTestSetLED( ulYellowLED, pdTRUE );\r
                        }\r
                        else\r
                        {\r
                                /* Turn the LEDs off. */\r
-                               vParTestSetLED( 3, 0 );\r
-                               vParTestSetLED( 4, 0 );\r
+                               vParTestSetLED( ulYellowLED, pdFALSE );\r
                        }\r
            }\r
                else\r
                {\r
-                       /* Commands to turn LEDs off are not always explicit. */\r
-                       vParTestSetLED( 3, 0 );\r
-                       vParTestSetLED( 4, 0 );\r
+                       /* Some browsers will only imply that a check box is off. */\r
+                       vParTestSetLED( ulYellowLED, pdFALSE );\r
                }\r
        }\r
 }\r
index db673b200818f80713f28437a6ef1484588cf4b2..b58740f6e3289de4dd2e4dbac1ee7277da51874e 100644 (file)
@@ -529,6 +529,9 @@ unsigned long usReturn = 0;
 \r
 void vEMAC_TxISRHandler( void )\r
 {\r
+       /* Clear the interrupt. */\r
+       ENET_EIR = ENET_EIR_TXF_MASK;\r
+\r
        /* Check the buffers have not already been freed in the first of the\r
        two Tx interrupts - which could potentially happen if the second Tx completed\r
        during the interrupt for the first Tx. */\r
@@ -554,6 +557,9 @@ const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;
 long lHigherPriorityTaskWoken = pdFALSE;\r
 extern xQueueHandle xEMACEventQueue;\r
 \r
+       /* Clear the interrupt. */\r
+       ENET_EIR = ENET_EIR_RXF_MASK;\r
+\r
        /* An Ethernet Rx event has occurred. */\r
        xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken );\r
        portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );\r
@@ -562,59 +568,13 @@ extern xQueueHandle xEMACEventQueue;
 \r
 void vEMAC_ErrorISRHandler( void )\r
 {\r
-       portDISABLE_INTERRUPTS();\r
-       for( ;; );\r
+       /* Clear the interrupt. */\r
+       ENET_EIR = ENET_EIR & ENET_EIMR;\r
+\r
+       /* Attempt recovery.  Not very sophisticated. */\r
+       prvInitialiseDescriptors();\r
+       ENET_RDAR = ENET_RDAR_RDAR_MASK;\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-volatile unsigned long ulEvent, ulMask;\r
-void vEMAC_ISRHandler( void )\r
-{\r
-//unsigned long ulEvent;\r
-long lHigherPriorityTaskWoken = pdFALSE;\r
-const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;\r
-extern xQueueHandle xEMACEventQueue;\r
-\r
-       /* What caused the interrupt? */\r
-       ulMask = ENET_EIMR;\r
-       ulEvent = ENET_EIR;\r
-       ulEvent &= ulMask;\r
-       \r
-       ENET_EIR = ulEvent;\r
-\r
-       if( ( ulEvent & ENET_EIR_TXF_MASK ) != 0UL )\r
-       {\r
-               /* Transmit complete.\r
-               Check the buffers have not already been freed in the first of the\r
-               two Tx interrupts - which could potentially happen if the second Tx completed\r
-               during the interrupt for the first Tx. */\r
-               if( xTxDescriptors[ 0 ].data != NULL )\r
-               {\r
-                       if( ( ( xTxDescriptors[ 0 ].status & TX_BD_R ) == 0 ) && ( ( xTxDescriptors[ 0 ].status & TX_BD_R ) == 0 ) )\r
-                       {\r
-                               configASSERT( xTxDescriptors[ 0 ].data == xTxDescriptors[ 1 ].data );\r
-                               \r
-                               xTxDescriptors[ 0 ].data = ( uint8_t* ) __REV( ( unsigned long ) xTxDescriptors[ 0 ].data );\r
-                               prvReturnBuffer( xTxDescriptors[ 0 ].data );\r
-                               \r
-                               /* Just to mark the fact that the buffer has already been released. */\r
-                               xTxDescriptors[ 0 ].data = NULL;\r
-                       }\r
-               }\r
-       }\r
-\r
-       if( ( ulEvent & ENET_EIR_RXF_MASK ) != 0UL )\r
-       {\r
-               /* Packet Rxed. */\r
-               xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken );\r
-               portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );\r
-       }\r
-\r
-       if( ulEvent & ( ENET_EIR_UN_MASK | ENET_EIR_RL_MASK | ENET_EIR_LC_MASK | ENET_EIR_EBERR_MASK | ENET_EIR_BABT_MASK | ENET_EIR_BABR_MASK | ENET_EIR_EBERR_MASK ) )\r
-       {\r
-               /* Error. */\r
-               prvInitialiseDescriptors();\r
-               ENET_RDAR = ENET_RDAR_RDAR_MASK;\r
-       }\r
-}\r
 \r
index 432f957bb6fa04b44eb99e960a3e673f04750a5d..127046d4f5a00d6edc2072d00825ff1c5ab11c71 100644 (file)
@@ -210,9 +210,10 @@ static unsigned short generate_io_state( void *arg )
 {\r
        extern long lParTestGetLEDState( unsigned long ulLED );\r
        ( void ) arg;\r
+       const unsigned long ulYellowLED = 2UL;\r
 \r
        /* Are the dynamically setable LEDs currently on or off? */\r
-       if( lParTestGetLEDState( 8 ) )\r
+       if( lParTestGetLEDState( ulYellowLED ) == pdTRUE )\r
        {\r
                pcStatus = "checked";\r
        }\r
@@ -228,27 +229,12 @@ static unsigned short generate_io_state( void *arg )
 \r
 /*---------------------------------------------------------------------------*/\r
 extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer );\r
-extern unsigned short usMaxJitter;\r
-static char cJitterBuffer[ 200 ];\r
 static unsigned short generate_runtime_stats( void *arg )\r
 {\r
        ( void ) arg;\r
        lRefreshCount++;\r
        sprintf( cCountBuf, "<p><br>Refresh count = %d", ( int ) lRefreshCount );\r
-       \r
-       #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST\r
-       {\r
-               sprintf( cJitterBuffer, "<p><br>Max high frequency timer jitter = %d peripheral clock periods.<p><br>", ( int ) usMaxJitter );\r
-               vTaskGetRunTimeStats( uip_appdata );\r
-               strcat( uip_appdata, cJitterBuffer );\r
-       }\r
-       #else\r
-       {\r
-               ( void ) cJitterBuffer;\r
-               strcpy( uip_appdata, "<p>Run time stats are only available in the debug_with_optimisation build configuration.<p>" );\r
-       }\r
-       #endif  \r
-\r
+       vTaskGetRunTimeStats( uip_appdata );\r
        strcat( uip_appdata, cCountBuf );\r
 \r
        return strlen( uip_appdata );\r
index 819e2d39b9a0b501bf0be5fce833a9a7a30e3dcb..7fd1c051cf64f111ba625fe63cbe3af07d044506 100644 (file)
@@ -12,7 +12,8 @@
 \r
 <p>\r
 \r
-Use the check box to turn on or off LED 4, then click "Update IO".\r
+The check box and "Update IO" button can also be used to turn the yellow LED on and off.\r
+\r
 \r
 \r
 <p>\r
index 47823d1009a0dcf31577bd77bd7880df80174124..13d7f8afb48efe3b14d57716573cb94a81c16db7 100644 (file)
@@ -220,31 +220,33 @@ static const char data_io_shtml[] = {
        0x3e, 0xd, 0xa, 0x3c, 0x62, 0x3e, 0x4c, 0x45, 0x44, 0x20, \r
        0x61, 0x6e, 0x64, 0x20, 0x4c, 0x43, 0x44, 0x20, 0x49, 0x4f, \r
        0x3c, 0x2f, 0x62, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xd, 0xa, \r
-       0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0xd, 0xa, 0x55, \r
-       0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x68, 0x65, \r
-       0x63, 0x6b, 0x20, 0x62, 0x6f, 0x78, 0x20, 0x74, 0x6f, 0x20, \r
-       0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x6f, 0x72, \r
-       0x20, 0x6f, 0x66, 0x66, 0x20, 0x4c, 0x45, 0x44, 0x20, 0x34, \r
-       0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x6c, 0x69, \r
-       0x63, 0x6b, 0x20, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, \r
-       0x20, 0x49, 0x4f, 0x22, 0x2e, 0xd, 0xa, 0xd, 0xa, 0xd, \r
-       0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x72, \r
-       0x6d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x46, \r
-       0x6f, 0x72, 0x6d, 0x22, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, \r
-       0x6e, 0x3d, 0x22, 0x2f, 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, \r
-       0x6d, 0x6c, 0x22, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, \r
-       0x3d, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3e, 0xd, 0xa, 0x25, \r
-       0x21, 0x20, 0x6c, 0x65, 0x64, 0x2d, 0x69, 0x6f, 0xd, 0xa, \r
-       0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x69, 0x6e, 0x70, 0x75, \r
-       0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x75, \r
-       0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, \r
-       0x65, 0x3d, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, \r
-       0x49, 0x4f, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, \r
-       0x72, 0x6d, 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0x3c, \r
-       0x70, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, \r
-       0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, \r
-       0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, \r
-       0xa, 0xd, 0xa, 0};\r
+       0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0xd, 0xa, 0x54, \r
+       0x68, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x62, \r
+       0x6f, 0x78, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x55, 0x70, \r
+       0x64, 0x61, 0x74, 0x65, 0x20, 0x49, 0x4f, 0x22, 0x20, 0x62, \r
+       0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, 0x63, 0x61, 0x6e, 0x20, \r
+       0x61, 0x6c, 0x73, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, \r
+       0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x75, 0x72, 0x6e, \r
+       0x20, 0x74, 0x68, 0x65, 0x20, 0x79, 0x65, 0x6c, 0x6c, 0x6f, \r
+       0x77, 0x20, 0x4c, 0x45, 0x44, 0x20, 0x6f, 0x6e, 0x20, 0x61, \r
+       0x6e, 0x64, 0x20, 0x6f, 0x66, 0x66, 0x2e, 0xd, 0xa, 0xd, \r
+       0xa, 0xd, 0xa, 0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, \r
+       0x3c, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6e, 0x61, 0x6d, 0x65, \r
+       0x3d, 0x22, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x22, 0x20, 0x61, \r
+       0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x2f, 0x69, 0x6f, \r
+       0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x20, 0x6d, 0x65, \r
+       0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x67, 0x65, 0x74, 0x22, \r
+       0x3e, 0xd, 0xa, 0x25, 0x21, 0x20, 0x6c, 0x65, 0x64, 0x2d, \r
+       0x69, 0x6f, 0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, \r
+       0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, \r
+       0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, \r
+       0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x55, 0x70, 0x64, \r
+       0x61, 0x74, 0x65, 0x20, 0x49, 0x4f, 0x22, 0x3e, 0xd, 0xa, \r
+       0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0xd, 0xa, 0x3c, \r
+       0x62, 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x2f, \r
+       0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, \r
+       0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, \r
+       0x6d, 0x6c, 0x3e, 0xd, 0xa, 0xd, 0xa, 0};\r
 \r
 static const char data_logo_jpg[] = {\r
        /* /logo.jpg */\r