Add UDP related commands to SAM4E demo.

This commit is contained in:
Richard Barry 2013-11-16 19:19:18 +00:00
parent b690b26861
commit 9e9f9f30b1
3 changed files with 40 additions and 7 deletions

View file

@ -461,14 +461,18 @@
<GenerateEepFile>True</GenerateEepFile> <GenerateEepFile>True</GenerateEepFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\File-Releated-CLI-commands.c"> <Compile Include="..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\File-Related-CLI-commands.c">
<SubType>compile</SubType> <SubType>compile</SubType>
<Link>src\File-Releated-CLI-commands.c</Link> <Link>src\File-Related-CLI-commands.c</Link>
</Compile> </Compile>
<Compile Include="..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\Sample-CLI-commands.c"> <Compile Include="..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\Sample-CLI-commands.c">
<SubType>compile</SubType> <SubType>compile</SubType>
<Link>src\Sample-CLI-commands.c</Link> <Link>src\Sample-CLI-commands.c</Link>
</Compile> </Compile>
<Compile Include="..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\UDP-Related-CLI-commands.c">
<SubType>compile</SubType>
<Link>src\UDP-Related-CLI-commands.c</Link>
</Compile>
<Compile Include="..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_FAT_SL_Demos\CreateExampleFiles\File-system-demo.c"> <Compile Include="..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_FAT_SL_Demos\CreateExampleFiles\File-system-demo.c">
<SubType>compile</SubType> <SubType>compile</SubType>
<Link>src\File-system-demo.c</Link> <Link>src\File-system-demo.c</Link>

View file

@ -217,7 +217,7 @@ generate replies to incoming ICMP echo (ping) requests. */
/* If ipconfigSUPPORT_OUTGOING_PINGS is set to 1 then the /* If ipconfigSUPPORT_OUTGOING_PINGS is set to 1 then the
FreeRTOS_SendPingRequest() API function is available. */ FreeRTOS_SendPingRequest() API function is available. */
#define ipconfigSUPPORT_OUTGOING_PINGS 0 #define ipconfigSUPPORT_OUTGOING_PINGS 1
/* If ipconfigSUPPORT_SELECT_FUNCTION is set to 1 then the FreeRTOS_select() /* If ipconfigSUPPORT_SELECT_FUNCTION is set to 1 then the FreeRTOS_select()
(and associated) API function is available. */ (and associated) API function is available. */

View file

@ -154,6 +154,11 @@ extern void vRegisterSampleCLICommands( void );
*/ */
extern void vRegisterFileSystemCLICommands( void ); extern void vRegisterFileSystemCLICommands( void );
/*
* Register the UDP related commands that can be used with FreeRTOS+CLI.
*/
extern void vRegisterUDPCLICommands( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* The default IP and MAC address used by the demo. The address configuration /* The default IP and MAC address used by the demo. The address configuration
@ -191,12 +196,11 @@ xTimerHandle xTimer = NULL;
} }
#endif #endif
/* Register generic commands with the FreeRTOS+CLI command interpreter. */ /* Register example generic, file system related and UDP related CLI
commands respectively. */
vRegisterSampleCLICommands(); vRegisterSampleCLICommands();
/* Register file system related commands with the FreeRTOS+CLI command
interpreter. */
vRegisterFileSystemCLICommands(); vRegisterFileSystemCLICommands();
vRegisterUDPCLICommands();
/* Initialise the network interface. Tasks that use the network are /* Initialise the network interface. Tasks that use the network are
created in the network event hook when the network is connected and ready created in the network event hook when the network is connected and ready
@ -376,6 +380,31 @@ void vFullDemoTickHook( void )
/* Call the queue set ISR test function. */ /* Call the queue set ISR test function. */
vQueueSetAccessQueueSetFromISR(); vQueueSetAccessQueueSetFromISR();
} }
/*-----------------------------------------------------------*/
/* Called automatically when a reply to an outgoing ping is received. */
void vApplicationPingReplyHook( ePingReplyStatus_t eStatus, uint16_t usIdentifier )
{
/* This demo has nowhere to output any information so does nothing. */
( void ) usIdentifier;
switch( eStatus )
{
case eSuccess :
break;
case eInvalidChecksum :
break;
case eInvalidData :
break;
default :
/* It is not possible to get here as all enums have their own
case. */
break;
}
}