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 /* mbed Microcontroller Library
sam_grove 5:3f93dd1d4cb3 2 * Copyright (c) 2006-2013 ARM Limited
sam_grove 5:3f93dd1d4cb3 3 *
sam_grove 5:3f93dd1d4cb3 4 * Licensed under the Apache License, Version 2.0 (the "License");
sam_grove 5:3f93dd1d4cb3 5 * you may not use this file except in compliance with the License.
sam_grove 5:3f93dd1d4cb3 6 * You may obtain a copy of the License at
sam_grove 5:3f93dd1d4cb3 7 *
sam_grove 5:3f93dd1d4cb3 8 * http://www.apache.org/licenses/LICENSE-2.0
sam_grove 5:3f93dd1d4cb3 9 *
sam_grove 5:3f93dd1d4cb3 10 * Unless required by applicable law or agreed to in writing, software
sam_grove 5:3f93dd1d4cb3 11 * distributed under the License is distributed on an "AS IS" BASIS,
sam_grove 5:3f93dd1d4cb3 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
sam_grove 5:3f93dd1d4cb3 13 * See the License for the specific language governing permissions and
sam_grove 5:3f93dd1d4cb3 14 * limitations under the License.
sam_grove 5:3f93dd1d4cb3 15 */
sam_grove 5:3f93dd1d4cb3 16 #ifndef MBED_INTERFACE_H
sam_grove 5:3f93dd1d4cb3 17 #define MBED_INTERFACE_H
sam_grove 5:3f93dd1d4cb3 18
sam_grove 5:3f93dd1d4cb3 19 #include "device.h"
sam_grove 5:3f93dd1d4cb3 20
sam_grove 5:3f93dd1d4cb3 21 /* Mbed interface mac address
sam_grove 5:3f93dd1d4cb3 22 * if MBED_MAC_ADD_x are zero, interface uid sets mac address,
sam_grove 5:3f93dd1d4cb3 23 * otherwise MAC_ADD_x are used.
sam_grove 5:3f93dd1d4cb3 24 */
sam_grove 5:3f93dd1d4cb3 25 #define MBED_MAC_ADDR_INTERFACE 0x00
sam_grove 5:3f93dd1d4cb3 26 #define MBED_MAC_ADDR_0 MBED_MAC_ADDR_INTERFACE
sam_grove 5:3f93dd1d4cb3 27 #define MBED_MAC_ADDR_1 MBED_MAC_ADDR_INTERFACE
sam_grove 5:3f93dd1d4cb3 28 #define MBED_MAC_ADDR_2 MBED_MAC_ADDR_INTERFACE
sam_grove 5:3f93dd1d4cb3 29 #define MBED_MAC_ADDR_3 MBED_MAC_ADDR_INTERFACE
sam_grove 5:3f93dd1d4cb3 30 #define MBED_MAC_ADDR_4 MBED_MAC_ADDR_INTERFACE
sam_grove 5:3f93dd1d4cb3 31 #define MBED_MAC_ADDR_5 MBED_MAC_ADDR_INTERFACE
sam_grove 5:3f93dd1d4cb3 32 #define MBED_MAC_ADDRESS_SUM (MBED_MAC_ADDR_0 | MBED_MAC_ADDR_1 | MBED_MAC_ADDR_2 | MBED_MAC_ADDR_3 | MBED_MAC_ADDR_4 | MBED_MAC_ADDR_5)
sam_grove 5:3f93dd1d4cb3 33
sam_grove 5:3f93dd1d4cb3 34 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 35 extern "C" {
sam_grove 5:3f93dd1d4cb3 36 #endif
sam_grove 5:3f93dd1d4cb3 37
sam_grove 5:3f93dd1d4cb3 38 #if DEVICE_SEMIHOST
sam_grove 5:3f93dd1d4cb3 39
sam_grove 5:3f93dd1d4cb3 40 /** Functions to control the mbed interface
sam_grove 5:3f93dd1d4cb3 41 *
sam_grove 5:3f93dd1d4cb3 42 * mbed Microcontrollers have a built-in interface to provide functionality such as
sam_grove 5:3f93dd1d4cb3 43 * drag-n-drop download, reset, serial-over-usb, and access to the mbed local file
sam_grove 5:3f93dd1d4cb3 44 * system. These functions provide means to control the interface suing semihost
sam_grove 5:3f93dd1d4cb3 45 * calls it supports.
sam_grove 5:3f93dd1d4cb3 46 */
sam_grove 5:3f93dd1d4cb3 47
sam_grove 5:3f93dd1d4cb3 48 /** Determine whether the mbed interface is connected, based on whether debug is enabled
sam_grove 5:3f93dd1d4cb3 49 *
sam_grove 5:3f93dd1d4cb3 50 * @returns
sam_grove 5:3f93dd1d4cb3 51 * 1 if interface is connected,
sam_grove 5:3f93dd1d4cb3 52 * 0 otherwise
sam_grove 5:3f93dd1d4cb3 53 */
sam_grove 5:3f93dd1d4cb3 54 int mbed_interface_connected(void);
sam_grove 5:3f93dd1d4cb3 55
sam_grove 5:3f93dd1d4cb3 56 /** Instruct the mbed interface to reset, as if the reset button had been pressed
sam_grove 5:3f93dd1d4cb3 57 *
sam_grove 5:3f93dd1d4cb3 58 * @returns
sam_grove 5:3f93dd1d4cb3 59 * 1 if successful,
sam_grove 5:3f93dd1d4cb3 60 * 0 otherwise (e.g. interface not present)
sam_grove 5:3f93dd1d4cb3 61 */
sam_grove 5:3f93dd1d4cb3 62 int mbed_interface_reset(void);
sam_grove 5:3f93dd1d4cb3 63
sam_grove 5:3f93dd1d4cb3 64 /** This will disconnect the debug aspect of the interface, so semihosting will be disabled.
sam_grove 5:3f93dd1d4cb3 65 * The interface will still support the USB serial aspect
sam_grove 5:3f93dd1d4cb3 66 *
sam_grove 5:3f93dd1d4cb3 67 * @returns
sam_grove 5:3f93dd1d4cb3 68 * 0 if successful,
sam_grove 5:3f93dd1d4cb3 69 * -1 otherwise (e.g. interface not present)
sam_grove 5:3f93dd1d4cb3 70 */
sam_grove 5:3f93dd1d4cb3 71 int mbed_interface_disconnect(void);
sam_grove 5:3f93dd1d4cb3 72
sam_grove 5:3f93dd1d4cb3 73 /** This will disconnect the debug aspect of the interface, and if the USB cable is not
sam_grove 5:3f93dd1d4cb3 74 * connected, also power down the interface. If the USB cable is connected, the interface
sam_grove 5:3f93dd1d4cb3 75 * will remain powered up and visible to the host
sam_grove 5:3f93dd1d4cb3 76 *
sam_grove 5:3f93dd1d4cb3 77 * @returns
sam_grove 5:3f93dd1d4cb3 78 * 0 if successful,
sam_grove 5:3f93dd1d4cb3 79 * -1 otherwise (e.g. interface not present)
sam_grove 5:3f93dd1d4cb3 80 */
sam_grove 5:3f93dd1d4cb3 81 int mbed_interface_powerdown(void);
sam_grove 5:3f93dd1d4cb3 82
sam_grove 5:3f93dd1d4cb3 83 /** This returns a string containing the 32-character UID of the mbed interface
sam_grove 5:3f93dd1d4cb3 84 * This is a weak function that can be overwritten if required
sam_grove 5:3f93dd1d4cb3 85 *
sam_grove 5:3f93dd1d4cb3 86 * @param uid A 33-byte array to write the null terminated 32-byte string
sam_grove 5:3f93dd1d4cb3 87 *
sam_grove 5:3f93dd1d4cb3 88 * @returns
sam_grove 5:3f93dd1d4cb3 89 * 0 if successful,
sam_grove 5:3f93dd1d4cb3 90 * -1 otherwise (e.g. interface not present)
sam_grove 5:3f93dd1d4cb3 91 */
sam_grove 5:3f93dd1d4cb3 92 int mbed_interface_uid(char *uid);
sam_grove 5:3f93dd1d4cb3 93
sam_grove 5:3f93dd1d4cb3 94 #endif
sam_grove 5:3f93dd1d4cb3 95
sam_grove 5:3f93dd1d4cb3 96 /** This returns a unique 6-byte MAC address, based on the interface UID
sam_grove 5:3f93dd1d4cb3 97 * If the interface is not present, it returns a default fixed MAC address (00:02:F7:F0:00:00)
sam_grove 5:3f93dd1d4cb3 98 *
sam_grove 5:3f93dd1d4cb3 99 * This is a weak function that can be overwritten if you want to provide your own mechanism to
sam_grove 5:3f93dd1d4cb3 100 * provide a MAC address.
sam_grove 5:3f93dd1d4cb3 101 *
sam_grove 5:3f93dd1d4cb3 102 * @param mac A 6-byte array to write the MAC address
sam_grove 5:3f93dd1d4cb3 103 */
sam_grove 5:3f93dd1d4cb3 104 void mbed_mac_address(char *mac);
sam_grove 5:3f93dd1d4cb3 105
sam_grove 5:3f93dd1d4cb3 106 /** Cause the mbed to flash the BLOD (Blue LEDs Of Death) sequence
sam_grove 5:3f93dd1d4cb3 107 */
sam_grove 5:3f93dd1d4cb3 108 void mbed_die(void);
sam_grove 5:3f93dd1d4cb3 109
sam_grove 5:3f93dd1d4cb3 110 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 111 }
sam_grove 5:3f93dd1d4cb3 112 #endif
sam_grove 5:3f93dd1d4cb3 113
sam_grove 5:3f93dd1d4cb3 114 #endif