cc3000 driver with expanded buffers.

Fork of cc3000_hostdriver_mbedsocket by Martin Kojtal

Committer:
Kojto
Date:
Thu Sep 19 07:55:14 2013 +0000
Revision:
0:615c697c33b0
Child:
20:30b6ed7bf8fd
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 0:615c697c33b0 1 /*****************************************************************************
Kojto 0:615c697c33b0 2 *
Kojto 0:615c697c33b0 3 * C++ interface/implementation created by Martin Kojtal (0xc0170). Thanks to
Kojto 0:615c697c33b0 4 * Jim Carver and Frank Vannieuwkerke for their inital cc3000 mbed port and
Kojto 0:615c697c33b0 5 * provided help.
Kojto 0:615c697c33b0 6 *
Kojto 0:615c697c33b0 7 * This version of "host driver" uses CC3000 Host Driver Implementation. Thus
Kojto 0:615c697c33b0 8 * read the following copyright:
Kojto 0:615c697c33b0 9 *
Kojto 0:615c697c33b0 10 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
Kojto 0:615c697c33b0 11 *
Kojto 0:615c697c33b0 12 * Redistribution and use in source and binary forms, with or without
Kojto 0:615c697c33b0 13 * modification, are permitted provided that the following conditions
Kojto 0:615c697c33b0 14 * are met:
Kojto 0:615c697c33b0 15 *
Kojto 0:615c697c33b0 16 * Redistributions of source code must retain the above copyright
Kojto 0:615c697c33b0 17 * notice, this list of conditions and the following disclaimer.
Kojto 0:615c697c33b0 18 *
Kojto 0:615c697c33b0 19 * Redistributions in binary form must reproduce the above copyright
Kojto 0:615c697c33b0 20 * notice, this list of conditions and the following disclaimer in the
Kojto 0:615c697c33b0 21 * documentation and/or other materials provided with the
Kojto 0:615c697c33b0 22 * distribution.
Kojto 0:615c697c33b0 23 *
Kojto 0:615c697c33b0 24 * Neither the name of Texas Instruments Incorporated nor the names of
Kojto 0:615c697c33b0 25 * its contributors may be used to endorse or promote products derived
Kojto 0:615c697c33b0 26 * from this software without specific prior written permission.
Kojto 0:615c697c33b0 27 *
Kojto 0:615c697c33b0 28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Kojto 0:615c697c33b0 29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Kojto 0:615c697c33b0 30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Kojto 0:615c697c33b0 31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Kojto 0:615c697c33b0 32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Kojto 0:615c697c33b0 33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Kojto 0:615c697c33b0 34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Kojto 0:615c697c33b0 35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Kojto 0:615c697c33b0 36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Kojto 0:615c697c33b0 37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 0:615c697c33b0 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 0:615c697c33b0 39 *
Kojto 0:615c697c33b0 40 *****************************************************************************/
Kojto 0:615c697c33b0 41 #ifndef CC3000_NETAPP_H
Kojto 0:615c697c33b0 42 #define CC3000_NETAPP_H
Kojto 0:615c697c33b0 43
Kojto 0:615c697c33b0 44 #define MIN_TIMER_VAL_SECONDS 20
Kojto 0:615c697c33b0 45 #define MIN_TIMER_SET(t) if ((0 != t) && (t < MIN_TIMER_VAL_SECONDS)) \
Kojto 0:615c697c33b0 46 { \
Kojto 0:615c697c33b0 47 t = MIN_TIMER_VAL_SECONDS; \
Kojto 0:615c697c33b0 48 }
Kojto 0:615c697c33b0 49
Kojto 0:615c697c33b0 50
Kojto 0:615c697c33b0 51 #define NETAPP_DHCP_PARAMS_LEN (20)
Kojto 0:615c697c33b0 52 #define NETAPP_SET_TIMER_PARAMS_LEN (20)
Kojto 0:615c697c33b0 53 #define NETAPP_SET_DEBUG_LEVEL_PARAMS_LEN (4)
Kojto 0:615c697c33b0 54 #define NETAPP_PING_SEND_PARAMS_LEN (16)
Kojto 0:615c697c33b0 55
Kojto 0:615c697c33b0 56
Kojto 0:615c697c33b0 57 typedef struct _netapp_dhcp_ret_args_t
Kojto 0:615c697c33b0 58 {
Kojto 0:615c697c33b0 59 uint8_t aucIP[4];
Kojto 0:615c697c33b0 60 uint8_t aucSubnetMask[4];
Kojto 0:615c697c33b0 61 uint8_t aucDefaultGateway[4];
Kojto 0:615c697c33b0 62 uint8_t aucDHCPServer[4];
Kojto 0:615c697c33b0 63 uint8_t aucDNSServer[4];
Kojto 0:615c697c33b0 64 }tNetappDhcpParams;
Kojto 0:615c697c33b0 65
Kojto 0:615c697c33b0 66 typedef struct _netapp_ipconfig_ret_args_t
Kojto 0:615c697c33b0 67 {
Kojto 0:615c697c33b0 68 uint8_t aucIP[4];
Kojto 0:615c697c33b0 69 uint8_t aucSubnetMask[4];
Kojto 0:615c697c33b0 70 uint8_t aucDefaultGateway[4];
Kojto 0:615c697c33b0 71 uint8_t aucDHCPServer[4];
Kojto 0:615c697c33b0 72 uint8_t aucDNSServer[4];
Kojto 0:615c697c33b0 73 uint8_t uaMacAddr[6];
Kojto 0:615c697c33b0 74 uint8_t uaSSID[32];
Kojto 0:615c697c33b0 75 }tNetappIpconfigRetArgs;
Kojto 0:615c697c33b0 76
Kojto 0:615c697c33b0 77
Kojto 0:615c697c33b0 78 /*Ping send report parameters*/
Kojto 0:615c697c33b0 79 typedef struct _netapp_pingreport_args
Kojto 0:615c697c33b0 80 {
Kojto 0:615c697c33b0 81 uint32_t packets_sent;
Kojto 0:615c697c33b0 82 uint32_t packets_received;
Kojto 0:615c697c33b0 83 uint32_t min_round_time;
Kojto 0:615c697c33b0 84 uint32_t max_round_time;
Kojto 0:615c697c33b0 85 uint32_t avg_round_time;
Kojto 0:615c697c33b0 86 } netapp_pingreport_args_t;
Kojto 0:615c697c33b0 87
Kojto 0:615c697c33b0 88 #endif