Port of TI's CC3100 Websock camera demo. Using FreeRTOS, mbedTLS, also parts of Arducam for cams ov5642 and 0v2640. Can also use MT9D111. Work in progress. Be warned some parts maybe a bit flacky. This is for Seeed Arch max only, for an M3, see the demo for CM3 using the 0v5642 aducam mini.
simplelink/cc3100_netcfg.h@22:f9b5e0b80bf2, 2015-09-15 (annotated)
- Committer:
- dflet
- Date:
- Tue Sep 15 16:45:04 2015 +0000
- Revision:
- 22:f9b5e0b80bf2
- Parent:
- 0:50cedd586816
Removed some debug.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dflet | 0:50cedd586816 | 1 | /* |
dflet | 0:50cedd586816 | 2 | * netcfg.h - CC31xx/CC32xx Host Driver Implementation |
dflet | 0:50cedd586816 | 3 | * |
dflet | 0:50cedd586816 | 4 | * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ |
dflet | 0:50cedd586816 | 5 | * |
dflet | 0:50cedd586816 | 6 | * |
dflet | 0:50cedd586816 | 7 | * Redistribution and use in source and binary forms, with or without |
dflet | 0:50cedd586816 | 8 | * modification, are permitted provided that the following conditions |
dflet | 0:50cedd586816 | 9 | * are met: |
dflet | 0:50cedd586816 | 10 | * |
dflet | 0:50cedd586816 | 11 | * Redistributions of source code must retain the above copyright |
dflet | 0:50cedd586816 | 12 | * notice, this list of conditions and the following disclaimer. |
dflet | 0:50cedd586816 | 13 | * |
dflet | 0:50cedd586816 | 14 | * Redistributions in binary form must reproduce the above copyright |
dflet | 0:50cedd586816 | 15 | * notice, this list of conditions and the following disclaimer in the |
dflet | 0:50cedd586816 | 16 | * documentation and/or other materials provided with the |
dflet | 0:50cedd586816 | 17 | * distribution. |
dflet | 0:50cedd586816 | 18 | * |
dflet | 0:50cedd586816 | 19 | * Neither the name of Texas Instruments Incorporated nor the names of |
dflet | 0:50cedd586816 | 20 | * its contributors may be used to endorse or promote products derived |
dflet | 0:50cedd586816 | 21 | * from this software without specific prior written permission. |
dflet | 0:50cedd586816 | 22 | * |
dflet | 0:50cedd586816 | 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
dflet | 0:50cedd586816 | 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
dflet | 0:50cedd586816 | 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
dflet | 0:50cedd586816 | 26 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
dflet | 0:50cedd586816 | 27 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
dflet | 0:50cedd586816 | 28 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
dflet | 0:50cedd586816 | 29 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
dflet | 0:50cedd586816 | 30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
dflet | 0:50cedd586816 | 31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
dflet | 0:50cedd586816 | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
dflet | 0:50cedd586816 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
dflet | 0:50cedd586816 | 34 | * |
dflet | 0:50cedd586816 | 35 | */ |
dflet | 0:50cedd586816 | 36 | |
dflet | 0:50cedd586816 | 37 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 38 | /* Include files */ |
dflet | 0:50cedd586816 | 39 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 40 | #include "cc3100_simplelink.h" |
dflet | 0:50cedd586816 | 41 | |
dflet | 0:50cedd586816 | 42 | #ifndef NETCFG_H_ |
dflet | 0:50cedd586816 | 43 | #define NETCFG_H_ |
dflet | 0:50cedd586816 | 44 | |
dflet | 0:50cedd586816 | 45 | namespace mbed_cc3100 { |
dflet | 0:50cedd586816 | 46 | |
dflet | 0:50cedd586816 | 47 | /*! |
dflet | 0:50cedd586816 | 48 | |
dflet | 0:50cedd586816 | 49 | \addtogroup netcfg |
dflet | 0:50cedd586816 | 50 | @{ |
dflet | 0:50cedd586816 | 51 | |
dflet | 0:50cedd586816 | 52 | */ |
dflet | 0:50cedd586816 | 53 | |
dflet | 0:50cedd586816 | 54 | |
dflet | 0:50cedd586816 | 55 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 56 | /* Macro declarations */ |
dflet | 0:50cedd586816 | 57 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 58 | const uint8_t SL_MAC_ADDR_LEN = (6); |
dflet | 0:50cedd586816 | 59 | const uint8_t IPCONFIG_MODE_DISABLE_IPV4 = (0); |
dflet | 0:50cedd586816 | 60 | const uint8_t IPCONFIG_MODE_ENABLE_IPV4 = (1); |
dflet | 0:50cedd586816 | 61 | |
dflet | 0:50cedd586816 | 62 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 63 | /* Structure/Enum declarations */ |
dflet | 0:50cedd586816 | 64 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 65 | typedef enum { |
dflet | 0:50cedd586816 | 66 | SL_MAC_ADDRESS_SET = 1, |
dflet | 0:50cedd586816 | 67 | SL_MAC_ADDRESS_GET = 2, |
dflet | 0:50cedd586816 | 68 | SL_IPV4_STA_P2P_CL_GET_INFO = 3, |
dflet | 0:50cedd586816 | 69 | SL_IPV4_STA_P2P_CL_DHCP_ENABLE = 4, |
dflet | 0:50cedd586816 | 70 | SL_IPV4_STA_P2P_CL_STATIC_ENABLE = 5, |
dflet | 0:50cedd586816 | 71 | SL_IPV4_AP_P2P_GO_GET_INFO = 6, |
dflet | 0:50cedd586816 | 72 | SL_IPV4_AP_P2P_GO_STATIC_ENABLE = 7, |
dflet | 0:50cedd586816 | 73 | SL_SET_HOST_RX_AGGR = 8, |
dflet | 0:50cedd586816 | 74 | MAX_SETTINGS = 0xFF |
dflet | 0:50cedd586816 | 75 | } Sl_NetCfg_e; |
dflet | 0:50cedd586816 | 76 | |
dflet | 0:50cedd586816 | 77 | |
dflet | 0:50cedd586816 | 78 | typedef struct { |
dflet | 0:50cedd586816 | 79 | uint32_t ipV4; |
dflet | 0:50cedd586816 | 80 | uint32_t ipV4Mask; |
dflet | 0:50cedd586816 | 81 | uint32_t ipV4Gateway; |
dflet | 0:50cedd586816 | 82 | uint32_t ipV4DnsServer; |
dflet | 0:50cedd586816 | 83 | } SlNetCfgIpV4Args_t; |
dflet | 0:50cedd586816 | 84 | |
dflet | 0:50cedd586816 | 85 | class cc3100_netcfg |
dflet | 0:50cedd586816 | 86 | { |
dflet | 0:50cedd586816 | 87 | |
dflet | 0:50cedd586816 | 88 | public: |
dflet | 0:50cedd586816 | 89 | |
dflet | 0:50cedd586816 | 90 | cc3100_netcfg(cc3100_driver &driver); |
dflet | 0:50cedd586816 | 91 | |
dflet | 0:50cedd586816 | 92 | ~cc3100_netcfg(); |
dflet | 0:50cedd586816 | 93 | |
dflet | 0:50cedd586816 | 94 | |
dflet | 0:50cedd586816 | 95 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 96 | /* Function prototypes */ |
dflet | 0:50cedd586816 | 97 | /*****************************************************************************/ |
dflet | 0:50cedd586816 | 98 | |
dflet | 0:50cedd586816 | 99 | /*! |
dflet | 0:50cedd586816 | 100 | \brief Internal function for setting network configurations |
dflet | 0:50cedd586816 | 101 | |
dflet | 0:50cedd586816 | 102 | \return On success, zero is returned. On error, -1 is |
dflet | 0:50cedd586816 | 103 | returned |
dflet | 0:50cedd586816 | 104 | |
dflet | 0:50cedd586816 | 105 | \param[in] ConfigId configuration id |
dflet | 0:50cedd586816 | 106 | \param[in] ConfigOpt configurations option |
dflet | 0:50cedd586816 | 107 | \param[in] ConfigLen configurations len |
dflet | 0:50cedd586816 | 108 | \param[in] pValues configurations values |
dflet | 0:50cedd586816 | 109 | |
dflet | 0:50cedd586816 | 110 | \sa |
dflet | 0:50cedd586816 | 111 | \note |
dflet | 0:50cedd586816 | 112 | \warning |
dflet | 0:50cedd586816 | 113 | |
dflet | 0:50cedd586816 | 114 | \par Examples: |
dflet | 0:50cedd586816 | 115 | \code |
dflet | 0:50cedd586816 | 116 | SL_MAC_ADDRESS_SET: |
dflet | 0:50cedd586816 | 117 | |
dflet | 0:50cedd586816 | 118 | Setting MAC address to the Device. |
dflet | 0:50cedd586816 | 119 | The new MAC address will override the default MAC address and it be saved in the FileSystem. |
dflet | 0:50cedd586816 | 120 | Requires restarting the device for updating this setting. |
dflet | 0:50cedd586816 | 121 | |
dflet | 0:50cedd586816 | 122 | uint8_t MAC_Address[6]; |
dflet | 0:50cedd586816 | 123 | MAC_Address[0] = 0x8; |
dflet | 0:50cedd586816 | 124 | MAC_Address[1] = 0x0; |
dflet | 0:50cedd586816 | 125 | MAC_Address[2] = 0x28; |
dflet | 0:50cedd586816 | 126 | MAC_Address[3] = 0x22; |
dflet | 0:50cedd586816 | 127 | MAC_Address[4] = 0x69; |
dflet | 0:50cedd586816 | 128 | MAC_Address[5] = 0x31; |
dflet | 0:50cedd586816 | 129 | sl_NetCfgSet(SL_MAC_ADDRESS_SET,1,SL_MAC_ADDR_LEN,(uint8_t *)newMacAddress); |
dflet | 0:50cedd586816 | 130 | sl_Stop(0); |
dflet | 0:50cedd586816 | 131 | sl_Start(NULL,NULL,NULL); |
dflet | 0:50cedd586816 | 132 | \endcode |
dflet | 0:50cedd586816 | 133 | |
dflet | 0:50cedd586816 | 134 | \code |
dflet | 0:50cedd586816 | 135 | SL_IPV4_STA_P2P_CL_STATIC_ENABLE: |
dflet | 0:50cedd586816 | 136 | |
dflet | 0:50cedd586816 | 137 | Setting a static IP address to the device working in STA mode or P2P client. |
dflet | 0:50cedd586816 | 138 | The IP address will be stored in the FileSystem. |
dflet | 0:50cedd586816 | 139 | In order to disable the static IP and get the address assigned from DHCP one should use SL_STA_P2P_CL_IPV4_DHCP_SET |
dflet | 0:50cedd586816 | 140 | |
dflet | 0:50cedd586816 | 141 | SlNetCfgIpV4Args_t ipV4; |
dflet | 0:50cedd586816 | 142 | ipV4.ipV4 = (uint32_t)SL_IPV4_VAL(10,1,1,201); // uint32_t IP address |
dflet | 0:50cedd586816 | 143 | ipV4.ipV4Mask = (uint32_t)SL_IPV4_VAL(255,255,255,0); // uint32_t Subnet mask for this STA/P2P |
dflet | 0:50cedd586816 | 144 | ipV4.ipV4Gateway = (uint32_t)SL_IPV4_VAL(10,1,1,1); // uint32_t Default gateway address |
dflet | 0:50cedd586816 | 145 | ipV4.ipV4DnsServer = (uint32_t)SL_IPV4_VAL(8,16,32,64); // uint32_t DNS server address |
dflet | 0:50cedd586816 | 146 | |
dflet | 0:50cedd586816 | 147 | sl_NetCfgSet(SL_IPV4_STA_P2P_CL_STATIC_ENABLE,IPCONFIG_MODE_ENABLE_IPV4,sizeof(SlNetCfgIpV4Args_t),(uint8_t *)&ipV4); |
dflet | 0:50cedd586816 | 148 | sl_Stop(0); |
dflet | 0:50cedd586816 | 149 | sl_Start(NULL,NULL,NULL); |
dflet | 0:50cedd586816 | 150 | \endcode |
dflet | 0:50cedd586816 | 151 | |
dflet | 0:50cedd586816 | 152 | \code |
dflet | 0:50cedd586816 | 153 | SL_IPV4_STA_P2P_CL_DHCP_ENABLE: |
dflet | 0:50cedd586816 | 154 | |
dflet | 0:50cedd586816 | 155 | Setting IP address by DHCP to FileSystem using WLAN sta mode or P2P client. |
dflet | 0:50cedd586816 | 156 | This should be done once if using Serial Flash. |
dflet | 0:50cedd586816 | 157 | This is the system's default mode for acquiring an IP address after WLAN connection. |
dflet | 0:50cedd586816 | 158 | uint8_t val = 1; |
dflet | 0:50cedd586816 | 159 | sl_NetCfgSet(SL_IPV4_STA_P2P_CL_DHCP_ENABLE,IPCONFIG_MODE_ENABLE_IPV4,1,&val); |
dflet | 0:50cedd586816 | 160 | sl_Stop(0); |
dflet | 0:50cedd586816 | 161 | sl_Start(NULL,NULL,NULL); |
dflet | 0:50cedd586816 | 162 | \endcode |
dflet | 0:50cedd586816 | 163 | |
dflet | 0:50cedd586816 | 164 | \code |
dflet | 0:50cedd586816 | 165 | SL_IPV4_AP_P2P_GO_STATIC_ENABLE: |
dflet | 0:50cedd586816 | 166 | |
dflet | 0:50cedd586816 | 167 | Setting a static IP address to the device working in AP mode or P2P go. |
dflet | 0:50cedd586816 | 168 | The IP address will be stored in the FileSystem. Requires restart. |
dflet | 0:50cedd586816 | 169 | |
dflet | 0:50cedd586816 | 170 | SlNetCfgIpV4Args_t ipV4; |
dflet | 0:50cedd586816 | 171 | ipV4.ipV4 = (uint32_t)SL_IPV4_VAL(10,1,1,201); // uint32_t IP address |
dflet | 0:50cedd586816 | 172 | ipV4.ipV4Mask = (uint32_t)SL_IPV4_VAL(255,255,255,0); // uint32_t Subnet mask for this AP/P2P |
dflet | 0:50cedd586816 | 173 | ipV4.ipV4Gateway = (uint32_t)SL_IPV4_VAL(10,1,1,1); // uint32_t Default gateway address |
dflet | 0:50cedd586816 | 174 | ipV4.ipV4DnsServer = (uint32_t)SL_IPV4_VAL(8,16,32,64); // uint32_t DNS server address |
dflet | 0:50cedd586816 | 175 | |
dflet | 0:50cedd586816 | 176 | sl_NetCfgSet(SL_IPV4_AP_P2P_GO_STATIC_ENABLE,IPCONFIG_MODE_ENABLE_IPV4,sizeof(SlNetCfgIpV4Args_t),(uint8_t *)&ipV4); |
dflet | 0:50cedd586816 | 177 | sl_Stop(0); |
dflet | 0:50cedd586816 | 178 | sl_Start(NULL,NULL,NULL); |
dflet | 0:50cedd586816 | 179 | \endcode |
dflet | 0:50cedd586816 | 180 | |
dflet | 0:50cedd586816 | 181 | |
dflet | 0:50cedd586816 | 182 | */ |
dflet | 0:50cedd586816 | 183 | #if _SL_INCLUDE_FUNC(sl_NetCfgSet) |
dflet | 0:50cedd586816 | 184 | int32_t sl_NetCfgSet(const uint8_t ConfigId, const uint8_t ConfigOpt, const uint8_t ConfigLen, const uint8_t *pValues); |
dflet | 0:50cedd586816 | 185 | #endif |
dflet | 0:50cedd586816 | 186 | |
dflet | 0:50cedd586816 | 187 | |
dflet | 0:50cedd586816 | 188 | /*! |
dflet | 0:50cedd586816 | 189 | \brief Internal function for getting network configurations |
dflet | 0:50cedd586816 | 190 | |
dflet | 0:50cedd586816 | 191 | \return On success, zero is returned. On error, -1 is |
dflet | 0:50cedd586816 | 192 | returned |
dflet | 0:50cedd586816 | 193 | |
dflet | 0:50cedd586816 | 194 | \param[in] ConfigId configuration id |
dflet | 0:50cedd586816 | 195 | |
dflet | 0:50cedd586816 | 196 | \param[out] pConfigOpt Get configurations option |
dflet | 0:50cedd586816 | 197 | |
dflet | 0:50cedd586816 | 198 | \param[out] pConfigLen The length of the allocated memory as input, when the |
dflet | 0:50cedd586816 | 199 | function complete, the value of this parameter would be |
dflet | 0:50cedd586816 | 200 | the len that actually read from the device.\n |
dflet | 0:50cedd586816 | 201 | If the device return length that is longer from the input |
dflet | 0:50cedd586816 | 202 | value, the function will cut the end of the returned structure |
dflet | 0:50cedd586816 | 203 | and will return ESMALLBUF |
dflet | 0:50cedd586816 | 204 | |
dflet | 0:50cedd586816 | 205 | \param[out] pValues - get configurations values |
dflet | 0:50cedd586816 | 206 | |
dflet | 0:50cedd586816 | 207 | \sa |
dflet | 0:50cedd586816 | 208 | \note |
dflet | 0:50cedd586816 | 209 | \warning |
dflet | 0:50cedd586816 | 210 | \par Examples: |
dflet | 0:50cedd586816 | 211 | \code |
dflet | 0:50cedd586816 | 212 | SL_MAC_ADDRESS_GET: |
dflet | 0:50cedd586816 | 213 | |
dflet | 0:50cedd586816 | 214 | Get the device MAC address. |
dflet | 0:50cedd586816 | 215 | The returned MAC address is taken from FileSystem first. If the MAC address was not set by SL_MAC_ADDRESS_SET, the default MAC address |
dflet | 0:50cedd586816 | 216 | is retrieved from HW. |
dflet | 0:50cedd586816 | 217 | |
dflet | 0:50cedd586816 | 218 | uint8_t macAddressVal[SL_MAC_ADDR_LEN]; |
dflet | 0:50cedd586816 | 219 | uint8_t macAddressLen = SL_MAC_ADDR_LEN; |
dflet | 0:50cedd586816 | 220 | sl_NetCfgGet(SL_MAC_ADDRESS_GET,NULL,&macAddressLen,(uint8_t *)macAddressVal); |
dflet | 0:50cedd586816 | 221 | |
dflet | 0:50cedd586816 | 222 | \endcode |
dflet | 0:50cedd586816 | 223 | |
dflet | 0:50cedd586816 | 224 | \code |
dflet | 0:50cedd586816 | 225 | SL_IPV4_STA_P2P_CL_GET_INFO: |
dflet | 0:50cedd586816 | 226 | |
dflet | 0:50cedd586816 | 227 | Get IP address from WLAN station or P2P client. A DHCP flag is returned to indicate if the IP address is static or from DHCP. |
dflet | 0:50cedd586816 | 228 | |
dflet | 0:50cedd586816 | 229 | uint8_t len = sizeof(SlNetCfgIpV4Args_t); |
dflet | 0:50cedd586816 | 230 | uint8_t dhcpIsOn = 0; |
dflet | 0:50cedd586816 | 231 | SlNetCfgIpV4Args_t ipV4 = {0}; |
dflet | 0:50cedd586816 | 232 | sl_NetCfgGet(SL_IPV4_STA_P2P_CL_GET_INFO,&dhcpIsOn,&len,(uint8_t *)&ipV4); |
dflet | 0:50cedd586816 | 233 | |
dflet | 0:50cedd586816 | 234 | printf("DHCP is %s IP %d.%d.%d.%d MASK %d.%d.%d.%d GW %d.%d.%d.%d DNS %d.%d.%d.%d\n", |
dflet | 0:50cedd586816 | 235 | (dhcpIsOn > 0) ? "ON" : "OFF", |
dflet | 0:50cedd586816 | 236 | SL_IPV4_BYTE(ipV4.ipV4,3),SL_IPV4_BYTE(ipV4.ipV4,2),SL_IPV4_BYTE(ipV4.ipV4,1),SL_IPV4_BYTE(ipV4.ipV4,0), |
dflet | 0:50cedd586816 | 237 | SL_IPV4_BYTE(ipV4.ipV4Mask,3),SL_IPV4_BYTE(ipV4.ipV4Mask,2),SL_IPV4_BYTE(ipV4.ipV4Mask,1),SL_IPV4_BYTE(ipV4.ipV4Mask,0), |
dflet | 0:50cedd586816 | 238 | SL_IPV4_BYTE(ipV4.ipV4Gateway,3),SL_IPV4_BYTE(ipV4.ipV4Gateway,2),SL_IPV4_BYTE(ipV4.ipV4Gateway,1),SL_IPV4_BYTE(ipV4.ipV4Gateway,0), |
dflet | 0:50cedd586816 | 239 | SL_IPV4_BYTE(ipV4.ipV4DnsServer,3),SL_IPV4_BYTE(ipV4.ipV4DnsServer,2),SL_IPV4_BYTE(ipV4.ipV4DnsServer,1),SL_IPV4_BYTE(ipV4.ipV4DnsServer,0)); |
dflet | 0:50cedd586816 | 240 | |
dflet | 0:50cedd586816 | 241 | \endcode |
dflet | 0:50cedd586816 | 242 | |
dflet | 0:50cedd586816 | 243 | \code |
dflet | 0:50cedd586816 | 244 | SL_IPV4_AP_P2P_GO_GET_INFO: |
dflet | 0:50cedd586816 | 245 | |
dflet | 0:50cedd586816 | 246 | Get static IP address for AP or P2P go. |
dflet | 0:50cedd586816 | 247 | |
dflet | 0:50cedd586816 | 248 | uint8_t len = sizeof(SlNetCfgIpV4Args_t); |
dflet | 0:50cedd586816 | 249 | uint8_t dhcpIsOn = 0; // this flag is meaningless on AP/P2P go. |
dflet | 0:50cedd586816 | 250 | SlNetCfgIpV4Args_t ipV4 = {0}; |
dflet | 0:50cedd586816 | 251 | sl_NetCfgGet(SL_IPV4_AP_P2P_GO_GET_INFO,&dhcpIsOn,&len,(uint8_t *)&ipV4); |
dflet | 0:50cedd586816 | 252 | |
dflet | 0:50cedd586816 | 253 | printf("IP %d.%d.%d.%d MASK %d.%d.%d.%d GW %d.%d.%d.%d DNS %d.%d.%d.%d\n", |
dflet | 0:50cedd586816 | 254 | SL_IPV4_BYTE(ipV4.ipV4,3),SL_IPV4_BYTE(ipV4.ipV4,2),SL_IPV4_BYTE(ipV4.ipV4,1),SL_IPV4_BYTE(ipV4.ipV4,0), |
dflet | 0:50cedd586816 | 255 | SL_IPV4_BYTE(ipV4.ipV4Mask,3),SL_IPV4_BYTE(ipV4.ipV4Mask,2),SL_IPV4_BYTE(ipV4.ipV4Mask,1),SL_IPV4_BYTE(ipV4.ipV4Mask,0), |
dflet | 0:50cedd586816 | 256 | SL_IPV4_BYTE(ipV4.ipV4Gateway,3),SL_IPV4_BYTE(ipV4.ipV4Gateway,2),SL_IPV4_BYTE(ipV4.ipV4Gateway,1),SL_IPV4_BYTE(ipV4.ipV4Gateway,0), |
dflet | 0:50cedd586816 | 257 | SL_IPV4_BYTE(ipV4.ipV4DnsServer,3),SL_IPV4_BYTE(ipV4.ipV4DnsServer,2),SL_IPV4_BYTE(ipV4.ipV4DnsServer,1),SL_IPV4_BYTE(ipV4.ipV4DnsServer,0)); |
dflet | 0:50cedd586816 | 258 | |
dflet | 0:50cedd586816 | 259 | \endcode |
dflet | 0:50cedd586816 | 260 | |
dflet | 0:50cedd586816 | 261 | |
dflet | 0:50cedd586816 | 262 | */ |
dflet | 0:50cedd586816 | 263 | #if _SL_INCLUDE_FUNC(sl_NetCfgGet) |
dflet | 0:50cedd586816 | 264 | int32_t sl_NetCfgGet(const uint8_t ConfigId ,uint8_t *pConfigOpt, uint8_t *pConfigLen, uint8_t *pValues); |
dflet | 0:50cedd586816 | 265 | #endif |
dflet | 0:50cedd586816 | 266 | |
dflet | 0:50cedd586816 | 267 | uint32_t SL_IPV4_VAL(uint8_t add_3,uint8_t add_2,uint8_t add_1,uint8_t add_0); |
dflet | 0:50cedd586816 | 268 | uint8_t SL_IPV4_BYTE(uint32_t val,uint8_t index); |
dflet | 0:50cedd586816 | 269 | |
dflet | 0:50cedd586816 | 270 | private: |
dflet | 0:50cedd586816 | 271 | |
dflet | 0:50cedd586816 | 272 | cc3100_driver &_driver; |
dflet | 0:50cedd586816 | 273 | |
dflet | 0:50cedd586816 | 274 | };//class |
dflet | 0:50cedd586816 | 275 | |
dflet | 0:50cedd586816 | 276 | }//namespace mbed_cc3100 |
dflet | 0:50cedd586816 | 277 | |
dflet | 0:50cedd586816 | 278 | /*! |
dflet | 0:50cedd586816 | 279 | |
dflet | 0:50cedd586816 | 280 | Close the Doxygen group. |
dflet | 0:50cedd586816 | 281 | @} |
dflet | 0:50cedd586816 | 282 | |
dflet | 0:50cedd586816 | 283 | */ |
dflet | 0:50cedd586816 | 284 | |
dflet | 0:50cedd586816 | 285 | |
dflet | 0:50cedd586816 | 286 | #endif /* __NETCFG_H__ */ |
dflet | 0:50cedd586816 | 287 | |
dflet | 0:50cedd586816 | 288 |