Simple app demonstrating the HTTP GET feature of the WiConnect Host Library.

Dependencies:   WiConnect mbed

Committer:
dan_ackme
Date:
Sun Sep 07 02:14:49 2014 +0000
Revision:
10:040d4294960c
Parent:
0:cc6ec9345a81
updated for STM32F411

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan_ackme 10:040d4294960c 1 /**
dan_ackme 10:040d4294960c 2 * ACKme WiConnect Host Library is licensed under the BSD licence:
dan_ackme 10:040d4294960c 3 *
dan_ackme 10:040d4294960c 4 * Copyright (c)2014 ACKme Networks.
dan_ackme 10:040d4294960c 5 * All rights reserved.
dan_ackme 10:040d4294960c 6 *
dan_ackme 10:040d4294960c 7 * Redistribution and use in source and binary forms, with or without modification,
dan_ackme 10:040d4294960c 8 * are permitted provided that the following conditions are met:
dan_ackme 10:040d4294960c 9 *
dan_ackme 10:040d4294960c 10 * 1. Redistributions of source code must retain the above copyright notice,
dan_ackme 10:040d4294960c 11 * this list of conditions and the following disclaimer.
dan_ackme 10:040d4294960c 12 * 2. Redistributions in binary form must reproduce the above copyright notice,
dan_ackme 10:040d4294960c 13 * this list of conditions and the following disclaimer in the documentation
dan_ackme 10:040d4294960c 14 * and/or other materials provided with the distribution.
dan_ackme 10:040d4294960c 15 * 3. The name of the author may not be used to endorse or promote products
dan_ackme 10:040d4294960c 16 * derived from this software without specific prior written permission.
dan_ackme 10:040d4294960c 17 *
dan_ackme 10:040d4294960c 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED
dan_ackme 10:040d4294960c 19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
dan_ackme 10:040d4294960c 20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
dan_ackme 10:040d4294960c 21 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
dan_ackme 10:040d4294960c 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
dan_ackme 10:040d4294960c 23 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
dan_ackme 10:040d4294960c 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
dan_ackme 10:040d4294960c 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
dan_ackme 10:040d4294960c 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
dan_ackme 10:040d4294960c 27 * OF SUCH DAMAGE.
dan_ackme 0:cc6ec9345a81 28 */
dan_ackme 0:cc6ec9345a81 29 #pragma once
dan_ackme 0:cc6ec9345a81 30
dan_ackme 0:cc6ec9345a81 31
dan_ackme 0:cc6ec9345a81 32 // The BAUD rate your PC/MAC/Linux terminal uses with the eval board
dan_ackme 0:cc6ec9345a81 33 #define CONSOLE_BAUD 115200
dan_ackme 0:cc6ec9345a81 34
dan_ackme 0:cc6ec9345a81 35
dan_ackme 0:cc6ec9345a81 36 // Uncomment this to enable WiConnect serial interface hardware flow control
dan_ackme 0:cc6ec9345a81 37 // NOTE: your platform must support the serial flow control api functions
dan_ackme 0:cc6ec9345a81 38 //#define ENABLE_FLOW_CONTROL
dan_ackme 0:cc6ec9345a81 39
dan_ackme 0:cc6ec9345a81 40
dan_ackme 0:cc6ec9345a81 41 #define WICONNECT_INTERNAL_BUFFER_SIZE (4*1024)
dan_ackme 0:cc6ec9345a81 42 #define WICONNECT_SERIAL_RX_BUFFER_SIZE (4*1024)
dan_ackme 0:cc6ec9345a81 43
dan_ackme 0:cc6ec9345a81 44 #define DEFAULT_CMD_GETCHAR_TIMEOUT 250
dan_ackme 0:cc6ec9345a81 45 #define DEFAULT_COMMAND_LINE_LENGTH_MAX 128
dan_ackme 0:cc6ec9345a81 46 #define DEFAULT_COMMAND_MAX_HISTORY 16
dan_ackme 0:cc6ec9345a81 47 #define DEFAULT_CMD_PROMPT_STR "> "
dan_ackme 0:cc6ec9345a81 48 #define DEFAULT_COMMAND_MAX_ARGV 16
dan_ackme 0:cc6ec9345a81 49
dan_ackme 0:cc6ec9345a81 50 #define TEST_NONBLOCKING_API false
dan_ackme 0:cc6ec9345a81 51 #define TEST_BUFFER_LENGTH 4*1024
dan_ackme 0:cc6ec9345a81 52
dan_ackme 0:cc6ec9345a81 53
dan_ackme 0:cc6ec9345a81 54 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dan_ackme 0:cc6ec9345a81 55 // Seabass Target Configuration
dan_ackme 0:cc6ec9345a81 56 #ifdef TARGET_SEABASS
dan_ackme 0:cc6ec9345a81 57
dan_ackme 0:cc6ec9345a81 58 #define WICONNECT_TX_PIN PA_9
dan_ackme 0:cc6ec9345a81 59 #define WICONNECT_RX_PIN PA_10
dan_ackme 0:cc6ec9345a81 60 #define WICONNECT_RESET_PIN PB_0
dan_ackme 0:cc6ec9345a81 61 #define WICONNECT_WAKE_PIN NC
dan_ackme 0:cc6ec9345a81 62
dan_ackme 0:cc6ec9345a81 63 #ifdef ENABLE_FLOW_CONTROL
dan_ackme 0:cc6ec9345a81 64 #define WICONNECT_CTS_PIN PA_11
dan_ackme 0:cc6ec9345a81 65 #define WICONNECT_RTS_PIN PA_12
dan_ackme 0:cc6ec9345a81 66 #else
dan_ackme 0:cc6ec9345a81 67 #define WICONNECT_CTS_PIN NC
dan_ackme 0:cc6ec9345a81 68 #define WICONNECT_RTS_PIN NC
dan_ackme 0:cc6ec9345a81 69 #endif
dan_ackme 0:cc6ec9345a81 70
dan_ackme 0:cc6ec9345a81 71 #endif
dan_ackme 0:cc6ec9345a81 72
dan_ackme 0:cc6ec9345a81 73
dan_ackme 0:cc6ec9345a81 74 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dan_ackme 0:cc6ec9345a81 75 // Nucleo F401RE Target Configuration
dan_ackme 10:040d4294960c 76 #if defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F411RE)
dan_ackme 0:cc6ec9345a81 77
dan_ackme 0:cc6ec9345a81 78 #define WICONNECT_TX_PIN PA_9
dan_ackme 0:cc6ec9345a81 79 #define WICONNECT_RX_PIN PA_10
dan_ackme 0:cc6ec9345a81 80 #define WICONNECT_RESET_PIN PC_7
dan_ackme 0:cc6ec9345a81 81 #define WICONNECT_WAKE_PIN NC
dan_ackme 0:cc6ec9345a81 82
dan_ackme 0:cc6ec9345a81 83 #ifdef ENABLE_FLOW_CONTROL
dan_ackme 0:cc6ec9345a81 84 #define WICONNECT_CTS_PIN PA_11
dan_ackme 0:cc6ec9345a81 85 #define WICONNECT_RTS_PIN PA_12
dan_ackme 0:cc6ec9345a81 86 #else
dan_ackme 0:cc6ec9345a81 87 #define WICONNECT_CTS_PIN NC
dan_ackme 0:cc6ec9345a81 88 #define WICONNECT_RTS_PIN NC
dan_ackme 0:cc6ec9345a81 89 #endif
dan_ackme 0:cc6ec9345a81 90
dan_ackme 0:cc6ec9345a81 91 #endif
dan_ackme 10:040d4294960c 92