Netservices modded to read fragmented HTTP respsonse/payload from special purpose server - 180 bytes only

Committer:
RodColeman
Date:
Thu Sep 08 10:48:09 2011 +0000
Revision:
0:850eacf3e945
revised fixed length to 178 bytes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RodColeman 0:850eacf3e945 1 #include "sys_arch.h"
RodColeman 0:850eacf3e945 2 #include "mbed.h"
RodColeman 0:850eacf3e945 3 //DG 2010
RodColeman 0:850eacf3e945 4
RodColeman 0:850eacf3e945 5 #ifdef __cplusplus
RodColeman 0:850eacf3e945 6 extern "C" {
RodColeman 0:850eacf3e945 7 #endif
RodColeman 0:850eacf3e945 8
RodColeman 0:850eacf3e945 9 #ifdef __COMPLEX_AND_BUGGUY_HANDLING__
RodColeman 0:850eacf3e945 10 static Timer* pTmr = NULL;
RodColeman 0:850eacf3e945 11
RodColeman 0:850eacf3e945 12 void sys_init(void)
RodColeman 0:850eacf3e945 13 {
RodColeman 0:850eacf3e945 14 //Start Timer
RodColeman 0:850eacf3e945 15 pTmr = new Timer();
RodColeman 0:850eacf3e945 16 pTmr->start();
RodColeman 0:850eacf3e945 17 }
RodColeman 0:850eacf3e945 18
RodColeman 0:850eacf3e945 19 u32_t sys_jiffies(void) /* since power up. */
RodColeman 0:850eacf3e945 20 {
RodColeman 0:850eacf3e945 21 return (u32_t) (pTmr->read_ms()/10); //In /10ms units
RodColeman 0:850eacf3e945 22 }
RodColeman 0:850eacf3e945 23
RodColeman 0:850eacf3e945 24 u32_t sys_now(void)
RodColeman 0:850eacf3e945 25 {
RodColeman 0:850eacf3e945 26 return (u32_t) pTmr->read_ms(); //In /ms units
RodColeman 0:850eacf3e945 27 }
RodColeman 0:850eacf3e945 28 #elif0
RodColeman 0:850eacf3e945 29 void sys_init(void)
RodColeman 0:850eacf3e945 30 {
RodColeman 0:850eacf3e945 31
RodColeman 0:850eacf3e945 32 }
RodColeman 0:850eacf3e945 33
RodColeman 0:850eacf3e945 34 u32_t sys_jiffies(void) /* since power up. */
RodColeman 0:850eacf3e945 35 {
RodColeman 0:850eacf3e945 36 static int count = 0;
RodColeman 0:850eacf3e945 37 return ++count;
RodColeman 0:850eacf3e945 38 }
RodColeman 0:850eacf3e945 39
RodColeman 0:850eacf3e945 40 u32_t sys_now(void)
RodColeman 0:850eacf3e945 41 {
RodColeman 0:850eacf3e945 42 return (u32_t) time(NULL);
RodColeman 0:850eacf3e945 43 }
RodColeman 0:850eacf3e945 44 #else
RodColeman 0:850eacf3e945 45 static Timer* pTmr = NULL;
RodColeman 0:850eacf3e945 46
RodColeman 0:850eacf3e945 47 void sys_init(void)
RodColeman 0:850eacf3e945 48 {
RodColeman 0:850eacf3e945 49 //Start Timer
RodColeman 0:850eacf3e945 50 pTmr = new Timer();
RodColeman 0:850eacf3e945 51 pTmr->start();
RodColeman 0:850eacf3e945 52 }
RodColeman 0:850eacf3e945 53
RodColeman 0:850eacf3e945 54 u32_t sys_jiffies(void) /* since power up. */
RodColeman 0:850eacf3e945 55 {
RodColeman 0:850eacf3e945 56 static int count = 0;
RodColeman 0:850eacf3e945 57 return ++count;
RodColeman 0:850eacf3e945 58 //return (u32_t) (pTmr->read_us());
RodColeman 0:850eacf3e945 59 }
RodColeman 0:850eacf3e945 60
RodColeman 0:850eacf3e945 61 u32_t sys_now(void)
RodColeman 0:850eacf3e945 62 {
RodColeman 0:850eacf3e945 63 return (u32_t) (pTmr->read_ms()); //In /ms units
RodColeman 0:850eacf3e945 64 }
RodColeman 0:850eacf3e945 65 #endif
RodColeman 0:850eacf3e945 66
RodColeman 0:850eacf3e945 67
RodColeman 0:850eacf3e945 68 #ifdef __cplusplus
RodColeman 0:850eacf3e945 69 }
RodColeman 0:850eacf3e945 70 #endif