mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Start to remove unnecessary 'signed char *' casts from strings that are now just plain char * types.
This commit is contained in:
parent
b4116a7c7d
commit
da93f1fc4b
261 changed files with 2822 additions and 2815 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -75,7 +75,7 @@
|
|||
/*
|
||||
Changes from V3.2.2
|
||||
|
||||
+ Changed the page returned by the lwIP WEB server demo to display the
|
||||
+ Changed the page returned by the lwIP WEB server demo to display the
|
||||
task status table rather than the TCP/IP statistics.
|
||||
*/
|
||||
|
||||
|
@ -94,9 +94,9 @@
|
|||
#include "SAM7_EMAC.h"
|
||||
|
||||
/* lwIP includes. */
|
||||
#include "lwip/api.h"
|
||||
#include "lwip/api.h"
|
||||
#include "lwip/tcpip.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "netif/loopif.h"
|
||||
|
||||
|
@ -127,13 +127,13 @@
|
|||
|
||||
/*------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* Process an incoming connection on port 80.
|
||||
*
|
||||
* This simply checks to see if the incoming data contains a GET request, and
|
||||
* if so sends back a single dynamically created page. The connection is then
|
||||
* closed. A more complete implementation could create a task for each
|
||||
* connection.
|
||||
* closed. A more complete implementation could create a task for each
|
||||
* connection.
|
||||
*/
|
||||
static void vProcessConnection( struct netconn *pxNetCon );
|
||||
|
||||
|
@ -153,8 +153,8 @@ static unsigned long ulPageHits = 0;
|
|||
if( pxRxBuffer != NULL )
|
||||
{
|
||||
/* Where is the data? */
|
||||
netbuf_data( pxRxBuffer, ( void * ) &pcRxString, &usLength );
|
||||
|
||||
netbuf_data( pxRxBuffer, ( void * ) &pcRxString, &usLength );
|
||||
|
||||
/* Is this a GET? We don't handle anything else. */
|
||||
if( !strncmp( pcRxString, "GET", 3 ) )
|
||||
{
|
||||
|
@ -175,14 +175,14 @@ static unsigned long ulPageHits = 0;
|
|||
strcat( cDynamicPage, cPageHits );
|
||||
strcat( cDynamicPage, "<p><pre>Task State Priority Stack #<br>************************************************<br>" );
|
||||
/* ... Then the list of tasks and their status... */
|
||||
vTaskList( ( signed char * ) cDynamicPage + strlen( cDynamicPage ) );
|
||||
vTaskList( cDynamicPage + strlen( cDynamicPage ) );
|
||||
/* ... Finally the page footer. */
|
||||
strcat( cDynamicPage, webHTML_END );
|
||||
|
||||
/* Write out the dynamically generated page. */
|
||||
netconn_write(pxNetCon, cDynamicPage, (u16_t)strlen( cDynamicPage ), NETCONN_COPY );
|
||||
}
|
||||
|
||||
|
||||
netbuf_delete( pxRxBuffer );
|
||||
}
|
||||
|
||||
|
@ -194,9 +194,9 @@ void vlwIPInit( void )
|
|||
{
|
||||
/* Initialize lwIP and its interface layer. */
|
||||
sys_init();
|
||||
mem_init();
|
||||
mem_init();
|
||||
memp_init();
|
||||
pbuf_init();
|
||||
pbuf_init();
|
||||
netif_init();
|
||||
ip_init();
|
||||
tcpip_init( NULL, NULL );
|
||||
|
@ -225,7 +225,7 @@ static struct netif EMAC_if;
|
|||
|
||||
/* bring it up */
|
||||
netif_set_up(&EMAC_if);
|
||||
|
||||
|
||||
/* Create a new tcp connection handle */
|
||||
|
||||
pxHTTPListener = netconn_new( NETCONN_TCP );
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
|
@ -11,21 +11,21 @@
|
|||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
*/
|
||||
|
@ -40,7 +40,7 @@
|
|||
#define archMESG_QUEUE_LENGTH ( 6 )
|
||||
#define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 )
|
||||
|
||||
struct timeoutlist
|
||||
struct timeoutlist
|
||||
{
|
||||
struct sys_timeouts timeouts;
|
||||
xTaskHandle pid;
|
||||
|
@ -84,14 +84,14 @@ sys_mbox_free(sys_mbox_t mbox)
|
|||
__asm volatile ( "NOP" );
|
||||
}
|
||||
|
||||
vQueueDelete( mbox );
|
||||
vQueueDelete( mbox );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// Posts the "msg" to the mailbox.
|
||||
void
|
||||
sys_mbox_post(sys_mbox_t mbox, void *data)
|
||||
{
|
||||
{
|
||||
xQueueSend( mbox, &data, ( portTickType ) ( archPOST_BLOCK_TIME_MS / portTICK_RATE_MS ) );
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ sys_mbox_post(sys_mbox_t mbox, void *data)
|
|||
timeout.
|
||||
|
||||
Note that a function with a similar name, sys_mbox_fetch(), is
|
||||
implemented by lwIP.
|
||||
implemented by lwIP.
|
||||
*/
|
||||
u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ portTickType StartTime, EndTime, Elapsed;
|
|||
{
|
||||
msg = &dummyptr;
|
||||
}
|
||||
|
||||
|
||||
if( timeout != 0 )
|
||||
{
|
||||
if(pdTRUE == xQueueReceive( mbox, &(*msg), timeout ) )
|
||||
|
@ -154,7 +154,7 @@ portTickType StartTime, EndTime, Elapsed;
|
|||
{
|
||||
Elapsed = 1;
|
||||
}
|
||||
return ( Elapsed ); // return time blocked TBD test
|
||||
return ( Elapsed ); // return time blocked TBD test
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ portTickType StartTime, EndTime, Elapsed;
|
|||
{
|
||||
Elapsed = 1;
|
||||
}
|
||||
return (Elapsed); // return time blocked TBD test
|
||||
return (Elapsed); // return time blocked TBD test
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -237,8 +237,8 @@ portTickType StartTime, EndTime, Elapsed;
|
|||
Elapsed = 1;
|
||||
}
|
||||
|
||||
return ( Elapsed ); // return time blocked
|
||||
|
||||
return ( Elapsed ); // return time blocked
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ sys_sem_signal(sys_sem_t sem)
|
|||
void
|
||||
sys_sem_free(sys_sem_t sem)
|
||||
{
|
||||
vQueueDelete( sem );
|
||||
vQueueDelete( sem );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -283,7 +283,7 @@ sys_init(void)
|
|||
each thread has a list of timeouts which is represented as a linked
|
||||
list of sys_timeout structures. The sys_timeouts structure holds a
|
||||
pointer to a linked list of timeouts. This function is called by
|
||||
the lwIP timeout scheduler and must not return a NULL value.
|
||||
the lwIP timeout scheduler and must not return a NULL value.
|
||||
|
||||
In a single threaded sys_arch implementation, this function will
|
||||
simply return a pointer to a global sys_timeouts variable stored in
|
||||
|
@ -294,14 +294,14 @@ sys_arch_timeouts(void)
|
|||
{
|
||||
int i;
|
||||
xTaskHandle pid;
|
||||
struct timeoutlist *tl;
|
||||
struct timeoutlist *tl;
|
||||
|
||||
pid = xTaskGetCurrentTaskHandle( );
|
||||
pid = xTaskGetCurrentTaskHandle( );
|
||||
|
||||
for(i = 0; i < nextthread; i++)
|
||||
for(i = 0; i < nextthread; i++)
|
||||
{
|
||||
tl = &timeoutlist[i];
|
||||
if(tl->pid == pid)
|
||||
if(tl->pid == pid)
|
||||
{
|
||||
return &(tl->timeouts);
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ struct timeoutlist *tl;
|
|||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// TBD
|
||||
// TBD
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*
|
||||
Starts a new thread with priority "prio" that will begin its execution in the
|
||||
|
@ -330,12 +330,12 @@ static int iCall = 0;
|
|||
if( iCall == 0 )
|
||||
{
|
||||
/* The first time this is called we are creating the lwIP handler. */
|
||||
result = xTaskCreate( thread, ( signed char * ) "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask );
|
||||
result = xTaskCreate( thread, "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask );
|
||||
iCall++;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = xTaskCreate( thread, ( signed char * ) "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask );
|
||||
result = xTaskCreate( thread, "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask );
|
||||
}
|
||||
|
||||
// For each task created, store the task handle (pid) in the timers array.
|
||||
|
@ -378,7 +378,7 @@ sys_prot_t sys_arch_protect(void)
|
|||
an operating system.
|
||||
*/
|
||||
void sys_arch_unprotect(sys_prot_t pval)
|
||||
{
|
||||
{
|
||||
( void ) pval;
|
||||
vPortExitCritical();
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ unsigned portBASE_TYPE uxPriority;
|
|||
|
||||
xNetIf = netif;
|
||||
|
||||
/* Initialise the EMAC. This routine contains code that polls status bits.
|
||||
If the Ethernet cable is not plugged in then this can take a considerable
|
||||
/* Initialise the EMAC. This routine contains code that polls status bits.
|
||||
If the Ethernet cable is not plugged in then this can take a considerable
|
||||
time. To prevent this starving lower priority tasks of processing time we
|
||||
lower our priority prior to the call, then raise it back again once the
|
||||
initialisation is complete. */
|
||||
|
@ -105,13 +105,13 @@ unsigned portBASE_TYPE uxPriority;
|
|||
vTaskPrioritySet( NULL, uxPriority );
|
||||
|
||||
/* Create the task that handles the EMAC. */
|
||||
xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( ethernetif_input, "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* low_level_output(): Should do the actual transmission of the packet. The
|
||||
* packet is contained in the pbuf that is passed to the function. This pbuf
|
||||
* low_level_output(): Should do the actual transmission of the packet. The
|
||||
* packet is contained in the pbuf that is passed to the function. This pbuf
|
||||
* might be chained.
|
||||
*/
|
||||
static err_t low_level_output( struct netif *netif, struct pbuf *p )
|
||||
|
@ -137,8 +137,8 @@ err_t xReturn = ERR_OK;
|
|||
{
|
||||
for( q = p; q != NULL; q = q->next )
|
||||
{
|
||||
/* Send the data from the pbuf to the interface, one pbuf at a
|
||||
time. The size of the data in each pbuf is kept in the ->len
|
||||
/* Send the data from the pbuf to the interface, one pbuf at a
|
||||
time. The size of the data in each pbuf is kept in the ->len
|
||||
variable. if q->next == NULL then this is the last pbuf in the
|
||||
chain. */
|
||||
if( !lEMACSend( q->payload, q->len, ( q->next == NULL ) ) )
|
||||
|
@ -149,7 +149,7 @@ err_t xReturn = ERR_OK;
|
|||
|
||||
xSemaphoreGive( xTxSemaphore );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if ETH_PAD_SIZE
|
||||
pbuf_header( p, ETH_PAD_SIZE ); /* reclaim the padding word */
|
||||
|
@ -164,8 +164,8 @@ err_t xReturn = ERR_OK;
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* low_level_input(): Should allocate a pbuf and transfer the bytes of the
|
||||
* incoming packet from the interface into the pbuf.
|
||||
* low_level_input(): Should allocate a pbuf and transfer the bytes of the
|
||||
* incoming packet from the interface into the pbuf.
|
||||
*/
|
||||
static struct pbuf *low_level_input( struct netif *netif )
|
||||
{
|
||||
|
@ -186,34 +186,34 @@ static xSemaphoreHandle xRxSemaphore = NULL;
|
|||
{
|
||||
/* Obtain the size of the packet. */
|
||||
len = ulEMACInputLength();
|
||||
|
||||
|
||||
if( len )
|
||||
{
|
||||
#if ETH_PAD_SIZE
|
||||
len += ETH_PAD_SIZE; /* allow room for Ethernet padding */
|
||||
#endif
|
||||
|
||||
|
||||
/* We allocate a pbuf chain of pbufs from the pool. */
|
||||
p = pbuf_alloc( PBUF_RAW, len, PBUF_POOL );
|
||||
|
||||
|
||||
if( p != NULL )
|
||||
{
|
||||
#if ETH_PAD_SIZE
|
||||
pbuf_header( p, -ETH_PAD_SIZE ); /* drop the padding word */
|
||||
#endif
|
||||
|
||||
|
||||
/* Let the driver know we are going to read a new packet. */
|
||||
vEMACRead( NULL, 0, len );
|
||||
|
||||
|
||||
/* We iterate over the pbuf chain until we have read the entire
|
||||
packet into the pbuf. */
|
||||
packet into the pbuf. */
|
||||
for( q = p; q != NULL; q = q->next )
|
||||
{
|
||||
/* Read enough bytes to fill this pbuf in the chain. The
|
||||
/* Read enough bytes to fill this pbuf in the chain. The
|
||||
available data in the pbuf is given by the q->len variable. */
|
||||
vEMACRead( q->payload, q->len, len );
|
||||
}
|
||||
|
||||
|
||||
#if ETH_PAD_SIZE
|
||||
pbuf_header( p, ETH_PAD_SIZE ); /* reclaim the padding word */
|
||||
#endif
|
||||
|
@ -238,8 +238,8 @@ static xSemaphoreHandle xRxSemaphore = NULL;
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* ethernetif_output(): This function is called by the TCP/IP stack when an
|
||||
* IP packet should be sent. It calls the function called low_level_output()
|
||||
* ethernetif_output(): This function is called by the TCP/IP stack when an
|
||||
* IP packet should be sent. It calls the function called low_level_output()
|
||||
* to do the actual transmission of the packet.
|
||||
*/
|
||||
static err_t ethernetif_output( struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr )
|
||||
|
@ -250,8 +250,8 @@ static err_t ethernetif_output( struct netif *netif, struct pbuf *p, struct ip_a
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* ethernetif_input(): This function should be called when a packet is ready to
|
||||
* be read from the interface. It uses the function low_level_input() that
|
||||
* ethernetif_input(): This function should be called when a packet is ready to
|
||||
* be read from the interface. It uses the function low_level_input() that
|
||||
* should handle the actual reception of bytes from the network interface.
|
||||
*/
|
||||
static void ethernetif_input( void * pvParameters )
|
||||
|
@ -273,41 +273,41 @@ struct pbuf *p;
|
|||
|
||||
if( p == NULL )
|
||||
{
|
||||
/* No packet could be read. Wait a for an interrupt to tell us
|
||||
/* No packet could be read. Wait a for an interrupt to tell us
|
||||
there is more data available. */
|
||||
vEMACWaitForInput();
|
||||
}
|
||||
|
||||
} while( p == NULL );
|
||||
|
||||
|
||||
/* points to packet payload, which starts with an Ethernet header */
|
||||
ethhdr = p->payload;
|
||||
|
||||
|
||||
#if LINK_STATS
|
||||
lwip_stats.link.recv++;
|
||||
#endif /* LINK_STATS */
|
||||
|
||||
|
||||
ethhdr = p->payload;
|
||||
|
||||
|
||||
switch( htons( ethhdr->type ) )
|
||||
{
|
||||
/* IP packet? */
|
||||
case ETHTYPE_IP:
|
||||
/* update ARP table */
|
||||
etharp_ip_input( xNetIf, p );
|
||||
|
||||
|
||||
/* skip Ethernet header */
|
||||
pbuf_header( p, (s16_t)-sizeof(struct eth_hdr) );
|
||||
|
||||
|
||||
/* pass to network layer */
|
||||
xNetIf->input( p, xNetIf );
|
||||
break;
|
||||
|
||||
|
||||
case ETHTYPE_ARP:
|
||||
/* pass p to ARP module */
|
||||
etharp_arp_input( xNetIf, ethernetif->ethaddr, p );
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
pbuf_free( p );
|
||||
p = NULL;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -63,9 +63,9 @@
|
|||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
|
@ -75,10 +75,10 @@
|
|||
/*
|
||||
* Creates all the application tasks, then starts the scheduler.
|
||||
*
|
||||
* A task defined by the function vBasicWEBServer is created. This executes
|
||||
* A task defined by the function vBasicWEBServer is created. This executes
|
||||
* the lwIP stack and basic WEB server sample. A task defined by the function
|
||||
* vUSBCDCTask. This executes the USB to serial CDC example. All the other
|
||||
* tasks are from the set of standard demo tasks. The WEB documentation
|
||||
* vUSBCDCTask. This executes the USB to serial CDC example. All the other
|
||||
* tasks are from the set of standard demo tasks. The WEB documentation
|
||||
* provides more details of the standard demo application tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
|
@ -96,7 +96,7 @@
|
|||
/*
|
||||
Changes from V3.2.2
|
||||
|
||||
+ Modified the stack sizes used by some tasks to permit use of the
|
||||
+ Modified the stack sizes used by some tasks to permit use of the
|
||||
command line GCC tools.
|
||||
*/
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
|||
#include "USB-CDC.h"
|
||||
|
||||
/* lwIP includes. */
|
||||
#include "lwip/api.h"
|
||||
#include "lwip/api.h"
|
||||
|
||||
/* Hardware specific headers. */
|
||||
#include "Board.h"
|
||||
|
@ -194,7 +194,7 @@ int main( void )
|
|||
sys_thread_new( vBasicWEBServer, ( void * ) NULL, mainWEBSERVER_PRIORITY );
|
||||
|
||||
/* Create the demo USB CDC task. */
|
||||
xTaskCreate( vUSBCDCTask, ( signed char * ) "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL );
|
||||
xTaskCreate( vUSBCDCTask, "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL );
|
||||
|
||||
/* Create the standard demo application tasks. */
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
|
@ -203,13 +203,13 @@ int main( void )
|
|||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Finally, start the scheduler.
|
||||
/* Finally, start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
|
@ -227,7 +227,7 @@ static void prvSetupHardware( void )
|
|||
the correct default state. This line just ensures that this does not
|
||||
cause all interrupts to be masked at the start. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
|
||||
/* Most setup is performed by the low level init function called from the
|
||||
startup asm file.
|
||||
|
||||
|
@ -265,7 +265,7 @@ portTickType xLastWakeTime;
|
|||
/* Delay until it is time to execute again. The delay period is
|
||||
shorter following an error. */
|
||||
vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );
|
||||
|
||||
|
||||
/* Check all the standard demo application tasks are executing without
|
||||
error. */
|
||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||
|
@ -324,7 +324,7 @@ char cTxByte;
|
|||
for( cTxByte = mainFIRST_TX_CHAR; cTxByte <= mainLAST_TX_CHAR; cTxByte++ )
|
||||
{
|
||||
vUSBSendByte( cTxByte );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue