cc3100_Socket_Wifi_Server with Ethernet Interface not working
Dependencies: EthernetInterface mbed-rtos mbed
Fork of cc3100_Test_Demo by
simplelink/cc3100_protocol.h@0:e89ba455dbcf, 2015-02-10 (annotated)
- Committer:
- dflet
- Date:
- Tue Feb 10 12:09:29 2015 +0000
- Revision:
- 0:e89ba455dbcf
For test only! Not much has been tested, but the 2 demo apps run ok. Alot more work needs to be done!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dflet | 0:e89ba455dbcf | 1 | /* |
dflet | 0:e89ba455dbcf | 2 | * protocol.h - CC31xx/CC32xx Host Driver Implementation |
dflet | 0:e89ba455dbcf | 3 | * |
dflet | 0:e89ba455dbcf | 4 | * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ |
dflet | 0:e89ba455dbcf | 5 | * |
dflet | 0:e89ba455dbcf | 6 | * |
dflet | 0:e89ba455dbcf | 7 | * Redistribution and use in source and binary forms, with or without |
dflet | 0:e89ba455dbcf | 8 | * modification, are permitted provided that the following conditions |
dflet | 0:e89ba455dbcf | 9 | * are met: |
dflet | 0:e89ba455dbcf | 10 | * |
dflet | 0:e89ba455dbcf | 11 | * Redistributions of source code must retain the above copyright |
dflet | 0:e89ba455dbcf | 12 | * notice, this list of conditions and the following disclaimer. |
dflet | 0:e89ba455dbcf | 13 | * |
dflet | 0:e89ba455dbcf | 14 | * Redistributions in binary form must reproduce the above copyright |
dflet | 0:e89ba455dbcf | 15 | * notice, this list of conditions and the following disclaimer in the |
dflet | 0:e89ba455dbcf | 16 | * documentation and/or other materials provided with the |
dflet | 0:e89ba455dbcf | 17 | * distribution. |
dflet | 0:e89ba455dbcf | 18 | * |
dflet | 0:e89ba455dbcf | 19 | * Neither the name of Texas Instruments Incorporated nor the names of |
dflet | 0:e89ba455dbcf | 20 | * its contributors may be used to endorse or promote products derived |
dflet | 0:e89ba455dbcf | 21 | * from this software without specific prior written permission. |
dflet | 0:e89ba455dbcf | 22 | * |
dflet | 0:e89ba455dbcf | 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
dflet | 0:e89ba455dbcf | 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
dflet | 0:e89ba455dbcf | 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
dflet | 0:e89ba455dbcf | 26 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
dflet | 0:e89ba455dbcf | 27 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
dflet | 0:e89ba455dbcf | 28 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
dflet | 0:e89ba455dbcf | 29 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
dflet | 0:e89ba455dbcf | 30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
dflet | 0:e89ba455dbcf | 31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
dflet | 0:e89ba455dbcf | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
dflet | 0:e89ba455dbcf | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
dflet | 0:e89ba455dbcf | 34 | * |
dflet | 0:e89ba455dbcf | 35 | */ |
dflet | 0:e89ba455dbcf | 36 | |
dflet | 0:e89ba455dbcf | 37 | /*******************************************************************************\ |
dflet | 0:e89ba455dbcf | 38 | * |
dflet | 0:e89ba455dbcf | 39 | * FILE NAME: protocol.h |
dflet | 0:e89ba455dbcf | 40 | * |
dflet | 0:e89ba455dbcf | 41 | * DESCRIPTION: Constant and data structure definitions and function |
dflet | 0:e89ba455dbcf | 42 | * prototypes for the SL protocol module, which implements |
dflet | 0:e89ba455dbcf | 43 | * processing of SimpleLink Commands. |
dflet | 0:e89ba455dbcf | 44 | * |
dflet | 0:e89ba455dbcf | 45 | * AUTHOR: |
dflet | 0:e89ba455dbcf | 46 | * |
dflet | 0:e89ba455dbcf | 47 | \*******************************************************************************/ |
dflet | 0:e89ba455dbcf | 48 | |
dflet | 0:e89ba455dbcf | 49 | #ifndef SL_PROTOCOL_TYPES_H_ |
dflet | 0:e89ba455dbcf | 50 | #define SL_PROTOCOL_TYPES_H_ |
dflet | 0:e89ba455dbcf | 51 | |
dflet | 0:e89ba455dbcf | 52 | namespace mbed_cc3100 { |
dflet | 0:e89ba455dbcf | 53 | |
dflet | 0:e89ba455dbcf | 54 | /**************************************************************************** |
dflet | 0:e89ba455dbcf | 55 | ** |
dflet | 0:e89ba455dbcf | 56 | ** User I/F pools definitions |
dflet | 0:e89ba455dbcf | 57 | ** |
dflet | 0:e89ba455dbcf | 58 | ****************************************************************************/ |
dflet | 0:e89ba455dbcf | 59 | |
dflet | 0:e89ba455dbcf | 60 | /**************************************************************************** |
dflet | 0:e89ba455dbcf | 61 | ** |
dflet | 0:e89ba455dbcf | 62 | ** Definitions for SimpleLink Commands |
dflet | 0:e89ba455dbcf | 63 | ** |
dflet | 0:e89ba455dbcf | 64 | ****************************************************************************/ |
dflet | 0:e89ba455dbcf | 65 | |
dflet | 0:e89ba455dbcf | 66 | |
dflet | 0:e89ba455dbcf | 67 | /* pattern for LE 8/16/32 or BE*/ |
dflet | 0:e89ba455dbcf | 68 | #define H2N_SYNC_PATTERN {0xBBDDEEFF,0x4321,0x34,0x12} |
dflet | 0:e89ba455dbcf | 69 | #define H2N_CNYS_PATTERN {0xBBDDEEFF,0x8765,0x78,0x56} |
dflet | 0:e89ba455dbcf | 70 | |
dflet | 0:e89ba455dbcf | 71 | const uint32_t H2N_DUMMY_PATTERN = (uint32_t)0xFFFFFFFF; |
dflet | 0:e89ba455dbcf | 72 | const uint32_t N2H_SYNC_PATTERN = (uint32_t)0xABCDDCBA; |
dflet | 0:e89ba455dbcf | 73 | const uint32_t SYNC_PATTERN_LEN = (uint32_t)sizeof(uint32_t); |
dflet | 0:e89ba455dbcf | 74 | const uint32_t UART_SET_MODE_MAGIC_CODE = (uint32_t)0xAA55AA55; |
dflet | 0:e89ba455dbcf | 75 | #define SPI_16BITS_BUG(pattern) (uint32_t)((uint32_t)pattern & (uint32_t)0xFFFF7FFF) |
dflet | 0:e89ba455dbcf | 76 | #define SPI_8BITS_BUG(pattern) (uint32_t)((uint32_t)pattern & (uint32_t)0xFFFFFF7F) |
dflet | 0:e89ba455dbcf | 77 | |
dflet | 0:e89ba455dbcf | 78 | |
dflet | 0:e89ba455dbcf | 79 | |
dflet | 0:e89ba455dbcf | 80 | typedef struct { |
dflet | 0:e89ba455dbcf | 81 | uint16_t Opcode; |
dflet | 0:e89ba455dbcf | 82 | uint16_t Len; |
dflet | 0:e89ba455dbcf | 83 | } _SlGenericHeader_t; |
dflet | 0:e89ba455dbcf | 84 | |
dflet | 0:e89ba455dbcf | 85 | |
dflet | 0:e89ba455dbcf | 86 | typedef struct { |
dflet | 0:e89ba455dbcf | 87 | uint32_t Long; |
dflet | 0:e89ba455dbcf | 88 | uint16_t Short; |
dflet | 0:e89ba455dbcf | 89 | uint8_t Byte1; |
dflet | 0:e89ba455dbcf | 90 | uint8_t Byte2; |
dflet | 0:e89ba455dbcf | 91 | } _SlSyncPattern_t; |
dflet | 0:e89ba455dbcf | 92 | |
dflet | 0:e89ba455dbcf | 93 | typedef _SlGenericHeader_t _SlCommandHeader_t; |
dflet | 0:e89ba455dbcf | 94 | |
dflet | 0:e89ba455dbcf | 95 | typedef struct { |
dflet | 0:e89ba455dbcf | 96 | _SlGenericHeader_t GenHeader; |
dflet | 0:e89ba455dbcf | 97 | uint8_t TxPoolCnt; |
dflet | 0:e89ba455dbcf | 98 | uint8_t DevStatus; |
dflet | 0:e89ba455dbcf | 99 | uint8_t SocketTXFailure; |
dflet | 0:e89ba455dbcf | 100 | uint8_t SocketNonBlocking; |
dflet | 0:e89ba455dbcf | 101 | } _SlResponseHeader_t; |
dflet | 0:e89ba455dbcf | 102 | |
dflet | 0:e89ba455dbcf | 103 | #define _SL_RESP_SPEC_HDR_SIZE (sizeof(_SlResponseHeader_t) - sizeof(_SlGenericHeader_t)) |
dflet | 0:e89ba455dbcf | 104 | #define _SL_RESP_HDR_SIZE sizeof(_SlResponseHeader_t) |
dflet | 0:e89ba455dbcf | 105 | #define _SL_CMD_HDR_SIZE sizeof(_SlCommandHeader_t) |
dflet | 0:e89ba455dbcf | 106 | |
dflet | 0:e89ba455dbcf | 107 | #define _SL_RESP_ARGS_START(_pMsg) (((_SlResponseHeader_t *)(_pMsg)) + 1) |
dflet | 0:e89ba455dbcf | 108 | |
dflet | 0:e89ba455dbcf | 109 | /* Used only in NWP! */ |
dflet | 0:e89ba455dbcf | 110 | typedef struct { |
dflet | 0:e89ba455dbcf | 111 | _SlCommandHeader_t sl_hdr; |
dflet | 0:e89ba455dbcf | 112 | uint8_t func_args_start; |
dflet | 0:e89ba455dbcf | 113 | } T_SCMD; |
dflet | 0:e89ba455dbcf | 114 | |
dflet | 0:e89ba455dbcf | 115 | |
dflet | 0:e89ba455dbcf | 116 | const uint8_t WLAN_CONN_STATUS_BIT = 0x01; |
dflet | 0:e89ba455dbcf | 117 | const uint8_t EVENTS_Q_STATUS_BIT = 0x02; |
dflet | 0:e89ba455dbcf | 118 | const uint8_t PENDING_RCV_CMD_BIT = 0x04; |
dflet | 0:e89ba455dbcf | 119 | const uint8_t FW_BUSY_PACKETS_BIT = 0x08; |
dflet | 0:e89ba455dbcf | 120 | |
dflet | 0:e89ba455dbcf | 121 | const uint32_t INIT_STA_OK = 0x11111111; |
dflet | 0:e89ba455dbcf | 122 | const uint32_t INIT_STA_ERR = 0x22222222; |
dflet | 0:e89ba455dbcf | 123 | const uint32_t INIT_AP_OK = 0x33333333; |
dflet | 0:e89ba455dbcf | 124 | const uint32_t INIT_AP_ERR = 0x44444444; |
dflet | 0:e89ba455dbcf | 125 | const uint32_t INIT_P2P_OK = 0x55555555; |
dflet | 0:e89ba455dbcf | 126 | const uint32_t INIT_P2P_ERR = 0x66666666; |
dflet | 0:e89ba455dbcf | 127 | |
dflet | 0:e89ba455dbcf | 128 | /**************************************************************************** |
dflet | 0:e89ba455dbcf | 129 | ** OPCODES |
dflet | 0:e89ba455dbcf | 130 | ****************************************************************************/ |
dflet | 0:e89ba455dbcf | 131 | const uint16_t SL_IPV4_IPV6_OFFSET = ( 9 ); |
dflet | 0:e89ba455dbcf | 132 | const uint16_t SL_OPCODE_IPV4 = ( 0x0 << SL_IPV4_IPV6_OFFSET ); |
dflet | 0:e89ba455dbcf | 133 | const uint16_t SL_OPCODE_IPV6 = ( 0x1 << SL_IPV4_IPV6_OFFSET ); |
dflet | 0:e89ba455dbcf | 134 | |
dflet | 0:e89ba455dbcf | 135 | const uint16_t SL_SYNC_ASYNC_OFFSET = ( 10 ); |
dflet | 0:e89ba455dbcf | 136 | const uint16_t SL_OPCODE_SYNC = (0x1 << SL_SYNC_ASYNC_OFFSET ); |
dflet | 0:e89ba455dbcf | 137 | const uint16_t SL_OPCODE_SILO_OFFSET = ( 11 ); |
dflet | 0:e89ba455dbcf | 138 | const uint16_t SL_OPCODE_SILO_MASK = ( 0xF << SL_OPCODE_SILO_OFFSET ); |
dflet | 0:e89ba455dbcf | 139 | const uint16_t SL_OPCODE_SILO_DEVICE = ( 0x0 << SL_OPCODE_SILO_OFFSET ); |
dflet | 0:e89ba455dbcf | 140 | const uint16_t SL_OPCODE_SILO_WLAN = ( 0x1 << SL_OPCODE_SILO_OFFSET ); |
dflet | 0:e89ba455dbcf | 141 | const uint16_t SL_OPCODE_SILO_SOCKET = ( 0x2 << SL_OPCODE_SILO_OFFSET ); |
dflet | 0:e89ba455dbcf | 142 | const uint16_t SL_OPCODE_SILO_NETAPP = ( 0x3 << SL_OPCODE_SILO_OFFSET ); |
dflet | 0:e89ba455dbcf | 143 | const uint16_t SL_OPCODE_SILO_NVMEM = ( 0x4 << SL_OPCODE_SILO_OFFSET ); |
dflet | 0:e89ba455dbcf | 144 | const uint16_t SL_OPCODE_SILO_NETCFG = ( 0x5 << SL_OPCODE_SILO_OFFSET ); |
dflet | 0:e89ba455dbcf | 145 | |
dflet | 0:e89ba455dbcf | 146 | const uint16_t SL_FAMILY_SHIFT = (0x4); |
dflet | 0:e89ba455dbcf | 147 | const uint16_t SL_FLAGS_MASK = (0xF); |
dflet | 0:e89ba455dbcf | 148 | |
dflet | 0:e89ba455dbcf | 149 | const uint16_t SL_OPCODE_DEVICE_INITCOMPLETE = 0x0008; |
dflet | 0:e89ba455dbcf | 150 | const uint16_t SL_OPCODE_DEVICE_STOP_COMMAND = 0x8473; |
dflet | 0:e89ba455dbcf | 151 | const uint16_t SL_OPCODE_DEVICE_STOP_RESPONSE = 0x0473; |
dflet | 0:e89ba455dbcf | 152 | const uint16_t SL_OPCODE_DEVICE_STOP_ASYNC_RESPONSE = 0x0073; |
dflet | 0:e89ba455dbcf | 153 | const uint16_t SL_OPCODE_DEVICE_DEVICEASYNCDUMMY = 0x0063; |
dflet | 0:e89ba455dbcf | 154 | |
dflet | 0:e89ba455dbcf | 155 | const uint16_t SL_OPCODE_DEVICE_VERSIONREADCOMMAND = 0x8470; |
dflet | 0:e89ba455dbcf | 156 | const uint16_t SL_OPCODE_DEVICE_VERSIONREADRESPONSE = 0x0470; |
dflet | 0:e89ba455dbcf | 157 | const uint16_t SL_OPCODE_DEVICE_DEVICEASYNCFATALERROR = 0x0078; |
dflet | 0:e89ba455dbcf | 158 | const uint16_t SL_OPCODE_WLAN_WLANCONNECTCOMMAND = 0x8C80; |
dflet | 0:e89ba455dbcf | 159 | const uint16_t SL_OPCODE_WLAN_WLANCONNECTRESPONSE = 0x0C80; |
dflet | 0:e89ba455dbcf | 160 | const uint16_t SL_OPCODE_WLAN_WLANASYNCCONNECTEDRESPONSE = 0x0880; |
dflet | 0:e89ba455dbcf | 161 | const uint16_t SL_OPCODE_WLAN_P2P_DEV_FOUND = 0x0830; |
dflet | 0:e89ba455dbcf | 162 | const uint16_t SL_OPCODE_WLAN_CONNECTION_FAILED = 0x0831; |
dflet | 0:e89ba455dbcf | 163 | const uint16_t SL_OPCODE_WLAN_P2P_NEG_REQ_RECEIVED = 0x0832; |
dflet | 0:e89ba455dbcf | 164 | |
dflet | 0:e89ba455dbcf | 165 | const uint16_t SL_OPCODE_WLAN_WLANDISCONNECTCOMMAND = 0x8C81; |
dflet | 0:e89ba455dbcf | 166 | const uint16_t SL_OPCODE_WLAN_WLANDISCONNECTRESPONSE = 0x0C81; |
dflet | 0:e89ba455dbcf | 167 | const uint16_t SL_OPCODE_WLAN_WLANASYNCDISCONNECTEDRESPONSE = 0x0881; |
dflet | 0:e89ba455dbcf | 168 | const uint16_t SL_OPCODE_WLAN_WLANCONNECTEAPCOMMAND = 0x8C82; |
dflet | 0:e89ba455dbcf | 169 | const uint16_t SL_OPCODE_WLAN_WLANCONNECTEAPCRESPONSE = 0x0C82; |
dflet | 0:e89ba455dbcf | 170 | const uint16_t SL_OPCODE_WLAN_PROFILEADDCOMMAND = 0x8C83; |
dflet | 0:e89ba455dbcf | 171 | const uint16_t SL_OPCODE_WLAN_PROFILEADDRESPONSE = 0x0C83; |
dflet | 0:e89ba455dbcf | 172 | const uint16_t SL_OPCODE_WLAN_PROFILEGETCOMMAND = 0x8C84; |
dflet | 0:e89ba455dbcf | 173 | const uint16_t SL_OPCODE_WLAN_PROFILEGETRESPONSE = 0x0C84; |
dflet | 0:e89ba455dbcf | 174 | const uint16_t SL_OPCODE_WLAN_PROFILEDELCOMMAND = 0x8C85; |
dflet | 0:e89ba455dbcf | 175 | const uint16_t SL_OPCODE_WLAN_PROFILEDELRESPONSE = 0x0C85; |
dflet | 0:e89ba455dbcf | 176 | const uint16_t SL_OPCODE_WLAN_POLICYSETCOMMAND = 0x8C86; |
dflet | 0:e89ba455dbcf | 177 | const uint16_t SL_OPCODE_WLAN_POLICYSETRESPONSE = 0x0C86; |
dflet | 0:e89ba455dbcf | 178 | const uint16_t SL_OPCODE_WLAN_POLICYGETCOMMAND = 0x8C87; |
dflet | 0:e89ba455dbcf | 179 | const uint16_t SL_OPCODE_WLAN_POLICYGETRESPONSE = 0x0C87; |
dflet | 0:e89ba455dbcf | 180 | const uint16_t SL_OPCODE_WLAN_FILTERADD = 0x8C88; |
dflet | 0:e89ba455dbcf | 181 | const uint16_t SL_OPCODE_WLAN_FILTERADDRESPONSE = 0x0C88; |
dflet | 0:e89ba455dbcf | 182 | const uint16_t SL_OPCODE_WLAN_FILTERGET = 0x8C89; |
dflet | 0:e89ba455dbcf | 183 | const uint16_t SL_OPCODE_WLAN_FILTERGETRESPONSE = 0x0C89; |
dflet | 0:e89ba455dbcf | 184 | const uint16_t SL_OPCODE_WLAN_FILTERDELETE = 0x8C8A; |
dflet | 0:e89ba455dbcf | 185 | const uint16_t SL_OPCODE_WLAN_FILTERDELETERESPOSNE = 0x0C8A; |
dflet | 0:e89ba455dbcf | 186 | const uint16_t SL_OPCODE_WLAN_WLANGETSTATUSCOMMAND = 0x8C8F; |
dflet | 0:e89ba455dbcf | 187 | const uint16_t SL_OPCODE_WLAN_WLANGETSTATUSRESPONSE = 0x0C8F; |
dflet | 0:e89ba455dbcf | 188 | const uint16_t SL_OPCODE_WLAN_STARTTXCONTINUESCOMMAND = 0x8CAA; |
dflet | 0:e89ba455dbcf | 189 | const uint16_t SL_OPCODE_WLAN_STARTTXCONTINUESRESPONSE = 0x0CAA; |
dflet | 0:e89ba455dbcf | 190 | const uint16_t SL_OPCODE_WLAN_STOPTXCONTINUESCOMMAND = 0x8CAB; |
dflet | 0:e89ba455dbcf | 191 | const uint16_t SL_OPCODE_WLAN_STOPTXCONTINUESRESPONSE = 0x0CAB; |
dflet | 0:e89ba455dbcf | 192 | const uint16_t SL_OPCODE_WLAN_STARTRXSTATCOMMAND = 0x8CAC; |
dflet | 0:e89ba455dbcf | 193 | const uint16_t SL_OPCODE_WLAN_STARTRXSTATRESPONSE = 0x0CAC; |
dflet | 0:e89ba455dbcf | 194 | const uint16_t SL_OPCODE_WLAN_STOPRXSTATCOMMAND = 0x8CAD; |
dflet | 0:e89ba455dbcf | 195 | const uint16_t SL_OPCODE_WLAN_STOPRXSTATRESPONSE = 0x0CAD; |
dflet | 0:e89ba455dbcf | 196 | const uint16_t SL_OPCODE_WLAN_GETRXSTATCOMMAND = 0x8CAF; |
dflet | 0:e89ba455dbcf | 197 | const uint16_t SL_OPCODE_WLAN_GETRXSTATRESPONSE = 0x0CAF; |
dflet | 0:e89ba455dbcf | 198 | const uint16_t SL_OPCODE_WLAN_POLICYSETCOMMANDNEW = 0x8CB0; |
dflet | 0:e89ba455dbcf | 199 | const uint16_t SL_OPCODE_WLAN_POLICYSETRESPONSENEW = 0x0CB0; |
dflet | 0:e89ba455dbcf | 200 | const uint16_t SL_OPCODE_WLAN_POLICYGETCOMMANDNEW = 0x8CB1; |
dflet | 0:e89ba455dbcf | 201 | const uint16_t SL_OPCODE_WLAN_POLICYGETRESPONSENEW = 0x0CB1; |
dflet | 0:e89ba455dbcf | 202 | |
dflet | 0:e89ba455dbcf | 203 | const uint16_t SL_OPCODE_WLAN_SMART_CONFIG_START_COMMAND = 0x8CB2; |
dflet | 0:e89ba455dbcf | 204 | const uint16_t SL_OPCODE_WLAN_SMART_CONFIG_START_RESPONSE = 0x0CB2; |
dflet | 0:e89ba455dbcf | 205 | const uint16_t SL_OPCODE_WLAN_SMART_CONFIG_START_ASYNC_RESPONSE = 0x08B2; |
dflet | 0:e89ba455dbcf | 206 | const uint16_t SL_OPCODE_WLAN_SMART_CONFIG_STOP_COMMAND = 0x8CB3; |
dflet | 0:e89ba455dbcf | 207 | const uint16_t SL_OPCODE_WLAN_SMART_CONFIG_STOP_RESPONSE = 0x0CB3; |
dflet | 0:e89ba455dbcf | 208 | const uint16_t SL_OPCODE_WLAN_SMART_CONFIG_STOP_ASYNC_RESPONSE = 0x08B3; |
dflet | 0:e89ba455dbcf | 209 | const uint16_t SL_OPCODE_WLAN_SET_MODE = 0x8CB4; |
dflet | 0:e89ba455dbcf | 210 | const uint16_t SL_OPCODE_WLAN_SET_MODE_RESPONSE = 0x0CB4; |
dflet | 0:e89ba455dbcf | 211 | const uint16_t SL_OPCODE_WLAN_CFG_SET = 0x8CB5; |
dflet | 0:e89ba455dbcf | 212 | const uint16_t SL_OPCODE_WLAN_CFG_SET_RESPONSE = 0x0CB5; |
dflet | 0:e89ba455dbcf | 213 | const uint16_t SL_OPCODE_WLAN_CFG_GET = 0x8CB6; |
dflet | 0:e89ba455dbcf | 214 | const uint16_t SL_OPCODE_WLAN_CFG_GET_RESPONSE = 0x0CB6; |
dflet | 0:e89ba455dbcf | 215 | const uint16_t SL_OPCODE_WLAN_STA_CONNECTED = 0x082E; |
dflet | 0:e89ba455dbcf | 216 | const uint16_t SL_OPCODE_WLAN_STA_DISCONNECTED = 0x082F; |
dflet | 0:e89ba455dbcf | 217 | const uint16_t SL_OPCODE_WLAN_EAP_PROFILEADDCOMMAND = 0x8C67; |
dflet | 0:e89ba455dbcf | 218 | const uint16_t SL_OPCODE_WLAN_EAP_PROFILEADDCOMMAND_RESPONSE = 0x0C67; |
dflet | 0:e89ba455dbcf | 219 | |
dflet | 0:e89ba455dbcf | 220 | const uint16_t SL_OPCODE_SOCKET_SOCKET = 0x9401; |
dflet | 0:e89ba455dbcf | 221 | const uint16_t SL_OPCODE_SOCKET_SOCKETRESPONSE = 0x1401; |
dflet | 0:e89ba455dbcf | 222 | const uint16_t SL_OPCODE_SOCKET_CLOSE = 0x9402; |
dflet | 0:e89ba455dbcf | 223 | const uint16_t SL_OPCODE_SOCKET_CLOSERESPONSE = 0x1402; |
dflet | 0:e89ba455dbcf | 224 | const uint16_t SL_OPCODE_SOCKET_ACCEPT = 0x9403; |
dflet | 0:e89ba455dbcf | 225 | const uint16_t SL_OPCODE_SOCKET_ACCEPTRESPONSE = 0x1403; |
dflet | 0:e89ba455dbcf | 226 | const uint16_t SL_OPCODE_SOCKET_ACCEPTASYNCRESPONSE = 0x1003; |
dflet | 0:e89ba455dbcf | 227 | const uint16_t SL_OPCODE_SOCKET_ACCEPTASYNCRESPONSE_V6 = 0x1203; |
dflet | 0:e89ba455dbcf | 228 | const uint16_t SL_OPCODE_SOCKET_BIND = 0x9404; |
dflet | 0:e89ba455dbcf | 229 | const uint16_t SL_OPCODE_SOCKET_BIND_V6 = 0x9604; |
dflet | 0:e89ba455dbcf | 230 | const uint16_t SL_OPCODE_SOCKET_BINDRESPONSE = 0x1404; |
dflet | 0:e89ba455dbcf | 231 | const uint16_t SL_OPCODE_SOCKET_LISTEN = 0x9405; |
dflet | 0:e89ba455dbcf | 232 | const uint16_t SL_OPCODE_SOCKET_LISTENRESPONSE = 0x1405; |
dflet | 0:e89ba455dbcf | 233 | const uint16_t SL_OPCODE_SOCKET_CONNECT = 0x9406; |
dflet | 0:e89ba455dbcf | 234 | const uint16_t SL_OPCODE_SOCKET_CONNECT_V6 = 0x9606; |
dflet | 0:e89ba455dbcf | 235 | const uint16_t SL_OPCODE_SOCKET_CONNECTRESPONSE = 0x1406; |
dflet | 0:e89ba455dbcf | 236 | const uint16_t SL_OPCODE_SOCKET_CONNECTASYNCRESPONSE = 0x1006; |
dflet | 0:e89ba455dbcf | 237 | const uint16_t SL_OPCODE_SOCKET_SELECT = 0x9407; |
dflet | 0:e89ba455dbcf | 238 | const uint16_t SL_OPCODE_SOCKET_SELECTRESPONSE = 0x1407; |
dflet | 0:e89ba455dbcf | 239 | const uint16_t SL_OPCODE_SOCKET_SELECTASYNCRESPONSE = 0x1007; |
dflet | 0:e89ba455dbcf | 240 | const uint16_t SL_OPCODE_SOCKET_SETSOCKOPT = 0x9408; |
dflet | 0:e89ba455dbcf | 241 | const uint16_t SL_OPCODE_SOCKET_SETSOCKOPTRESPONSE = 0x1408; |
dflet | 0:e89ba455dbcf | 242 | const uint16_t SL_OPCODE_SOCKET_GETSOCKOPT = 0x9409; |
dflet | 0:e89ba455dbcf | 243 | const uint16_t SL_OPCODE_SOCKET_GETSOCKOPTRESPONSE = 0x1409; |
dflet | 0:e89ba455dbcf | 244 | const uint16_t SL_OPCODE_SOCKET_RECV = 0x940A; |
dflet | 0:e89ba455dbcf | 245 | const uint16_t SL_OPCODE_SOCKET_RECVASYNCRESPONSE = 0x100A; |
dflet | 0:e89ba455dbcf | 246 | const uint16_t SL_OPCODE_SOCKET_RECVFROM = 0x940B; |
dflet | 0:e89ba455dbcf | 247 | const uint16_t SL_OPCODE_SOCKET_RECVFROMASYNCRESPONSE = 0x100B; |
dflet | 0:e89ba455dbcf | 248 | const uint16_t SL_OPCODE_SOCKET_RECVFROMASYNCRESPONSE_V6 = 0x120B; |
dflet | 0:e89ba455dbcf | 249 | const uint16_t SL_OPCODE_SOCKET_SEND = 0x940C; |
dflet | 0:e89ba455dbcf | 250 | const uint16_t SL_OPCODE_SOCKET_SENDTO = 0x940D; |
dflet | 0:e89ba455dbcf | 251 | const uint16_t SL_OPCODE_SOCKET_SENDTO_V6 = 0x960D; |
dflet | 0:e89ba455dbcf | 252 | const uint16_t SL_OPCODE_SOCKET_TXFAILEDASYNCRESPONSE = 0x100E; |
dflet | 0:e89ba455dbcf | 253 | const uint16_t SL_OPCODE_SOCKET_SOCKETASYNCEVENT = 0x100F; |
dflet | 0:e89ba455dbcf | 254 | const uint16_t SL_OPCODE_NETAPP_START_COMMAND = 0x9C0A; |
dflet | 0:e89ba455dbcf | 255 | const uint16_t SL_OPCODE_NETAPP_START_RESPONSE = 0x1C0A; |
dflet | 0:e89ba455dbcf | 256 | const uint16_t SL_OPCODE_NETAPP_NETAPPSTARTRESPONSE = 0x1C0A; |
dflet | 0:e89ba455dbcf | 257 | const uint16_t SL_OPCODE_NETAPP_STOP_COMMAND = 0x9C61; |
dflet | 0:e89ba455dbcf | 258 | const uint16_t SL_OPCODE_NETAPP_STOP_RESPONSE = 0x1C61; |
dflet | 0:e89ba455dbcf | 259 | const uint16_t SL_OPCODE_NETAPP_NETAPPSET = 0x9C0B; |
dflet | 0:e89ba455dbcf | 260 | const uint16_t SL_OPCODE_NETAPP_NETAPPSETRESPONSE = 0x1C0B; |
dflet | 0:e89ba455dbcf | 261 | const uint16_t SL_OPCODE_NETAPP_NETAPPGET = 0x9C27; |
dflet | 0:e89ba455dbcf | 262 | const uint16_t SL_OPCODE_NETAPP_NETAPPGETRESPONSE = 0x1C27; |
dflet | 0:e89ba455dbcf | 263 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYNAME = 0x9C20; |
dflet | 0:e89ba455dbcf | 264 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYNAMERESPONSE = 0x1C20; |
dflet | 0:e89ba455dbcf | 265 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYNAMEASYNCRESPONSE = 0x1820; |
dflet | 0:e89ba455dbcf | 266 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYNAMEASYNCRESPONSE_V6 = 0x1A20; |
dflet | 0:e89ba455dbcf | 267 | const uint16_t SL_OPCODE_NETAPP_NETAPP_MDNS_LOOKUP_SERVICE = 0x9C71; |
dflet | 0:e89ba455dbcf | 268 | const uint16_t SL_OPCODE_NETAPP_NETAPP_MDNS_LOOKUP_SERVICE_RESPONSE = 0x1C72; |
dflet | 0:e89ba455dbcf | 269 | const uint16_t SL_OPCODE_NETAPP_MDNSREGISTERSERVICE = 0x9C34; |
dflet | 0:e89ba455dbcf | 270 | const uint16_t SL_OPCODE_NETAPP_MDNSREGISTERSERVICERESPONSE = 0x1C34; |
dflet | 0:e89ba455dbcf | 271 | const uint16_t SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICE = 0x9C35; |
dflet | 0:e89ba455dbcf | 272 | const uint16_t SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICERESPONSE = 0x1C35; |
dflet | 0:e89ba455dbcf | 273 | const uint16_t SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICEASYNCRESPONSE = 0x1835; |
dflet | 0:e89ba455dbcf | 274 | const uint16_t SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICEASYNCRESPONSE_V6 = 0x1A35; |
dflet | 0:e89ba455dbcf | 275 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYADDR = 0x9C26; |
dflet | 0:e89ba455dbcf | 276 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYADDR_V6 = 0x9E26; |
dflet | 0:e89ba455dbcf | 277 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYADDRRESPONSE = 0x1C26; |
dflet | 0:e89ba455dbcf | 278 | const uint16_t SL_OPCODE_NETAPP_DNSGETHOSTBYADDRASYNCRESPONSE = 0x1826; |
dflet | 0:e89ba455dbcf | 279 | const uint16_t SL_OPCODE_NETAPP_PINGSTART = 0x9C21; |
dflet | 0:e89ba455dbcf | 280 | const uint16_t SL_OPCODE_NETAPP_PINGSTART_V6 = 0x9E21; |
dflet | 0:e89ba455dbcf | 281 | const uint16_t SL_OPCODE_NETAPP_PINGSTARTRESPONSE = 0x1C21; |
dflet | 0:e89ba455dbcf | 282 | const uint16_t SL_OPCODE_NETAPP_PINGREPORTREQUEST = 0x9C22; |
dflet | 0:e89ba455dbcf | 283 | const uint16_t SL_OPCODE_NETAPP_PINGREPORTREQUESTRESPONSE = 0x1822; |
dflet | 0:e89ba455dbcf | 284 | const uint16_t SL_OPCODE_NETAPP_PINGSTOP = 0x9C23; |
dflet | 0:e89ba455dbcf | 285 | const uint16_t SL_OPCODE_NETAPP_PINGSTOPRESPONSE = 0x1C23; |
dflet | 0:e89ba455dbcf | 286 | const uint16_t SL_OPCODE_NETAPP_ARPFLUSH = 0x9C24; |
dflet | 0:e89ba455dbcf | 287 | const uint16_t SL_OPCODE_NETAPP_ARPFLUSHRESPONSE = 0x1C24; |
dflet | 0:e89ba455dbcf | 288 | const uint16_t SL_OPCODE_NETAPP_IPACQUIRED = 0x1825; |
dflet | 0:e89ba455dbcf | 289 | const uint16_t SL_OPCODE_NETAPP_IPV4_LOST = 0x1832; |
dflet | 0:e89ba455dbcf | 290 | const uint16_t SL_OPCODE_NETAPP_DHCP_IPV4_ACQUIRE_TIMEOUT = 0x1833; |
dflet | 0:e89ba455dbcf | 291 | const uint16_t SL_OPCODE_NETAPP_IPACQUIRED_V6 = 0x1A25; |
dflet | 0:e89ba455dbcf | 292 | const uint16_t SL_OPCODE_NETAPP_IPERFSTARTCOMMAND = 0x9C28; |
dflet | 0:e89ba455dbcf | 293 | const uint16_t SL_OPCODE_NETAPP_IPERFSTARTRESPONSE = 0x1C28; |
dflet | 0:e89ba455dbcf | 294 | const uint16_t SL_OPCODE_NETAPP_IPERFSTOPCOMMAND = 0x9C29; |
dflet | 0:e89ba455dbcf | 295 | const uint16_t SL_OPCODE_NETAPP_IPERFSTOPRESPONSE = 0x1C29; |
dflet | 0:e89ba455dbcf | 296 | const uint16_t SL_OPCODE_NETAPP_CTESTSTARTCOMMAND = 0x9C2A; |
dflet | 0:e89ba455dbcf | 297 | const uint16_t SL_OPCODE_NETAPP_CTESTSTARTRESPONSE = 0x1C2A; |
dflet | 0:e89ba455dbcf | 298 | const uint16_t SL_OPCODE_NETAPP_CTESTASYNCRESPONSE = 0x182A; |
dflet | 0:e89ba455dbcf | 299 | const uint16_t SL_OPCODE_NETAPP_CTESTSTOPCOMMAND = 0x9C2B; |
dflet | 0:e89ba455dbcf | 300 | const uint16_t SL_OPCODE_NETAPP_CTESTSTOPRESPONSE = 0x1C2B; |
dflet | 0:e89ba455dbcf | 301 | const uint16_t SL_OPCODE_NETAPP_IP_LEASED = 0x182C; |
dflet | 0:e89ba455dbcf | 302 | const uint16_t SL_OPCODE_NETAPP_IP_RELEASED = 0x182D; |
dflet | 0:e89ba455dbcf | 303 | const uint16_t SL_OPCODE_NETAPP_HTTPGETTOKENVALUE = 0x182E; |
dflet | 0:e89ba455dbcf | 304 | const uint16_t SL_OPCODE_NETAPP_HTTPSENDTOKENVALUE = 0x9C2F; |
dflet | 0:e89ba455dbcf | 305 | const uint16_t SL_OPCODE_NETAPP_HTTPPOSTTOKENVALUE = 0x1830; |
dflet | 0:e89ba455dbcf | 306 | const uint16_t SL_OPCODE_NVMEM_FILEOPEN = 0xA43C; |
dflet | 0:e89ba455dbcf | 307 | const uint16_t SL_OPCODE_NVMEM_FILEOPENRESPONSE = 0x243C; |
dflet | 0:e89ba455dbcf | 308 | const uint16_t SL_OPCODE_NVMEM_FILECLOSE = 0xA43D; |
dflet | 0:e89ba455dbcf | 309 | const uint16_t SL_OPCODE_NVMEM_FILECLOSERESPONSE = 0x243D; |
dflet | 0:e89ba455dbcf | 310 | const uint16_t SL_OPCODE_NVMEM_FILEREADCOMMAND = 0xA440; |
dflet | 0:e89ba455dbcf | 311 | const uint16_t SL_OPCODE_NVMEM_FILEREADRESPONSE = 0x2440; |
dflet | 0:e89ba455dbcf | 312 | const uint16_t SL_OPCODE_NVMEM_FILEWRITECOMMAND = 0xA441; |
dflet | 0:e89ba455dbcf | 313 | const uint16_t SL_OPCODE_NVMEM_FILEWRITERESPONSE = 0x2441; |
dflet | 0:e89ba455dbcf | 314 | const uint16_t SL_OPCODE_NVMEM_FILEGETINFOCOMMAND = 0xA442; |
dflet | 0:e89ba455dbcf | 315 | const uint16_t SL_OPCODE_NVMEM_FILEGETINFORESPONSE = 0x2442; |
dflet | 0:e89ba455dbcf | 316 | const uint16_t SL_OPCODE_NVMEM_FILEDELCOMMAND = 0xA443; |
dflet | 0:e89ba455dbcf | 317 | const uint16_t SL_OPCODE_NVMEM_FILEDELRESPONSE = 0x2443; |
dflet | 0:e89ba455dbcf | 318 | const uint16_t SL_OPCODE_NVMEM_NVMEMFORMATCOMMAND = 0xA444; |
dflet | 0:e89ba455dbcf | 319 | const uint16_t SL_OPCODE_NVMEM_NVMEMFORMATRESPONSE = 0x2444; |
dflet | 0:e89ba455dbcf | 320 | |
dflet | 0:e89ba455dbcf | 321 | const uint16_t SL_OPCODE_DEVICE_SETDEBUGLEVELCOMMAND = 0x846A; |
dflet | 0:e89ba455dbcf | 322 | const uint16_t SL_OPCODE_DEVICE_SETDEBUGLEVELRESPONSE = 0x046A; |
dflet | 0:e89ba455dbcf | 323 | |
dflet | 0:e89ba455dbcf | 324 | const uint16_t SL_OPCODE_DEVICE_NETCFG_SET_COMMAND = 0x8432; |
dflet | 0:e89ba455dbcf | 325 | const uint16_t SL_OPCODE_DEVICE_NETCFG_SET_RESPONSE = 0x0432; |
dflet | 0:e89ba455dbcf | 326 | const uint16_t SL_OPCODE_DEVICE_NETCFG_GET_COMMAND = 0x8433; |
dflet | 0:e89ba455dbcf | 327 | const uint16_t SL_OPCODE_DEVICE_NETCFG_GET_RESPONSE = 0x0433; |
dflet | 0:e89ba455dbcf | 328 | /* */ |
dflet | 0:e89ba455dbcf | 329 | const uint16_t SL_OPCODE_DEVICE_SETUARTMODECOMMAND = 0x846B; |
dflet | 0:e89ba455dbcf | 330 | const uint16_t SL_OPCODE_DEVICE_SETUARTMODERESPONSE = 0x046B; |
dflet | 0:e89ba455dbcf | 331 | const uint16_t SL_OPCODE_DEVICE_SSISIZESETCOMMAND = 0x846B; |
dflet | 0:e89ba455dbcf | 332 | const uint16_t SL_OPCODE_DEVICE_SSISIZESETRESPONSE = 0x046B; |
dflet | 0:e89ba455dbcf | 333 | |
dflet | 0:e89ba455dbcf | 334 | /* */ |
dflet | 0:e89ba455dbcf | 335 | const uint16_t SL_OPCODE_DEVICE_EVENTMASKSET = 0x8464; |
dflet | 0:e89ba455dbcf | 336 | const uint16_t SL_OPCODE_DEVICE_EVENTMASKSETRESPONSE = 0x0464; |
dflet | 0:e89ba455dbcf | 337 | const uint16_t SL_OPCODE_DEVICE_EVENTMASKGET = 0x8465; |
dflet | 0:e89ba455dbcf | 338 | const uint16_t SL_OPCODE_DEVICE_EVENTMASKGETRESPONSE = 0x0465; |
dflet | 0:e89ba455dbcf | 339 | |
dflet | 0:e89ba455dbcf | 340 | const uint16_t SL_OPCODE_DEVICE_DEVICEGET = 0x8466; |
dflet | 0:e89ba455dbcf | 341 | const uint16_t SL_OPCODE_DEVICE_DEVICEGETRESPONSE = 0x0466; |
dflet | 0:e89ba455dbcf | 342 | const uint16_t SL_OPCODE_DEVICE_DEVICESET = 0x84B7; |
dflet | 0:e89ba455dbcf | 343 | const uint16_t SL_OPCODE_DEVICE_DEVICESETRESPONSE = 0x04B7; |
dflet | 0:e89ba455dbcf | 344 | |
dflet | 0:e89ba455dbcf | 345 | const uint16_t SL_OPCODE_WLAN_SCANRESULTSGETCOMMAND = 0x8C8C; |
dflet | 0:e89ba455dbcf | 346 | const uint16_t SL_OPCODE_WLAN_SCANRESULTSGETRESPONSE = 0x0C8C; |
dflet | 0:e89ba455dbcf | 347 | const uint16_t SL_OPCODE_WLAN_SMARTCONFIGOPTSET = 0x8C8D; |
dflet | 0:e89ba455dbcf | 348 | const uint16_t SL_OPCODE_WLAN_SMARTCONFIGOPTSETRESPONSE = 0x0C8D; |
dflet | 0:e89ba455dbcf | 349 | const uint16_t SL_OPCODE_WLAN_SMARTCONFIGOPTGET = 0x8C8E; |
dflet | 0:e89ba455dbcf | 350 | const uint16_t SL_OPCODE_WLAN_SMARTCONFIGOPTGETRESPONSE = 0x0C8E; |
dflet | 0:e89ba455dbcf | 351 | |
dflet | 0:e89ba455dbcf | 352 | const uint16_t SL_OPCODE_FREE_BSD_RECV_BUFFER = 0xCCCB; |
dflet | 0:e89ba455dbcf | 353 | const uint16_t SL_OPCODE_FREE_NON_BSD_READ_BUFFER = 0xCCCD; |
dflet | 0:e89ba455dbcf | 354 | |
dflet | 0:e89ba455dbcf | 355 | |
dflet | 0:e89ba455dbcf | 356 | /* Rx Filters opcodes */ |
dflet | 0:e89ba455dbcf | 357 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERADDCOMMAND = 0x8C6C; |
dflet | 0:e89ba455dbcf | 358 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERADDRESPONSE = 0x0C6C; |
dflet | 0:e89ba455dbcf | 359 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERSETCOMMAND = 0x8C6D; |
dflet | 0:e89ba455dbcf | 360 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERSETRESPONSE = 0x0C6D; |
dflet | 0:e89ba455dbcf | 361 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERGETSTATISTICSINFOCOMMAND = 0x8C6E; |
dflet | 0:e89ba455dbcf | 362 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERGETSTATISTICSINFORESPONSE = 0x0C6E; |
dflet | 0:e89ba455dbcf | 363 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERGETCOMMAND = 0x8C6F; |
dflet | 0:e89ba455dbcf | 364 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERGETRESPONSE = 0x0C6F; |
dflet | 0:e89ba455dbcf | 365 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERGETINFO = 0x8C70; |
dflet | 0:e89ba455dbcf | 366 | const uint16_t SL_OPCODE_WLAN_WLANRXFILTERGETINFORESPONSE = 0x0C70; |
dflet | 0:e89ba455dbcf | 367 | |
dflet | 0:e89ba455dbcf | 368 | |
dflet | 0:e89ba455dbcf | 369 | /******************************************************************************************/ |
dflet | 0:e89ba455dbcf | 370 | /* Device structs */ |
dflet | 0:e89ba455dbcf | 371 | /******************************************************************************************/ |
dflet | 0:e89ba455dbcf | 372 | typedef uint32_t InitStatus_t; |
dflet | 0:e89ba455dbcf | 373 | |
dflet | 0:e89ba455dbcf | 374 | |
dflet | 0:e89ba455dbcf | 375 | typedef struct { |
dflet | 0:e89ba455dbcf | 376 | int32_t Status; |
dflet | 0:e89ba455dbcf | 377 | } InitComplete_t; |
dflet | 0:e89ba455dbcf | 378 | |
dflet | 0:e89ba455dbcf | 379 | typedef struct { |
dflet | 0:e89ba455dbcf | 380 | int16_t status; |
dflet | 0:e89ba455dbcf | 381 | uint16_t padding; |
dflet | 0:e89ba455dbcf | 382 | |
dflet | 0:e89ba455dbcf | 383 | } _BasicResponse_t; |
dflet | 0:e89ba455dbcf | 384 | |
dflet | 0:e89ba455dbcf | 385 | typedef struct { |
dflet | 0:e89ba455dbcf | 386 | uint16_t Timeout; |
dflet | 0:e89ba455dbcf | 387 | uint16_t padding; |
dflet | 0:e89ba455dbcf | 388 | } _DevStopCommand_t; |
dflet | 0:e89ba455dbcf | 389 | |
dflet | 0:e89ba455dbcf | 390 | typedef struct { |
dflet | 0:e89ba455dbcf | 391 | uint32_t group; |
dflet | 0:e89ba455dbcf | 392 | uint32_t mask; |
dflet | 0:e89ba455dbcf | 393 | } _DevMaskEventSetCommand_t; |
dflet | 0:e89ba455dbcf | 394 | |
dflet | 0:e89ba455dbcf | 395 | typedef _BasicResponse_t _DevMaskEventSetResponse_t; |
dflet | 0:e89ba455dbcf | 396 | |
dflet | 0:e89ba455dbcf | 397 | |
dflet | 0:e89ba455dbcf | 398 | typedef struct { |
dflet | 0:e89ba455dbcf | 399 | uint32_t group; |
dflet | 0:e89ba455dbcf | 400 | } _DevMaskEventGetCommand_t; |
dflet | 0:e89ba455dbcf | 401 | |
dflet | 0:e89ba455dbcf | 402 | |
dflet | 0:e89ba455dbcf | 403 | typedef struct { |
dflet | 0:e89ba455dbcf | 404 | uint32_t group; |
dflet | 0:e89ba455dbcf | 405 | uint32_t mask; |
dflet | 0:e89ba455dbcf | 406 | } _DevMaskEventGetResponse_t; |
dflet | 0:e89ba455dbcf | 407 | |
dflet | 0:e89ba455dbcf | 408 | |
dflet | 0:e89ba455dbcf | 409 | typedef struct { |
dflet | 0:e89ba455dbcf | 410 | uint32_t group; |
dflet | 0:e89ba455dbcf | 411 | } _DevStatusGetCommand_t; |
dflet | 0:e89ba455dbcf | 412 | |
dflet | 0:e89ba455dbcf | 413 | |
dflet | 0:e89ba455dbcf | 414 | typedef struct { |
dflet | 0:e89ba455dbcf | 415 | uint32_t group; |
dflet | 0:e89ba455dbcf | 416 | uint32_t status; |
dflet | 0:e89ba455dbcf | 417 | } _DevStatusGetResponse_t; |
dflet | 0:e89ba455dbcf | 418 | |
dflet | 0:e89ba455dbcf | 419 | typedef struct { |
dflet | 0:e89ba455dbcf | 420 | uint32_t ChipId; |
dflet | 0:e89ba455dbcf | 421 | uint32_t FwVersion[4]; |
dflet | 0:e89ba455dbcf | 422 | uint8_t PhyVersion[4]; |
dflet | 0:e89ba455dbcf | 423 | } _Device_VersionReadResponsePart_t; |
dflet | 0:e89ba455dbcf | 424 | |
dflet | 0:e89ba455dbcf | 425 | typedef struct { |
dflet | 0:e89ba455dbcf | 426 | _Device_VersionReadResponsePart_t part; |
dflet | 0:e89ba455dbcf | 427 | uint32_t NwpVersion[4]; |
dflet | 0:e89ba455dbcf | 428 | uint16_t RomVersion; |
dflet | 0:e89ba455dbcf | 429 | uint16_t Padding; |
dflet | 0:e89ba455dbcf | 430 | } _Device_VersionReadResponseFull_t; |
dflet | 0:e89ba455dbcf | 431 | |
dflet | 0:e89ba455dbcf | 432 | |
dflet | 0:e89ba455dbcf | 433 | typedef struct { |
dflet | 0:e89ba455dbcf | 434 | uint32_t BaudRate; |
dflet | 0:e89ba455dbcf | 435 | uint8_t FlowControlEnable; |
dflet | 0:e89ba455dbcf | 436 | } _DevUartSetModeCommand_t; |
dflet | 0:e89ba455dbcf | 437 | |
dflet | 0:e89ba455dbcf | 438 | typedef _BasicResponse_t _DevUartSetModeResponse_t; |
dflet | 0:e89ba455dbcf | 439 | |
dflet | 0:e89ba455dbcf | 440 | /******************************************************/ |
dflet | 0:e89ba455dbcf | 441 | |
dflet | 0:e89ba455dbcf | 442 | typedef struct { |
dflet | 0:e89ba455dbcf | 443 | uint8_t SsiSizeInBytes; |
dflet | 0:e89ba455dbcf | 444 | uint8_t Padding[3]; |
dflet | 0:e89ba455dbcf | 445 | } _StellarisSsiSizeSet_t; |
dflet | 0:e89ba455dbcf | 446 | |
dflet | 0:e89ba455dbcf | 447 | /*****************************************************************************************/ |
dflet | 0:e89ba455dbcf | 448 | /* WLAN structs */ |
dflet | 0:e89ba455dbcf | 449 | /*****************************************************************************************/ |
dflet | 0:e89ba455dbcf | 450 | #define MAXIMAL_PASSWORD_LENGTH (64) |
dflet | 0:e89ba455dbcf | 451 | |
dflet | 0:e89ba455dbcf | 452 | typedef struct { |
dflet | 0:e89ba455dbcf | 453 | uint8_t SecType; |
dflet | 0:e89ba455dbcf | 454 | uint8_t SsidLen; |
dflet | 0:e89ba455dbcf | 455 | uint8_t Bssid[6]; |
dflet | 0:e89ba455dbcf | 456 | uint8_t PasswordLen; |
dflet | 0:e89ba455dbcf | 457 | } _WlanConnectCommon_t; |
dflet | 0:e89ba455dbcf | 458 | |
dflet | 0:e89ba455dbcf | 459 | #define SSID_STRING(pCmd) (int8_t *)((_WlanConnectCommon_t *)(pCmd) + 1) |
dflet | 0:e89ba455dbcf | 460 | #define PASSWORD_STRING(pCmd) (SSID_STRING(pCmd) + ((_WlanConnectCommon_t *)(pCmd))->SsidLen) |
dflet | 0:e89ba455dbcf | 461 | |
dflet | 0:e89ba455dbcf | 462 | typedef struct { |
dflet | 0:e89ba455dbcf | 463 | _WlanConnectCommon_t Common; |
dflet | 0:e89ba455dbcf | 464 | uint8_t UserLen; |
dflet | 0:e89ba455dbcf | 465 | uint8_t AnonUserLen; |
dflet | 0:e89ba455dbcf | 466 | uint8_t CertIndex; |
dflet | 0:e89ba455dbcf | 467 | uint32_t EapBitmask; |
dflet | 0:e89ba455dbcf | 468 | } _WlanConnectEapCommand_t; |
dflet | 0:e89ba455dbcf | 469 | |
dflet | 0:e89ba455dbcf | 470 | #define EAP_SSID_STRING(pCmd) (int8_t *)((_WlanConnectEapCommand_t *)(pCmd) + 1) |
dflet | 0:e89ba455dbcf | 471 | #define EAP_PASSWORD_STRING(pCmd) (EAP_SSID_STRING(pCmd) + ((_WlanConnectEapCommand_t *)(pCmd))->Common.SsidLen) |
dflet | 0:e89ba455dbcf | 472 | #define EAP_USER_STRING(pCmd) (EAP_PASSWORD_STRING(pCmd) + ((_WlanConnectEapCommand_t *)(pCmd))->Common.PasswordLen) |
dflet | 0:e89ba455dbcf | 473 | #define EAP_ANON_USER_STRING(pCmd) (EAP_USER_STRING(pCmd) + ((_WlanConnectEapCommand_t *)(pCmd))->UserLen) |
dflet | 0:e89ba455dbcf | 474 | |
dflet | 0:e89ba455dbcf | 475 | |
dflet | 0:e89ba455dbcf | 476 | typedef struct { |
dflet | 0:e89ba455dbcf | 477 | uint8_t PolicyType; |
dflet | 0:e89ba455dbcf | 478 | uint8_t Padding; |
dflet | 0:e89ba455dbcf | 479 | uint8_t PolicyOption; |
dflet | 0:e89ba455dbcf | 480 | uint8_t PolicyOptionLen; |
dflet | 0:e89ba455dbcf | 481 | } _WlanPoliciySetGet_t; |
dflet | 0:e89ba455dbcf | 482 | |
dflet | 0:e89ba455dbcf | 483 | |
dflet | 0:e89ba455dbcf | 484 | typedef struct { |
dflet | 0:e89ba455dbcf | 485 | uint32_t minDwellTime; |
dflet | 0:e89ba455dbcf | 486 | uint32_t maxDwellTime; |
dflet | 0:e89ba455dbcf | 487 | uint32_t numProbeResponse; |
dflet | 0:e89ba455dbcf | 488 | uint32_t G_Channels_mask; |
dflet | 0:e89ba455dbcf | 489 | int32_t rssiThershold; |
dflet | 0:e89ba455dbcf | 490 | int32_t snrThershold; |
dflet | 0:e89ba455dbcf | 491 | int32_t defaultTXPower; |
dflet | 0:e89ba455dbcf | 492 | uint16_t intervalList[16]; |
dflet | 0:e89ba455dbcf | 493 | } _WlanScanParamSetCommand_t; |
dflet | 0:e89ba455dbcf | 494 | |
dflet | 0:e89ba455dbcf | 495 | |
dflet | 0:e89ba455dbcf | 496 | typedef struct { |
dflet | 0:e89ba455dbcf | 497 | int8_t SecType; |
dflet | 0:e89ba455dbcf | 498 | uint8_t SsidLen; |
dflet | 0:e89ba455dbcf | 499 | uint8_t Priority; |
dflet | 0:e89ba455dbcf | 500 | uint8_t Bssid[6]; |
dflet | 0:e89ba455dbcf | 501 | uint8_t PasswordLen; |
dflet | 0:e89ba455dbcf | 502 | uint8_t WepKeyId; |
dflet | 0:e89ba455dbcf | 503 | } _WlanAddGetProfile_t; |
dflet | 0:e89ba455dbcf | 504 | |
dflet | 0:e89ba455dbcf | 505 | |
dflet | 0:e89ba455dbcf | 506 | typedef struct { |
dflet | 0:e89ba455dbcf | 507 | _WlanAddGetProfile_t Common; |
dflet | 0:e89ba455dbcf | 508 | uint8_t UserLen; |
dflet | 0:e89ba455dbcf | 509 | uint8_t AnonUserLen; |
dflet | 0:e89ba455dbcf | 510 | uint8_t CertIndex; |
dflet | 0:e89ba455dbcf | 511 | uint16_t padding; |
dflet | 0:e89ba455dbcf | 512 | uint32_t EapBitmask; |
dflet | 0:e89ba455dbcf | 513 | } _WlanAddGetEapProfile_t; |
dflet | 0:e89ba455dbcf | 514 | |
dflet | 0:e89ba455dbcf | 515 | #define PROFILE_SSID_STRING(pCmd) ((int8_t *)((_WlanAddGetProfile_t *)(pCmd) + 1)) |
dflet | 0:e89ba455dbcf | 516 | #define PROFILE_PASSWORD_STRING(pCmd) (PROFILE_SSID_STRING(pCmd) + ((_WlanAddGetProfile_t *)(pCmd))->SsidLen) |
dflet | 0:e89ba455dbcf | 517 | |
dflet | 0:e89ba455dbcf | 518 | #define EAP_PROFILE_SSID_STRING(pCmd) (int8_t *)((_WlanAddGetEapProfile_t *)(pCmd) + 1) |
dflet | 0:e89ba455dbcf | 519 | #define EAP_PROFILE_PASSWORD_STRING(pCmd) (EAP_PROFILE_SSID_STRING(pCmd) + ((_WlanAddGetEapProfile_t *)(pCmd))->Common.SsidLen) |
dflet | 0:e89ba455dbcf | 520 | #define EAP_PROFILE_USER_STRING(pCmd) (EAP_PROFILE_PASSWORD_STRING(pCmd) + ((_WlanAddGetEapProfile_t *)(pCmd))->Common.PasswordLen) |
dflet | 0:e89ba455dbcf | 521 | #define EAP_PROFILE_ANON_USER_STRING(pCmd) (EAP_PROFILE_USER_STRING(pCmd) + ((_WlanAddGetEapProfile_t *)(pCmd))->UserLen) |
dflet | 0:e89ba455dbcf | 522 | |
dflet | 0:e89ba455dbcf | 523 | typedef struct { |
dflet | 0:e89ba455dbcf | 524 | uint8_t index; |
dflet | 0:e89ba455dbcf | 525 | uint8_t padding[3]; |
dflet | 0:e89ba455dbcf | 526 | } _WlanProfileDelGetCommand_t; |
dflet | 0:e89ba455dbcf | 527 | |
dflet | 0:e89ba455dbcf | 528 | typedef _BasicResponse_t _WlanGetNetworkListResponse_t; |
dflet | 0:e89ba455dbcf | 529 | |
dflet | 0:e89ba455dbcf | 530 | typedef struct { |
dflet | 0:e89ba455dbcf | 531 | uint8_t index; |
dflet | 0:e89ba455dbcf | 532 | uint8_t count; |
dflet | 0:e89ba455dbcf | 533 | int8_t padding[2]; |
dflet | 0:e89ba455dbcf | 534 | } _WlanGetNetworkListCommand_t; |
dflet | 0:e89ba455dbcf | 535 | |
dflet | 0:e89ba455dbcf | 536 | |
dflet | 0:e89ba455dbcf | 537 | |
dflet | 0:e89ba455dbcf | 538 | |
dflet | 0:e89ba455dbcf | 539 | typedef struct { |
dflet | 0:e89ba455dbcf | 540 | uint32_t groupIdBitmask; |
dflet | 0:e89ba455dbcf | 541 | uint8_t cipher; |
dflet | 0:e89ba455dbcf | 542 | uint8_t publicKeyLen; |
dflet | 0:e89ba455dbcf | 543 | uint8_t group1KeyLen; |
dflet | 0:e89ba455dbcf | 544 | uint8_t group2KeyLen; |
dflet | 0:e89ba455dbcf | 545 | } _WlanSmartConfigStartCommand_t; |
dflet | 0:e89ba455dbcf | 546 | |
dflet | 0:e89ba455dbcf | 547 | #define SMART_CONFIG_START_PUBLIC_KEY_STRING(pCmd) ((int8_t *)((_WlanSmartConfigStartCommand_t *)(pCmd) + 1)) |
dflet | 0:e89ba455dbcf | 548 | #define SMART_CONFIG_START_GROUP1_KEY_STRING(pCmd) ((int8_t *) (SMART_CONFIG_START_PUBLIC_KEY_STRING(pCmd) + ((_WlanSmartConfigStartCommand_t *)(pCmd))->publicKeyLen)) |
dflet | 0:e89ba455dbcf | 549 | #define SMART_CONFIG_START_GROUP2_KEY_STRING(pCmd) ((int8_t *) (SMART_CONFIG_START_GROUP1_KEY_STRING(pCmd) + ((_WlanSmartConfigStartCommand_t *)(pCmd))->group1KeyLen)) |
dflet | 0:e89ba455dbcf | 550 | |
dflet | 0:e89ba455dbcf | 551 | typedef struct { |
dflet | 0:e89ba455dbcf | 552 | uint8_t mode; |
dflet | 0:e89ba455dbcf | 553 | uint8_t padding[3]; |
dflet | 0:e89ba455dbcf | 554 | } _WlanSetMode_t; |
dflet | 0:e89ba455dbcf | 555 | |
dflet | 0:e89ba455dbcf | 556 | |
dflet | 0:e89ba455dbcf | 557 | |
dflet | 0:e89ba455dbcf | 558 | |
dflet | 0:e89ba455dbcf | 559 | typedef struct { |
dflet | 0:e89ba455dbcf | 560 | uint16_t Status; |
dflet | 0:e89ba455dbcf | 561 | uint16_t ConfigId; |
dflet | 0:e89ba455dbcf | 562 | uint16_t ConfigOpt; |
dflet | 0:e89ba455dbcf | 563 | uint16_t ConfigLen; |
dflet | 0:e89ba455dbcf | 564 | } _WlanCfgSetGet_t; |
dflet | 0:e89ba455dbcf | 565 | |
dflet | 0:e89ba455dbcf | 566 | |
dflet | 0:e89ba455dbcf | 567 | //wlan_rx_filters moved |
dflet | 0:e89ba455dbcf | 568 | |
dflet | 0:e89ba455dbcf | 569 | typedef struct { |
dflet | 0:e89ba455dbcf | 570 | uint16_t status; |
dflet | 0:e89ba455dbcf | 571 | uint8_t WlanRole; /* 0 = station, 2 = AP */ |
dflet | 0:e89ba455dbcf | 572 | uint8_t Ipv6Enabled; |
dflet | 0:e89ba455dbcf | 573 | uint8_t Ipv6DhcpEnabled; |
dflet | 0:e89ba455dbcf | 574 | |
dflet | 0:e89ba455dbcf | 575 | uint32_t ipV6Global[4]; |
dflet | 0:e89ba455dbcf | 576 | uint32_t ipV6Local[4]; |
dflet | 0:e89ba455dbcf | 577 | uint32_t ipV6DnsServer[4]; |
dflet | 0:e89ba455dbcf | 578 | uint8_t Ipv6DhcpState; |
dflet | 0:e89ba455dbcf | 579 | |
dflet | 0:e89ba455dbcf | 580 | } _NetappIpV6configRetArgs_t; |
dflet | 0:e89ba455dbcf | 581 | |
dflet | 0:e89ba455dbcf | 582 | |
dflet | 0:e89ba455dbcf | 583 | typedef struct { |
dflet | 0:e89ba455dbcf | 584 | uint8_t ipV4[4]; |
dflet | 0:e89ba455dbcf | 585 | uint8_t ipV4Mask[4]; |
dflet | 0:e89ba455dbcf | 586 | uint8_t ipV4Gateway[4]; |
dflet | 0:e89ba455dbcf | 587 | uint8_t ipV4DnsServer[4]; |
dflet | 0:e89ba455dbcf | 588 | uint8_t ipV4Start[4]; |
dflet | 0:e89ba455dbcf | 589 | uint8_t ipV4End[4]; |
dflet | 0:e89ba455dbcf | 590 | } _NetCfgIpV4AP_Args_t; |
dflet | 0:e89ba455dbcf | 591 | |
dflet | 0:e89ba455dbcf | 592 | |
dflet | 0:e89ba455dbcf | 593 | |
dflet | 0:e89ba455dbcf | 594 | typedef struct { |
dflet | 0:e89ba455dbcf | 595 | uint16_t status; |
dflet | 0:e89ba455dbcf | 596 | uint8_t MacAddr[6]; |
dflet | 0:e89ba455dbcf | 597 | } _MAC_Address_SetGet_t; |
dflet | 0:e89ba455dbcf | 598 | |
dflet | 0:e89ba455dbcf | 599 | |
dflet | 0:e89ba455dbcf | 600 | typedef struct { |
dflet | 0:e89ba455dbcf | 601 | uint16_t Status; |
dflet | 0:e89ba455dbcf | 602 | uint16_t ConfigId; |
dflet | 0:e89ba455dbcf | 603 | uint16_t ConfigOpt; |
dflet | 0:e89ba455dbcf | 604 | uint16_t ConfigLen; |
dflet | 0:e89ba455dbcf | 605 | } _NetCfgSetGet_t; |
dflet | 0:e89ba455dbcf | 606 | |
dflet | 0:e89ba455dbcf | 607 | typedef struct { |
dflet | 0:e89ba455dbcf | 608 | uint16_t Status; |
dflet | 0:e89ba455dbcf | 609 | uint16_t DeviceSetId; |
dflet | 0:e89ba455dbcf | 610 | uint16_t Option; |
dflet | 0:e89ba455dbcf | 611 | uint16_t ConfigLen; |
dflet | 0:e89ba455dbcf | 612 | } _DeviceSetGet_t; |
dflet | 0:e89ba455dbcf | 613 | |
dflet | 0:e89ba455dbcf | 614 | |
dflet | 0:e89ba455dbcf | 615 | |
dflet | 0:e89ba455dbcf | 616 | |
dflet | 0:e89ba455dbcf | 617 | /******************************************************************************************/ |
dflet | 0:e89ba455dbcf | 618 | /* Socket structs */ |
dflet | 0:e89ba455dbcf | 619 | /******************************************************************************************/ |
dflet | 0:e89ba455dbcf | 620 | |
dflet | 0:e89ba455dbcf | 621 | typedef struct { |
dflet | 0:e89ba455dbcf | 622 | uint8_t Domain; |
dflet | 0:e89ba455dbcf | 623 | uint8_t Type; |
dflet | 0:e89ba455dbcf | 624 | uint8_t Protocol; |
dflet | 0:e89ba455dbcf | 625 | uint8_t Padding; |
dflet | 0:e89ba455dbcf | 626 | } _SocketCommand_t; |
dflet | 0:e89ba455dbcf | 627 | |
dflet | 0:e89ba455dbcf | 628 | |
dflet | 0:e89ba455dbcf | 629 | typedef struct { |
dflet | 0:e89ba455dbcf | 630 | int16_t statusOrLen; |
dflet | 0:e89ba455dbcf | 631 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 632 | uint8_t padding; |
dflet | 0:e89ba455dbcf | 633 | } _SocketResponse_t; |
dflet | 0:e89ba455dbcf | 634 | |
dflet | 0:e89ba455dbcf | 635 | typedef struct { |
dflet | 0:e89ba455dbcf | 636 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 637 | uint8_t family; |
dflet | 0:e89ba455dbcf | 638 | uint8_t padding1; |
dflet | 0:e89ba455dbcf | 639 | uint8_t padding2; |
dflet | 0:e89ba455dbcf | 640 | } _AcceptCommand_t; |
dflet | 0:e89ba455dbcf | 641 | |
dflet | 0:e89ba455dbcf | 642 | |
dflet | 0:e89ba455dbcf | 643 | typedef struct { |
dflet | 0:e89ba455dbcf | 644 | int16_t statusOrLen; |
dflet | 0:e89ba455dbcf | 645 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 646 | uint8_t family; |
dflet | 0:e89ba455dbcf | 647 | uint16_t port; |
dflet | 0:e89ba455dbcf | 648 | uint16_t paddingOrAddr; |
dflet | 0:e89ba455dbcf | 649 | uint32_t address; |
dflet | 0:e89ba455dbcf | 650 | } _SocketAddrAsyncIPv4Response_t; |
dflet | 0:e89ba455dbcf | 651 | |
dflet | 0:e89ba455dbcf | 652 | typedef struct { |
dflet | 0:e89ba455dbcf | 653 | int16_t statusOrLen; |
dflet | 0:e89ba455dbcf | 654 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 655 | uint8_t family; |
dflet | 0:e89ba455dbcf | 656 | uint16_t port; |
dflet | 0:e89ba455dbcf | 657 | uint8_t address[6]; |
dflet | 0:e89ba455dbcf | 658 | } _SocketAddrAsyncIPv6EUI48Response_t; |
dflet | 0:e89ba455dbcf | 659 | typedef struct { |
dflet | 0:e89ba455dbcf | 660 | int16_t statusOrLen; |
dflet | 0:e89ba455dbcf | 661 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 662 | uint8_t family; |
dflet | 0:e89ba455dbcf | 663 | uint16_t port; |
dflet | 0:e89ba455dbcf | 664 | uint16_t paddingOrAddr; |
dflet | 0:e89ba455dbcf | 665 | uint32_t address[4]; |
dflet | 0:e89ba455dbcf | 666 | } _SocketAddrAsyncIPv6Response_t; |
dflet | 0:e89ba455dbcf | 667 | |
dflet | 0:e89ba455dbcf | 668 | |
dflet | 0:e89ba455dbcf | 669 | typedef struct { |
dflet | 0:e89ba455dbcf | 670 | int16_t lenOrPadding; |
dflet | 0:e89ba455dbcf | 671 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 672 | uint8_t FamilyAndFlags; |
dflet | 0:e89ba455dbcf | 673 | uint16_t port; |
dflet | 0:e89ba455dbcf | 674 | uint16_t paddingOrAddr; |
dflet | 0:e89ba455dbcf | 675 | uint32_t address; |
dflet | 0:e89ba455dbcf | 676 | } _SocketAddrIPv4Command_t; |
dflet | 0:e89ba455dbcf | 677 | |
dflet | 0:e89ba455dbcf | 678 | typedef struct { |
dflet | 0:e89ba455dbcf | 679 | int16_t lenOrPadding; |
dflet | 0:e89ba455dbcf | 680 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 681 | uint8_t FamilyAndFlags; |
dflet | 0:e89ba455dbcf | 682 | uint16_t port; |
dflet | 0:e89ba455dbcf | 683 | uint8_t address[6]; |
dflet | 0:e89ba455dbcf | 684 | } _SocketAddrIPv6EUI48Command_t; |
dflet | 0:e89ba455dbcf | 685 | typedef struct { |
dflet | 0:e89ba455dbcf | 686 | int16_t lenOrPadding; |
dflet | 0:e89ba455dbcf | 687 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 688 | uint8_t FamilyAndFlags; |
dflet | 0:e89ba455dbcf | 689 | uint16_t port; |
dflet | 0:e89ba455dbcf | 690 | uint16_t paddingOrAddr; |
dflet | 0:e89ba455dbcf | 691 | uint32_t address[4]; |
dflet | 0:e89ba455dbcf | 692 | } _SocketAddrIPv6Command_t; |
dflet | 0:e89ba455dbcf | 693 | |
dflet | 0:e89ba455dbcf | 694 | typedef union { |
dflet | 0:e89ba455dbcf | 695 | _SocketAddrIPv4Command_t IpV4; |
dflet | 0:e89ba455dbcf | 696 | _SocketAddrIPv6EUI48Command_t IpV6EUI48; |
dflet | 0:e89ba455dbcf | 697 | #ifdef SL_SUPPORT_IPV6 |
dflet | 0:e89ba455dbcf | 698 | _SocketAddrIPv6Command_t IpV6; |
dflet | 0:e89ba455dbcf | 699 | #endif |
dflet | 0:e89ba455dbcf | 700 | } _SocketAddrCommand_u; |
dflet | 0:e89ba455dbcf | 701 | |
dflet | 0:e89ba455dbcf | 702 | typedef union { |
dflet | 0:e89ba455dbcf | 703 | _SocketAddrAsyncIPv4Response_t IpV4; |
dflet | 0:e89ba455dbcf | 704 | _SocketAddrAsyncIPv6EUI48Response_t IpV6EUI48; |
dflet | 0:e89ba455dbcf | 705 | #ifdef SL_SUPPORT_IPV6 |
dflet | 0:e89ba455dbcf | 706 | _SocketAddrAsyncIPv6Response_t IpV6; |
dflet | 0:e89ba455dbcf | 707 | #endif |
dflet | 0:e89ba455dbcf | 708 | } _SocketAddrResponse_u; |
dflet | 0:e89ba455dbcf | 709 | |
dflet | 0:e89ba455dbcf | 710 | typedef struct { |
dflet | 0:e89ba455dbcf | 711 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 712 | uint8_t backlog; |
dflet | 0:e89ba455dbcf | 713 | uint8_t padding1; |
dflet | 0:e89ba455dbcf | 714 | uint8_t padding2; |
dflet | 0:e89ba455dbcf | 715 | } _ListenCommand_t; |
dflet | 0:e89ba455dbcf | 716 | |
dflet | 0:e89ba455dbcf | 717 | typedef struct { |
dflet | 0:e89ba455dbcf | 718 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 719 | uint8_t padding0; |
dflet | 0:e89ba455dbcf | 720 | uint8_t padding1; |
dflet | 0:e89ba455dbcf | 721 | uint8_t padding2; |
dflet | 0:e89ba455dbcf | 722 | } _CloseCommand_t; |
dflet | 0:e89ba455dbcf | 723 | |
dflet | 0:e89ba455dbcf | 724 | |
dflet | 0:e89ba455dbcf | 725 | typedef struct { |
dflet | 0:e89ba455dbcf | 726 | uint8_t nfds; |
dflet | 0:e89ba455dbcf | 727 | uint8_t readFdsCount; |
dflet | 0:e89ba455dbcf | 728 | uint8_t writeFdsCount; |
dflet | 0:e89ba455dbcf | 729 | uint8_t padding; |
dflet | 0:e89ba455dbcf | 730 | uint16_t readFds; |
dflet | 0:e89ba455dbcf | 731 | uint16_t writeFds; |
dflet | 0:e89ba455dbcf | 732 | uint16_t tv_usec; |
dflet | 0:e89ba455dbcf | 733 | uint16_t tv_sec; |
dflet | 0:e89ba455dbcf | 734 | } _SelectCommand_t; |
dflet | 0:e89ba455dbcf | 735 | |
dflet | 0:e89ba455dbcf | 736 | |
dflet | 0:e89ba455dbcf | 737 | typedef struct { |
dflet | 0:e89ba455dbcf | 738 | uint16_t status; |
dflet | 0:e89ba455dbcf | 739 | uint8_t readFdsCount; |
dflet | 0:e89ba455dbcf | 740 | uint8_t writeFdsCount; |
dflet | 0:e89ba455dbcf | 741 | uint16_t readFds; |
dflet | 0:e89ba455dbcf | 742 | uint16_t writeFds; |
dflet | 0:e89ba455dbcf | 743 | } _SelectAsyncResponse_t; |
dflet | 0:e89ba455dbcf | 744 | |
dflet | 0:e89ba455dbcf | 745 | typedef struct { |
dflet | 0:e89ba455dbcf | 746 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 747 | uint8_t level; |
dflet | 0:e89ba455dbcf | 748 | uint8_t optionName; |
dflet | 0:e89ba455dbcf | 749 | uint8_t optionLen; |
dflet | 0:e89ba455dbcf | 750 | } _setSockOptCommand_t; |
dflet | 0:e89ba455dbcf | 751 | |
dflet | 0:e89ba455dbcf | 752 | typedef struct { |
dflet | 0:e89ba455dbcf | 753 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 754 | uint8_t level; |
dflet | 0:e89ba455dbcf | 755 | uint8_t optionName; |
dflet | 0:e89ba455dbcf | 756 | uint8_t optionLen; |
dflet | 0:e89ba455dbcf | 757 | } _getSockOptCommand_t; |
dflet | 0:e89ba455dbcf | 758 | |
dflet | 0:e89ba455dbcf | 759 | typedef struct { |
dflet | 0:e89ba455dbcf | 760 | int16_t status; |
dflet | 0:e89ba455dbcf | 761 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 762 | uint8_t optionLen; |
dflet | 0:e89ba455dbcf | 763 | } _getSockOptResponse_t; |
dflet | 0:e89ba455dbcf | 764 | |
dflet | 0:e89ba455dbcf | 765 | |
dflet | 0:e89ba455dbcf | 766 | typedef struct { |
dflet | 0:e89ba455dbcf | 767 | uint16_t StatusOrLen; |
dflet | 0:e89ba455dbcf | 768 | uint8_t sd; |
dflet | 0:e89ba455dbcf | 769 | uint8_t FamilyAndFlags; |
dflet | 0:e89ba455dbcf | 770 | } _sendRecvCommand_t; |
dflet | 0:e89ba455dbcf | 771 | |
dflet | 0:e89ba455dbcf | 772 | //netapp structs moved |
dflet | 0:e89ba455dbcf | 773 | |
dflet | 0:e89ba455dbcf | 774 | /***************************************************************************************** |
dflet | 0:e89ba455dbcf | 775 | * FS structs |
dflet | 0:e89ba455dbcf | 776 | ******************************************************************************************/ |
dflet | 0:e89ba455dbcf | 777 | |
dflet | 0:e89ba455dbcf | 778 | typedef struct { |
dflet | 0:e89ba455dbcf | 779 | uint32_t FileHandle; |
dflet | 0:e89ba455dbcf | 780 | uint32_t Offset; |
dflet | 0:e89ba455dbcf | 781 | uint16_t Len; |
dflet | 0:e89ba455dbcf | 782 | uint16_t Padding; |
dflet | 0:e89ba455dbcf | 783 | } _FsReadCommand_t; |
dflet | 0:e89ba455dbcf | 784 | |
dflet | 0:e89ba455dbcf | 785 | typedef struct { |
dflet | 0:e89ba455dbcf | 786 | uint32_t Mode; |
dflet | 0:e89ba455dbcf | 787 | uint32_t Token; |
dflet | 0:e89ba455dbcf | 788 | } _FsOpenCommand_t; |
dflet | 0:e89ba455dbcf | 789 | |
dflet | 0:e89ba455dbcf | 790 | typedef struct { |
dflet | 0:e89ba455dbcf | 791 | uint32_t FileHandle; |
dflet | 0:e89ba455dbcf | 792 | uint32_t Token; |
dflet | 0:e89ba455dbcf | 793 | } _FsOpenResponse_t; |
dflet | 0:e89ba455dbcf | 794 | |
dflet | 0:e89ba455dbcf | 795 | |
dflet | 0:e89ba455dbcf | 796 | typedef struct { |
dflet | 0:e89ba455dbcf | 797 | uint32_t FileHandle; |
dflet | 0:e89ba455dbcf | 798 | uint32_t CertificFileNameLength; |
dflet | 0:e89ba455dbcf | 799 | uint32_t SignatureLen; |
dflet | 0:e89ba455dbcf | 800 | } _FsCloseCommand_t; |
dflet | 0:e89ba455dbcf | 801 | |
dflet | 0:e89ba455dbcf | 802 | |
dflet | 0:e89ba455dbcf | 803 | typedef _BasicResponse_t _FsReadResponse_t; |
dflet | 0:e89ba455dbcf | 804 | typedef _BasicResponse_t _FsDeleteResponse_t; |
dflet | 0:e89ba455dbcf | 805 | typedef _BasicResponse_t _FsCloseResponse_t; |
dflet | 0:e89ba455dbcf | 806 | |
dflet | 0:e89ba455dbcf | 807 | typedef struct { |
dflet | 0:e89ba455dbcf | 808 | uint16_t Status; |
dflet | 0:e89ba455dbcf | 809 | uint16_t flags; |
dflet | 0:e89ba455dbcf | 810 | uint32_t FileLen; |
dflet | 0:e89ba455dbcf | 811 | uint32_t AllocatedLen; |
dflet | 0:e89ba455dbcf | 812 | uint32_t Token[4]; |
dflet | 0:e89ba455dbcf | 813 | } _FsGetInfoResponse_t; |
dflet | 0:e89ba455dbcf | 814 | |
dflet | 0:e89ba455dbcf | 815 | typedef struct { |
dflet | 0:e89ba455dbcf | 816 | uint8_t DeviceID; |
dflet | 0:e89ba455dbcf | 817 | uint8_t Padding[3]; |
dflet | 0:e89ba455dbcf | 818 | } _FsFormatCommand_t; |
dflet | 0:e89ba455dbcf | 819 | |
dflet | 0:e89ba455dbcf | 820 | typedef _BasicResponse_t _FsFormatResponse_t; |
dflet | 0:e89ba455dbcf | 821 | |
dflet | 0:e89ba455dbcf | 822 | typedef struct { |
dflet | 0:e89ba455dbcf | 823 | uint32_t Token; |
dflet | 0:e89ba455dbcf | 824 | } _FsDeleteCommand_t; |
dflet | 0:e89ba455dbcf | 825 | |
dflet | 0:e89ba455dbcf | 826 | typedef _FsDeleteCommand_t _FsGetInfoCommand_t; |
dflet | 0:e89ba455dbcf | 827 | |
dflet | 0:e89ba455dbcf | 828 | typedef struct { |
dflet | 0:e89ba455dbcf | 829 | uint32_t FileHandle; |
dflet | 0:e89ba455dbcf | 830 | uint32_t Offset; |
dflet | 0:e89ba455dbcf | 831 | uint16_t Len; |
dflet | 0:e89ba455dbcf | 832 | uint16_t Padding; |
dflet | 0:e89ba455dbcf | 833 | } _FsWriteCommand_t; |
dflet | 0:e89ba455dbcf | 834 | |
dflet | 0:e89ba455dbcf | 835 | typedef _BasicResponse_t _FsWriteResponse_t; |
dflet | 0:e89ba455dbcf | 836 | |
dflet | 0:e89ba455dbcf | 837 | |
dflet | 0:e89ba455dbcf | 838 | /* Set Max Async Payload length depending on flavor (Tiny, Small, etc.) */ |
dflet | 0:e89ba455dbcf | 839 | #define SL_ASYNC_MAX_PAYLOAD_LEN 160 /* size must be aligned to 4 */ |
dflet | 0:e89ba455dbcf | 840 | #define SL_ASYNC_MAX_MSG_LEN (_SL_RESP_HDR_SIZE + SL_ASYNC_MAX_PAYLOAD_LEN) |
dflet | 0:e89ba455dbcf | 841 | |
dflet | 0:e89ba455dbcf | 842 | #define RECV_ARGS_SIZE (sizeof(_SocketResponse_t)) |
dflet | 0:e89ba455dbcf | 843 | #define RECVFROM_IPV4_ARGS_SIZE (sizeof(_SocketAddrAsyncIPv4Response_t)) |
dflet | 0:e89ba455dbcf | 844 | #define RECVFROM_IPV6_ARGS_SIZE (sizeof(_SocketAddrAsyncIPv6Response_t)) |
dflet | 0:e89ba455dbcf | 845 | |
dflet | 0:e89ba455dbcf | 846 | #define SL_IPV4_ADDRESS_SIZE (sizeof(uint32_t)) |
dflet | 0:e89ba455dbcf | 847 | #define SL_IPV6_ADDRESS_SIZE (4 * sizeof(uint32_t)) |
dflet | 0:e89ba455dbcf | 848 | |
dflet | 0:e89ba455dbcf | 849 | }//namespace mbed_cc3100 |
dflet | 0:e89ba455dbcf | 850 | |
dflet | 0:e89ba455dbcf | 851 | #endif /* _SL_PROTOCOL_TYPES_H_ */ |
dflet | 0:e89ba455dbcf | 852 |