version_2.0

Dependents:   cc3000_ping_demo_try_2

Fork of cc3000_hostdriver_mbedsocket by Martin Kojtal

Committer:
Kojto
Date:
Thu Oct 03 17:15:45 2013 +0200
Revision:
20:30b6ed7bf8fd
Parent:
0:615c697c33b0
UNIX line endings

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 20:30b6ed7bf8fd 1 /*****************************************************************************
Kojto 20:30b6ed7bf8fd 2 *
Kojto 20:30b6ed7bf8fd 3 * C++ interface/implementation created by Martin Kojtal (0xc0170). Thanks to
Kojto 20:30b6ed7bf8fd 4 * Jim Carver and Frank Vannieuwkerke for their inital cc3000 mbed port and
Kojto 20:30b6ed7bf8fd 5 * provided help.
Kojto 20:30b6ed7bf8fd 6 *
Kojto 20:30b6ed7bf8fd 7 * This version of "host driver" uses CC3000 Host Driver Implementation. Thus
Kojto 20:30b6ed7bf8fd 8 * read the following copyright:
Kojto 20:30b6ed7bf8fd 9 *
Kojto 20:30b6ed7bf8fd 10 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
Kojto 20:30b6ed7bf8fd 11 *
Kojto 20:30b6ed7bf8fd 12 * Redistribution and use in source and binary forms, with or without
Kojto 20:30b6ed7bf8fd 13 * modification, are permitted provided that the following conditions
Kojto 20:30b6ed7bf8fd 14 * are met:
Kojto 20:30b6ed7bf8fd 15 *
Kojto 20:30b6ed7bf8fd 16 * Redistributions of source code must retain the above copyright
Kojto 20:30b6ed7bf8fd 17 * notice, this list of conditions and the following disclaimer.
Kojto 20:30b6ed7bf8fd 18 *
Kojto 20:30b6ed7bf8fd 19 * Redistributions in binary form must reproduce the above copyright
Kojto 20:30b6ed7bf8fd 20 * notice, this list of conditions and the following disclaimer in the
Kojto 20:30b6ed7bf8fd 21 * documentation and/or other materials provided with the
Kojto 20:30b6ed7bf8fd 22 * distribution.
Kojto 20:30b6ed7bf8fd 23 *
Kojto 20:30b6ed7bf8fd 24 * Neither the name of Texas Instruments Incorporated nor the names of
Kojto 20:30b6ed7bf8fd 25 * its contributors may be used to endorse or promote products derived
Kojto 20:30b6ed7bf8fd 26 * from this software without specific prior written permission.
Kojto 20:30b6ed7bf8fd 27 *
Kojto 20:30b6ed7bf8fd 28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Kojto 20:30b6ed7bf8fd 29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Kojto 20:30b6ed7bf8fd 30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Kojto 20:30b6ed7bf8fd 31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Kojto 20:30b6ed7bf8fd 32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Kojto 20:30b6ed7bf8fd 33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Kojto 20:30b6ed7bf8fd 34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Kojto 20:30b6ed7bf8fd 35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Kojto 20:30b6ed7bf8fd 36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Kojto 20:30b6ed7bf8fd 37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 20:30b6ed7bf8fd 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 20:30b6ed7bf8fd 39 *
Kojto 20:30b6ed7bf8fd 40 *****************************************************************************/
Kojto 20:30b6ed7bf8fd 41 #ifndef CC3000_SPI_H
Kojto 20:30b6ed7bf8fd 42 #define CC3000_SPI_H
Kojto 20:30b6ed7bf8fd 43
Kojto 20:30b6ed7bf8fd 44 typedef struct
Kojto 20:30b6ed7bf8fd 45 {
Kojto 20:30b6ed7bf8fd 46 uint16_t tx_packet_length;
Kojto 20:30b6ed7bf8fd 47 uint16_t rx_packet_length;
Kojto 20:30b6ed7bf8fd 48 uint32_t spi_state;
Kojto 20:30b6ed7bf8fd 49 } tSpiInfo;
Kojto 20:30b6ed7bf8fd 50
Kojto 20:30b6ed7bf8fd 51
Kojto 20:30b6ed7bf8fd 52 /* ===========================================================================================
Kojto 20:30b6ed7bf8fd 53 SPI
Kojto 20:30b6ed7bf8fd 54 =========================================================================================== */
Kojto 20:30b6ed7bf8fd 55 #define READ 3
Kojto 20:30b6ed7bf8fd 56 #define WRITE 1
Kojto 20:30b6ed7bf8fd 57
Kojto 20:30b6ed7bf8fd 58 #define HI(value) (((value) & 0xFF00) >> 8)
Kojto 20:30b6ed7bf8fd 59 #define LO(value) ((value) & 0x00FF)
Kojto 20:30b6ed7bf8fd 60
Kojto 20:30b6ed7bf8fd 61 #define HEADERS_SIZE_EVNT (SPI_HEADER_SIZE + 5)
Kojto 20:30b6ed7bf8fd 62
Kojto 20:30b6ed7bf8fd 63 #define SPI_HEADER_SIZE (5)
Kojto 20:30b6ed7bf8fd 64
Kojto 20:30b6ed7bf8fd 65 #define eSPI_STATE_POWERUP (0)
Kojto 20:30b6ed7bf8fd 66 #define eSPI_STATE_INITIALIZED (1)
Kojto 20:30b6ed7bf8fd 67 #define eSPI_STATE_IDLE (2)
Kojto 20:30b6ed7bf8fd 68 #define eSPI_STATE_WRITE_IRQ (3)
Kojto 20:30b6ed7bf8fd 69 #define eSPI_STATE_WRITE_FIRST_PORTION (4)
Kojto 20:30b6ed7bf8fd 70 #define eSPI_STATE_WRITE_EOT (5)
Kojto 20:30b6ed7bf8fd 71 #define eSPI_STATE_READ_IRQ (6)
Kojto 20:30b6ed7bf8fd 72 #define eSPI_STATE_READ_FIRST_PORTION (7)
Kojto 20:30b6ed7bf8fd 73 #define eSPI_STATE_READ_EOT (8)
Kojto 20:30b6ed7bf8fd 74
Kojto 20:30b6ed7bf8fd 75 // The magic number that resides at the end of the TX/RX buffer (1 byte after the allocated size)
Kojto 20:30b6ed7bf8fd 76 // for the purpose of detection of the overrun. The location of the memory where the magic number
Kojto 20:30b6ed7bf8fd 77 // resides shall never be written. In case it is written - overrun occured and either recevie function
Kojto 20:30b6ed7bf8fd 78 // or send function will be stuck forever.
Kojto 20:30b6ed7bf8fd 79 #define CC3000_BUFFER_MAGIC_NUMBER (0xDE)
Kojto 20:30b6ed7bf8fd 80
Kojto 20:30b6ed7bf8fd 81 /* ===========================================================================================
Kojto 20:30b6ed7bf8fd 82 HCI
Kojto 20:30b6ed7bf8fd 83 =========================================================================================== */
Kojto 20:30b6ed7bf8fd 84
Kojto 20:30b6ed7bf8fd 85 #define SL_PATCH_PORTION_SIZE (1000)
Kojto 20:30b6ed7bf8fd 86
Kojto 20:30b6ed7bf8fd 87 #define SPI_HEADER_SIZE (5)
Kojto 20:30b6ed7bf8fd 88 #define SIMPLE_LINK_HCI_CMND_HEADER_SIZE (4)
Kojto 20:30b6ed7bf8fd 89 #define HEADERS_SIZE_CMD (SPI_HEADER_SIZE + SIMPLE_LINK_HCI_CMND_HEADER_SIZE)
Kojto 20:30b6ed7bf8fd 90 #define SIMPLE_LINK_HCI_DATA_CMND_HEADER_SIZE (5)
Kojto 20:30b6ed7bf8fd 91 #define SIMPLE_LINK_HCI_DATA_HEADER_SIZE (5)
Kojto 20:30b6ed7bf8fd 92 #define SIMPLE_LINK_HCI_PATCH_HEADER_SIZE (2)
Kojto 20:30b6ed7bf8fd 93
Kojto 20:30b6ed7bf8fd 94 // Values that can be used as HCI Commands and HCI Packet header defines
Kojto 20:30b6ed7bf8fd 95 #define HCI_TYPE_CMND 0x1
Kojto 20:30b6ed7bf8fd 96 #define HCI_TYPE_DATA 0x2
Kojto 20:30b6ed7bf8fd 97 #define HCI_TYPE_PATCH 0x3
Kojto 20:30b6ed7bf8fd 98 #define HCI_TYPE_EVNT 0x4
Kojto 20:30b6ed7bf8fd 99
Kojto 20:30b6ed7bf8fd 100
Kojto 20:30b6ed7bf8fd 101 #define HCI_EVENT_PATCHES_DRV_REQ (1)
Kojto 20:30b6ed7bf8fd 102 #define HCI_EVENT_PATCHES_FW_REQ (2)
Kojto 20:30b6ed7bf8fd 103 #define HCI_EVENT_PATCHES_BOOTLOAD_REQ (3)
Kojto 20:30b6ed7bf8fd 104
Kojto 20:30b6ed7bf8fd 105
Kojto 20:30b6ed7bf8fd 106 #define HCI_CMND_WLAN_BASE (0x0000)
Kojto 20:30b6ed7bf8fd 107 #define HCI_CMND_WLAN_CONNECT 0x0001
Kojto 20:30b6ed7bf8fd 108 #define HCI_CMND_WLAN_DISCONNECT 0x0002
Kojto 20:30b6ed7bf8fd 109 #define HCI_CMND_WLAN_IOCTL_SET_SCANPARAM 0x0003
Kojto 20:30b6ed7bf8fd 110 #define HCI_CMND_WLAN_IOCTL_SET_CONNECTION_POLICY 0x0004
Kojto 20:30b6ed7bf8fd 111 #define HCI_CMND_WLAN_IOCTL_ADD_PROFILE 0x0005
Kojto 20:30b6ed7bf8fd 112 #define HCI_CMND_WLAN_IOCTL_DEL_PROFILE 0x0006
Kojto 20:30b6ed7bf8fd 113 #define HCI_CMND_WLAN_IOCTL_GET_SCAN_RESULTS 0x0007
Kojto 20:30b6ed7bf8fd 114 #define HCI_CMND_EVENT_MASK 0x0008
Kojto 20:30b6ed7bf8fd 115 #define HCI_CMND_WLAN_IOCTL_STATUSGET 0x0009
Kojto 20:30b6ed7bf8fd 116 #define HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_START 0x000A
Kojto 20:30b6ed7bf8fd 117 #define HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_STOP 0x000B
Kojto 20:30b6ed7bf8fd 118 #define HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_SET_PREFIX 0x000C
Kojto 20:30b6ed7bf8fd 119 #define HCI_CMND_WLAN_CONFIGURE_PATCH 0x000D
Kojto 20:30b6ed7bf8fd 120
Kojto 20:30b6ed7bf8fd 121
Kojto 20:30b6ed7bf8fd 122 #define HCI_CMND_SOCKET_BASE 0x1000
Kojto 20:30b6ed7bf8fd 123 #define HCI_CMND_SOCKET 0x1001
Kojto 20:30b6ed7bf8fd 124 #define HCI_CMND_BIND 0x1002
Kojto 20:30b6ed7bf8fd 125 #define HCI_CMND_RECV 0x1004
Kojto 20:30b6ed7bf8fd 126 #define HCI_CMND_ACCEPT 0x1005
Kojto 20:30b6ed7bf8fd 127 #define HCI_CMND_LISTEN 0x1006
Kojto 20:30b6ed7bf8fd 128 #define HCI_CMND_CONNECT 0x1007
Kojto 20:30b6ed7bf8fd 129 #define HCI_CMND_BSD_SELECT 0x1008
Kojto 20:30b6ed7bf8fd 130 #define HCI_CMND_SETSOCKOPT 0x1009
Kojto 20:30b6ed7bf8fd 131 #define HCI_CMND_GETSOCKOPT 0x100A
Kojto 20:30b6ed7bf8fd 132 #define HCI_CMND_CLOSE_SOCKET 0x100B
Kojto 20:30b6ed7bf8fd 133 #define HCI_CMND_RECVFROM 0x100D
Kojto 20:30b6ed7bf8fd 134 #define HCI_CMND_GETHOSTNAME 0x1010
Kojto 20:30b6ed7bf8fd 135 #define HCI_CMND_MDNS_ADVERTISE 0x1011
Kojto 20:30b6ed7bf8fd 136
Kojto 20:30b6ed7bf8fd 137
Kojto 20:30b6ed7bf8fd 138 #define HCI_DATA_BASE 0x80
Kojto 20:30b6ed7bf8fd 139
Kojto 20:30b6ed7bf8fd 140 #define HCI_CMND_SEND (0x01 + HCI_DATA_BASE)
Kojto 20:30b6ed7bf8fd 141 #define HCI_CMND_SENDTO (0x03 + HCI_DATA_BASE)
Kojto 20:30b6ed7bf8fd 142 #define HCI_DATA_BSD_RECVFROM (0x04 + HCI_DATA_BASE)
Kojto 20:30b6ed7bf8fd 143 #define HCI_DATA_BSD_RECV (0x05 + HCI_DATA_BASE)
Kojto 20:30b6ed7bf8fd 144
Kojto 20:30b6ed7bf8fd 145
Kojto 20:30b6ed7bf8fd 146 #define HCI_CMND_NVMEM_CBASE (0x0200)
Kojto 20:30b6ed7bf8fd 147
Kojto 20:30b6ed7bf8fd 148
Kojto 20:30b6ed7bf8fd 149 #define HCI_CMND_NVMEM_CREATE_ENTRY (0x0203)
Kojto 20:30b6ed7bf8fd 150 #define HCI_CMND_NVMEM_SWAP_ENTRY (0x0205)
Kojto 20:30b6ed7bf8fd 151 #define HCI_CMND_NVMEM_READ (0x0201)
Kojto 20:30b6ed7bf8fd 152 #define HCI_CMND_NVMEM_WRITE (0x0090)
Kojto 20:30b6ed7bf8fd 153 #define HCI_CMND_NVMEM_WRITE_PATCH (0x0204)
Kojto 20:30b6ed7bf8fd 154 #define HCI_CMND_READ_SP_VERSION (0x0207)
Kojto 20:30b6ed7bf8fd 155
Kojto 20:30b6ed7bf8fd 156 #define HCI_CMND_READ_BUFFER_SIZE 0x400B
Kojto 20:30b6ed7bf8fd 157 #define HCI_CMND_SIMPLE_LINK_START 0x4000
Kojto 20:30b6ed7bf8fd 158
Kojto 20:30b6ed7bf8fd 159 #define HCI_CMND_NETAPP_BASE 0x2000
Kojto 20:30b6ed7bf8fd 160
Kojto 20:30b6ed7bf8fd 161 #define HCI_NETAPP_DHCP (0x0001 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 162 #define HCI_NETAPP_PING_SEND (0x0002 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 163 #define HCI_NETAPP_PING_REPORT (0x0003 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 164 #define HCI_NETAPP_PING_STOP (0x0004 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 165 #define HCI_NETAPP_IPCONFIG (0x0005 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 166 #define HCI_NETAPP_ARP_FLUSH (0x0006 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 167 #define HCI_NETAPP_SET_DEBUG_LEVEL (0x0008 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 168 #define HCI_NETAPP_SET_TIMERS (0x0009 + HCI_CMND_NETAPP_BASE)
Kojto 20:30b6ed7bf8fd 169
Kojto 20:30b6ed7bf8fd 170 // Values that can be used as HCI Events defines
Kojto 20:30b6ed7bf8fd 171 #define HCI_EVNT_WLAN_BASE 0x0000
Kojto 20:30b6ed7bf8fd 172 #define HCI_EVNT_WLAN_CONNECT 0x0001
Kojto 20:30b6ed7bf8fd 173 #define HCI_EVNT_WLAN_DISCONNECT \
Kojto 20:30b6ed7bf8fd 174 0x0002
Kojto 20:30b6ed7bf8fd 175 #define HCI_EVNT_WLAN_IOCTL_ADD_PROFILE \
Kojto 20:30b6ed7bf8fd 176 0x0005
Kojto 20:30b6ed7bf8fd 177
Kojto 20:30b6ed7bf8fd 178
Kojto 20:30b6ed7bf8fd 179 #define HCI_EVNT_SOCKET HCI_CMND_SOCKET
Kojto 20:30b6ed7bf8fd 180 #define HCI_EVNT_BIND HCI_CMND_BIND
Kojto 20:30b6ed7bf8fd 181 #define HCI_EVNT_RECV HCI_CMND_RECV
Kojto 20:30b6ed7bf8fd 182 #define HCI_EVNT_ACCEPT HCI_CMND_ACCEPT
Kojto 20:30b6ed7bf8fd 183 #define HCI_EVNT_LISTEN HCI_CMND_LISTEN
Kojto 20:30b6ed7bf8fd 184 #define HCI_EVNT_CONNECT HCI_CMND_CONNECT
Kojto 20:30b6ed7bf8fd 185 #define HCI_EVNT_SELECT HCI_CMND_BSD_SELECT
Kojto 20:30b6ed7bf8fd 186 #define HCI_EVNT_CLOSE_SOCKET HCI_CMND_CLOSE_SOCKET
Kojto 20:30b6ed7bf8fd 187 #define HCI_EVNT_RECVFROM HCI_CMND_RECVFROM
Kojto 20:30b6ed7bf8fd 188 #define HCI_EVNT_SETSOCKOPT HCI_CMND_SETSOCKOPT
Kojto 20:30b6ed7bf8fd 189 #define HCI_EVNT_GETSOCKOPT HCI_CMND_GETSOCKOPT
Kojto 20:30b6ed7bf8fd 190 #define HCI_EVNT_BSD_GETHOSTBYNAME HCI_CMND_GETHOSTNAME
Kojto 20:30b6ed7bf8fd 191 #define HCI_EVNT_MDNS_ADVERTISE HCI_CMND_MDNS_ADVERTISE
Kojto 20:30b6ed7bf8fd 192
Kojto 20:30b6ed7bf8fd 193 #define HCI_EVNT_SEND 0x1003
Kojto 20:30b6ed7bf8fd 194 #define HCI_EVNT_WRITE 0x100E
Kojto 20:30b6ed7bf8fd 195 #define HCI_EVNT_SENDTO 0x100F
Kojto 20:30b6ed7bf8fd 196
Kojto 20:30b6ed7bf8fd 197 #define HCI_EVNT_PATCHES_REQ 0x1000
Kojto 20:30b6ed7bf8fd 198
Kojto 20:30b6ed7bf8fd 199 #define HCI_EVNT_UNSOL_BASE 0x4000
Kojto 20:30b6ed7bf8fd 200
Kojto 20:30b6ed7bf8fd 201 #define HCI_EVNT_WLAN_UNSOL_BASE (0x8000)
Kojto 20:30b6ed7bf8fd 202
Kojto 20:30b6ed7bf8fd 203 #define HCI_EVNT_WLAN_UNSOL_CONNECT (0x0001 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 204 #define HCI_EVNT_WLAN_UNSOL_DISCONNECT (0x0002 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 205 #define HCI_EVNT_WLAN_UNSOL_INIT (0x0004 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 206 #define HCI_EVNT_WLAN_TX_COMPLETE (0x0008 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 207 #define HCI_EVNT_WLAN_UNSOL_DHCP (0x0010 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 208 #define HCI_EVNT_WLAN_ASYNC_PING_REPORT (0x0040 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 209 #define HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE (0x0080 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 210 #define HCI_EVNT_WLAN_KEEPALIVE (0x0200 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 211 #define HCI_EVNT_BSD_TCP_CLOSE_WAIT (0x0800 + HCI_EVNT_WLAN_UNSOL_BASE)
Kojto 20:30b6ed7bf8fd 212
Kojto 20:30b6ed7bf8fd 213 #define HCI_EVNT_DATA_UNSOL_FREE_BUFF \
Kojto 20:30b6ed7bf8fd 214 0x4100
Kojto 20:30b6ed7bf8fd 215
Kojto 20:30b6ed7bf8fd 216 #define HCI_EVNT_NVMEM_CREATE_ENTRY \
Kojto 20:30b6ed7bf8fd 217 HCI_CMND_NVMEM_CREATE_ENTRY
Kojto 20:30b6ed7bf8fd 218 #define HCI_EVNT_NVMEM_SWAP_ENTRY HCI_CMND_NVMEM_SWAP_ENTRY
Kojto 20:30b6ed7bf8fd 219
Kojto 20:30b6ed7bf8fd 220 #define HCI_EVNT_NVMEM_READ HCI_CMND_NVMEM_READ
Kojto 20:30b6ed7bf8fd 221 #define HCI_EVNT_NVMEM_WRITE (0x0202)
Kojto 20:30b6ed7bf8fd 222
Kojto 20:30b6ed7bf8fd 223 #define HCI_EVNT_READ_SP_VERSION \
Kojto 20:30b6ed7bf8fd 224 HCI_CMND_READ_SP_VERSION
Kojto 20:30b6ed7bf8fd 225
Kojto 20:30b6ed7bf8fd 226 #define HCI_EVNT_INPROGRESS 0xFFFF
Kojto 20:30b6ed7bf8fd 227
Kojto 20:30b6ed7bf8fd 228
Kojto 20:30b6ed7bf8fd 229 #define HCI_DATA_RECVFROM 0x84
Kojto 20:30b6ed7bf8fd 230 #define HCI_DATA_RECV 0x85
Kojto 20:30b6ed7bf8fd 231 #define HCI_DATA_NVMEM 0x91
Kojto 20:30b6ed7bf8fd 232
Kojto 20:30b6ed7bf8fd 233 #define HCI_EVENT_CC3000_CAN_SHUT_DOWN 0x99
Kojto 20:30b6ed7bf8fd 234
Kojto 20:30b6ed7bf8fd 235 // Prototypes for the structures for HCI APIs.
Kojto 20:30b6ed7bf8fd 236 #define HCI_DATA_HEADER_SIZE (5)
Kojto 20:30b6ed7bf8fd 237 #define HCI_EVENT_HEADER_SIZE (5)
Kojto 20:30b6ed7bf8fd 238 #define HCI_DATA_CMD_HEADER_SIZE (5)
Kojto 20:30b6ed7bf8fd 239 #define HCI_PATCH_HEADER_SIZE (6)
Kojto 20:30b6ed7bf8fd 240
Kojto 20:30b6ed7bf8fd 241 #define HCI_PACKET_TYPE_OFFSET (0)
Kojto 20:30b6ed7bf8fd 242 #define HCI_PACKET_ARGSIZE_OFFSET (2)
Kojto 20:30b6ed7bf8fd 243 #define HCI_PACKET_LENGTH_OFFSET (3)
Kojto 20:30b6ed7bf8fd 244
Kojto 20:30b6ed7bf8fd 245
Kojto 20:30b6ed7bf8fd 246 #define HCI_EVENT_OPCODE_OFFSET (1)
Kojto 20:30b6ed7bf8fd 247 #define HCI_EVENT_LENGTH_OFFSET (3)
Kojto 20:30b6ed7bf8fd 248 #define HCI_EVENT_STATUS_OFFSET (4)
Kojto 20:30b6ed7bf8fd 249 #define HCI_DATA_LENGTH_OFFSET (3)
Kojto 20:30b6ed7bf8fd 250
Kojto 20:30b6ed7bf8fd 251 #endif