updated picoTCP to 1.4.0, lowered build optimization levels to -O2, improved selftest

This commit is contained in:
Joseph Henry
2017-06-05 14:26:06 -07:00
parent 47a80e8954
commit 19839eeac9
367 changed files with 107850 additions and 3813 deletions

View File

@@ -1,6 +1,6 @@
/*********************************************************************
PicoTCP. Copyright (c) 2012-2015 Altran Intelligent Systems. Some rights reserved.
See LICENSE and COPYING for usage.
PicoTCP. Copyright (c) 2012-2017 Altran Intelligent Systems. Some rights reserved.
See COPYING, LICENSE.GPLv2 and LICENSE.GPLv3 for usage.
*********************************************************************/
#ifndef _INCLUDE_PICO_GCC
@@ -11,6 +11,8 @@
#include <string.h>
#include "pico_constants.h"
/* #define TIME_PRESCALE */
/* monotonically increasing tick,
* typically incremented every millisecond in a systick interrupt */
extern volatile unsigned int pico_ms_tick;
@@ -43,14 +45,27 @@ static inline void *pico_zalloc(size_t size)
return ptr;
}
/* time prescaler */
#ifdef TIME_PRESCALE
extern int32_t prescale_time;
#endif
static inline pico_time PICO_TIME_MS()
{
return pico_ms_tick;
#ifdef TIME_PRESCALE
return pico_ms_tick << prescale_time;
#else
return pico_ms_tick;
#endif
}
static inline pico_time PICO_TIME()
{
return pico_ms_tick / 1000;
#ifdef TIME_PRESCALE
return (pico_ms_tick / 1000) << prescale_time;
#else
return (pico_ms_tick / 1000);
#endif
}
static inline void PICO_IDLE(void)