Integrating the ublox LISA C200 modem

Fork of SprintUSBModemHTTPClientTest by Donatien Garnier

Committer:
sam_grove
Date:
Thu Sep 26 00:44:20 2013 -0500
Revision:
5:3f93dd1d4cb3
Exported program and replaced contents of the repo with the source
to build and debug using keil mdk. Libs NOT upto date are lwip, lwip-sys
and socket. these have newer versions under mbed_official but were starting
from a know working point

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 5:3f93dd1d4cb3 1 /*
sam_grove 5:3f93dd1d4cb3 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
sam_grove 5:3f93dd1d4cb3 3 * All rights reserved.
sam_grove 5:3f93dd1d4cb3 4 *
sam_grove 5:3f93dd1d4cb3 5 * Redistribution and use in source and binary forms, with or without modification,
sam_grove 5:3f93dd1d4cb3 6 * are permitted provided that the following conditions are met:
sam_grove 5:3f93dd1d4cb3 7 *
sam_grove 5:3f93dd1d4cb3 8 * 1. Redistributions of source code must retain the above copyright notice,
sam_grove 5:3f93dd1d4cb3 9 * this list of conditions and the following disclaimer.
sam_grove 5:3f93dd1d4cb3 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
sam_grove 5:3f93dd1d4cb3 11 * this list of conditions and the following disclaimer in the documentation
sam_grove 5:3f93dd1d4cb3 12 * and/or other materials provided with the distribution.
sam_grove 5:3f93dd1d4cb3 13 * 3. The name of the author may not be used to endorse or promote products
sam_grove 5:3f93dd1d4cb3 14 * derived from this software without specific prior written permission.
sam_grove 5:3f93dd1d4cb3 15 *
sam_grove 5:3f93dd1d4cb3 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
sam_grove 5:3f93dd1d4cb3 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
sam_grove 5:3f93dd1d4cb3 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
sam_grove 5:3f93dd1d4cb3 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
sam_grove 5:3f93dd1d4cb3 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
sam_grove 5:3f93dd1d4cb3 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
sam_grove 5:3f93dd1d4cb3 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
sam_grove 5:3f93dd1d4cb3 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
sam_grove 5:3f93dd1d4cb3 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
sam_grove 5:3f93dd1d4cb3 25 * OF SUCH DAMAGE.
sam_grove 5:3f93dd1d4cb3 26 *
sam_grove 5:3f93dd1d4cb3 27 * This file is part of the lwIP TCP/IP stack.
sam_grove 5:3f93dd1d4cb3 28 *
sam_grove 5:3f93dd1d4cb3 29 * Author: Adam Dunkels <adam@sics.se>
sam_grove 5:3f93dd1d4cb3 30 *
sam_grove 5:3f93dd1d4cb3 31 */
sam_grove 5:3f93dd1d4cb3 32
sam_grove 5:3f93dd1d4cb3 33 #ifndef __LWIP_MEMP_H__
sam_grove 5:3f93dd1d4cb3 34 #define __LWIP_MEMP_H__
sam_grove 5:3f93dd1d4cb3 35
sam_grove 5:3f93dd1d4cb3 36 #include "lwip/opt.h"
sam_grove 5:3f93dd1d4cb3 37
sam_grove 5:3f93dd1d4cb3 38 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 39 extern "C" {
sam_grove 5:3f93dd1d4cb3 40 #endif
sam_grove 5:3f93dd1d4cb3 41
sam_grove 5:3f93dd1d4cb3 42 /* Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end */
sam_grove 5:3f93dd1d4cb3 43 typedef enum {
sam_grove 5:3f93dd1d4cb3 44 #define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name,
sam_grove 5:3f93dd1d4cb3 45 #include "lwip/memp_std.h"
sam_grove 5:3f93dd1d4cb3 46 MEMP_MAX
sam_grove 5:3f93dd1d4cb3 47 } memp_t;
sam_grove 5:3f93dd1d4cb3 48
sam_grove 5:3f93dd1d4cb3 49 #if MEM_USE_POOLS
sam_grove 5:3f93dd1d4cb3 50 /* Use a helper type to get the start and end of the user "memory pools" for mem_malloc */
sam_grove 5:3f93dd1d4cb3 51 typedef enum {
sam_grove 5:3f93dd1d4cb3 52 /* Get the first (via:
sam_grove 5:3f93dd1d4cb3 53 MEMP_POOL_HELPER_START = ((u8_t) 1*MEMP_POOL_A + 0*MEMP_POOL_B + 0*MEMP_POOL_C + 0)*/
sam_grove 5:3f93dd1d4cb3 54 MEMP_POOL_HELPER_FIRST = ((u8_t)
sam_grove 5:3f93dd1d4cb3 55 #define LWIP_MEMPOOL(name,num,size,desc)
sam_grove 5:3f93dd1d4cb3 56 #define LWIP_MALLOC_MEMPOOL_START 1
sam_grove 5:3f93dd1d4cb3 57 #define LWIP_MALLOC_MEMPOOL(num, size) * MEMP_POOL_##size + 0
sam_grove 5:3f93dd1d4cb3 58 #define LWIP_MALLOC_MEMPOOL_END
sam_grove 5:3f93dd1d4cb3 59 #include "lwip/memp_std.h"
sam_grove 5:3f93dd1d4cb3 60 ) ,
sam_grove 5:3f93dd1d4cb3 61 /* Get the last (via:
sam_grove 5:3f93dd1d4cb3 62 MEMP_POOL_HELPER_END = ((u8_t) 0 + MEMP_POOL_A*0 + MEMP_POOL_B*0 + MEMP_POOL_C*1) */
sam_grove 5:3f93dd1d4cb3 63 MEMP_POOL_HELPER_LAST = ((u8_t)
sam_grove 5:3f93dd1d4cb3 64 #define LWIP_MEMPOOL(name,num,size,desc)
sam_grove 5:3f93dd1d4cb3 65 #define LWIP_MALLOC_MEMPOOL_START
sam_grove 5:3f93dd1d4cb3 66 #define LWIP_MALLOC_MEMPOOL(num, size) 0 + MEMP_POOL_##size *
sam_grove 5:3f93dd1d4cb3 67 #define LWIP_MALLOC_MEMPOOL_END 1
sam_grove 5:3f93dd1d4cb3 68 #include "lwip/memp_std.h"
sam_grove 5:3f93dd1d4cb3 69 )
sam_grove 5:3f93dd1d4cb3 70 } memp_pool_helper_t;
sam_grove 5:3f93dd1d4cb3 71
sam_grove 5:3f93dd1d4cb3 72 /* The actual start and stop values are here (cast them over)
sam_grove 5:3f93dd1d4cb3 73 We use this helper type and these defines so we can avoid using const memp_t values */
sam_grove 5:3f93dd1d4cb3 74 #define MEMP_POOL_FIRST ((memp_t) MEMP_POOL_HELPER_FIRST)
sam_grove 5:3f93dd1d4cb3 75 #define MEMP_POOL_LAST ((memp_t) MEMP_POOL_HELPER_LAST)
sam_grove 5:3f93dd1d4cb3 76 #endif /* MEM_USE_POOLS */
sam_grove 5:3f93dd1d4cb3 77
sam_grove 5:3f93dd1d4cb3 78 #if MEMP_MEM_MALLOC || MEM_USE_POOLS
sam_grove 5:3f93dd1d4cb3 79 extern const u16_t memp_sizes[MEMP_MAX];
sam_grove 5:3f93dd1d4cb3 80 #endif /* MEMP_MEM_MALLOC || MEM_USE_POOLS */
sam_grove 5:3f93dd1d4cb3 81
sam_grove 5:3f93dd1d4cb3 82 #if MEMP_MEM_MALLOC
sam_grove 5:3f93dd1d4cb3 83
sam_grove 5:3f93dd1d4cb3 84 #include "mem.h"
sam_grove 5:3f93dd1d4cb3 85
sam_grove 5:3f93dd1d4cb3 86 #define memp_init()
sam_grove 5:3f93dd1d4cb3 87 #define memp_malloc(type) mem_malloc(memp_sizes[type])
sam_grove 5:3f93dd1d4cb3 88 #define memp_free(type, mem) mem_free(mem)
sam_grove 5:3f93dd1d4cb3 89
sam_grove 5:3f93dd1d4cb3 90 #else /* MEMP_MEM_MALLOC */
sam_grove 5:3f93dd1d4cb3 91
sam_grove 5:3f93dd1d4cb3 92 #if MEM_USE_POOLS
sam_grove 5:3f93dd1d4cb3 93 /** This structure is used to save the pool one element came from. */
sam_grove 5:3f93dd1d4cb3 94 struct memp_malloc_helper
sam_grove 5:3f93dd1d4cb3 95 {
sam_grove 5:3f93dd1d4cb3 96 memp_t poolnr;
sam_grove 5:3f93dd1d4cb3 97 };
sam_grove 5:3f93dd1d4cb3 98 #endif /* MEM_USE_POOLS */
sam_grove 5:3f93dd1d4cb3 99
sam_grove 5:3f93dd1d4cb3 100 void memp_init(void);
sam_grove 5:3f93dd1d4cb3 101
sam_grove 5:3f93dd1d4cb3 102 #if MEMP_OVERFLOW_CHECK
sam_grove 5:3f93dd1d4cb3 103 void *memp_malloc_fn(memp_t type, const char* file, const int line);
sam_grove 5:3f93dd1d4cb3 104 #define memp_malloc(t) memp_malloc_fn((t), __FILE__, __LINE__)
sam_grove 5:3f93dd1d4cb3 105 #else
sam_grove 5:3f93dd1d4cb3 106 void *memp_malloc(memp_t type);
sam_grove 5:3f93dd1d4cb3 107 #endif
sam_grove 5:3f93dd1d4cb3 108 void memp_free(memp_t type, void *mem);
sam_grove 5:3f93dd1d4cb3 109
sam_grove 5:3f93dd1d4cb3 110 #endif /* MEMP_MEM_MALLOC */
sam_grove 5:3f93dd1d4cb3 111
sam_grove 5:3f93dd1d4cb3 112 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 113 }
sam_grove 5:3f93dd1d4cb3 114 #endif
sam_grove 5:3f93dd1d4cb3 115
sam_grove 5:3f93dd1d4cb3 116 #endif /* __LWIP_MEMP_H__ */