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