Stripped down version of Segundos NetService library (http://mbed.org/users/segundo/libraries/NetServices ). I have removed all NetServices, and all functions which had been disabled. Use this version when you need only pure TCP or UDP functions - this library compiles faster.
Dependents: christmasLights device_server pop3demo device_server_udp ... more
Diff: lwip/arch/sys_arch.cpp
- Revision:
- 1:9d93f4dc2f46
- Parent:
- 0:8b387bed54c2
--- a/lwip/arch/sys_arch.cpp Mon Jan 10 21:03:11 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -#include "sys_arch.h" -#include "mbed.h" -//DG 2010 - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __COMPLEX_AND_BUGGUY_HANDLING__ -static Timer* pTmr = NULL; - -void sys_init(void) -{ - //Start Timer - pTmr = new Timer(); - pTmr->start(); -} - -u32_t sys_jiffies(void) /* since power up. */ -{ - return (u32_t) (pTmr->read_ms()/10); //In /10ms units -} - -u32_t sys_now(void) -{ - return (u32_t) pTmr->read_ms(); //In /ms units -} -#elif0 -void sys_init(void) -{ - -} - -u32_t sys_jiffies(void) /* since power up. */ -{ - static int count = 0; - return ++count; -} - -u32_t sys_now(void) -{ - return (u32_t) time(NULL); -} -#else -static Timer* pTmr = NULL; - -void sys_init(void) -{ - //Start Timer - pTmr = new Timer(); - pTmr->start(); -} - -u32_t sys_jiffies(void) /* since power up. */ -{ - static int count = 0; - return ++count; - //return (u32_t) (pTmr->read_us()); -} - -u32_t sys_now(void) -{ - return (u32_t) (pTmr->read_ms()); //In /ms units -} -#endif - - -#ifdef __cplusplus -} -#endif