}\r
/*-----------------------------------------------------------*/\r
\r
-void vAssertCalled( const char *pcFile, uint32_t ulLine )\r
-{\r
-volatile uint32_t ulBlockVariable = 0UL;\r
-volatile char *pcFileName = ( volatile char * ) pcFile;\r
-volatile uint32_t ulLineNumber = ulLine;\r
-\r
- ( void ) pcFileName;\r
- ( void ) ulLineNumber;\r
-\r
- printf( "vAssertCalled( %s, %u\n", pcFile, ulLine );\r
-\r
- /* Setting ulBlockVariable to a non-zero value in the debugger will allow\r
- this function to be exited. */\r
- taskDISABLE_INTERRUPTS();\r
- {\r
- while( ulBlockVariable == 0UL )\r
- {\r
- __debugbreak();\r
- }\r
- }\r
- taskENABLE_INTERRUPTS();\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
/* Called by FreeRTOS+TCP when the network connects or disconnects. Disconnect\r
events are only received if implemented in the MAC driver. */\r
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent )\r
}\r
/*-----------------------------------------------------------*/\r
\r
+void vAssertCalled( const char *pcFile, uint32_t ulLine )\r
+{\r
+ volatile uint32_t ulBlockVariable = 0UL;\r
+ volatile char *pcFileName = ( volatile char * ) pcFile;\r
+ volatile uint32_t ulLineNumber = ulLine;\r
+\r
+ ( void ) pcFileName;\r
+ ( void ) ulLineNumber;\r
+\r
+ printf( "vAssertCalled( %s, %u\n", pcFile, ulLine );\r
+\r
+ /* Setting ulBlockVariable to a non-zero value in the debugger will allow\r
+ this function to be exited. */\r
+ taskDISABLE_INTERRUPTS();\r
+ {\r
+ while( ulBlockVariable == 0UL )\r
+ {\r
+ __debugbreak();\r
+ }\r
+ }\r
+ taskENABLE_INTERRUPTS();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
UBaseType_t uxRand( void )\r
{\r
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL;\r
ulLoggingIPAddress = FreeRTOS_inet_addr_quick( configECHO_SERVER_ADDR0, configECHO_SERVER_ADDR1, configECHO_SERVER_ADDR2, configECHO_SERVER_ADDR3 );\r
vLoggingInit( xLogToStdout, xLogToFile, xLogToUDP, ulLoggingIPAddress, configPRINT_PORT );\r
\r
- /* Seed the random number generator. */\r
+ /*\r
+ * Seed random number generator.\r
+ *\r
+ * !!!NOTE!!!\r
+ * This is not a secure method of generating a random number. Production\r
+ * devices should use a True Random Number Generator (TRNG).\r
+ */\r
time( &xTimeNow );\r
FreeRTOS_debug_printf( ( "Seed for randomiser: %lu\n", xTimeNow ) );\r
prvSRand( ( uint32_t ) xTimeNow );\r