TCP echo client using the WiConnect library and mbed TCP Socket API.

Dependencies:   WiConnect mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers target_config.h Source File

target_config.h

00001 /**
00002  * ACKme WiConnect Host Library is licensed under the BSD licence: 
00003  * 
00004  * Copyright (c)2014 ACKme Networks.
00005  * All rights reserved. 
00006  * 
00007  * Redistribution and use in source and binary forms, with or without modification, 
00008  * are permitted provided that the following conditions are met: 
00009  * 
00010  * 1. Redistributions of source code must retain the above copyright notice, 
00011  * this list of conditions and the following disclaimer. 
00012  * 2. Redistributions in binary form must reproduce the above copyright notice, 
00013  * this list of conditions and the following disclaimer in the documentation 
00014  * and/or other materials provided with the distribution. 
00015  * 3. The name of the author may not be used to endorse or promote products 
00016  * derived from this software without specific prior written permission. 
00017  * 
00018  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED 
00019  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
00020  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
00021  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
00022  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
00023  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00024  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00025  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
00026  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
00027  * OF SUCH DAMAGE.
00028  */
00029 #pragma once
00030 
00031 
00032 // The BAUD rate your PC/MAC/Linux terminal uses with the eval board
00033 #define CONSOLE_BAUD 115200
00034 
00035 
00036 // Uncomment this to enable WiConnect serial interface hardware flow control
00037 // NOTE: your platform must support the serial flow control api functions
00038 //#define ENABLE_FLOW_CONTROL
00039 
00040 
00041 #define WICONNECT_INTERNAL_BUFFER_SIZE (4*1024)
00042 #define WICONNECT_SERIAL_RX_BUFFER_SIZE (4*1024)
00043 
00044 #define DEFAULT_CMD_GETCHAR_TIMEOUT 250
00045 #define DEFAULT_COMMAND_LINE_LENGTH_MAX 128
00046 #define DEFAULT_COMMAND_MAX_HISTORY 16
00047 #define DEFAULT_CMD_PROMPT_STR "> "
00048 #define DEFAULT_COMMAND_MAX_ARGV 16
00049 
00050 #define TEST_NONBLOCKING_API false
00051 #define TEST_BUFFER_LENGTH 4*1024
00052 
00053 
00054 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00055 // Seabass Target Configuration
00056 #ifdef TARGET_SEABASS
00057 
00058 #define WICONNECT_TX_PIN PA_9
00059 #define WICONNECT_RX_PIN PA_10
00060 #define WICONNECT_RESET_PIN PB_0
00061 #define WICONNECT_WAKE_PIN NC
00062 
00063 #ifdef ENABLE_FLOW_CONTROL
00064 #define WICONNECT_CTS_PIN PA_11
00065 #define WICONNECT_RTS_PIN PA_12
00066 #else
00067 #define WICONNECT_CTS_PIN NC
00068 #define WICONNECT_RTS_PIN NC
00069 #endif
00070 
00071 #endif
00072 
00073 
00074 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00075 // Nucleo F401RE Target Configuration
00076 #ifdef TARGET_NUCLEO_F401RE
00077 
00078 #define WICONNECT_TX_PIN PA_9
00079 #define WICONNECT_RX_PIN PA_10
00080 #define WICONNECT_RESET_PIN PC_7
00081 #define WICONNECT_WAKE_PIN NC
00082 
00083 #ifdef ENABLE_FLOW_CONTROL
00084 #define WICONNECT_CTS_PIN PA_11
00085 #define WICONNECT_RTS_PIN PA_12
00086 #else
00087 #define WICONNECT_CTS_PIN NC
00088 #define WICONNECT_RTS_PIN NC
00089 #endif
00090 
00091 #endif
00092 
00093