wifi test

Dependencies:   X_NUCLEO_IKS01A2 mbed-http

Committer:
JMF
Date:
Wed Sep 05 14:28:24 2018 +0000
Revision:
0:24d3eb812fd4
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JMF 0:24d3eb812fd4 1 /*
JMF 0:24d3eb812fd4 2 * Copyright (c) 2012, STMicroelectronics.
JMF 0:24d3eb812fd4 3 * All rights reserved.
JMF 0:24d3eb812fd4 4 *
JMF 0:24d3eb812fd4 5 * Redistribution and use in source and binary forms, with or without
JMF 0:24d3eb812fd4 6 * modification, are permitted provided that the following conditions
JMF 0:24d3eb812fd4 7 * are met:
JMF 0:24d3eb812fd4 8 * 1. Redistributions of source code must retain the above copyright
JMF 0:24d3eb812fd4 9 * notice, this list of conditions and the following disclaimer.
JMF 0:24d3eb812fd4 10 * 2. Redistributions in binary form must reproduce the above copyright
JMF 0:24d3eb812fd4 11 * notice, this list of conditions and the following disclaimer in the
JMF 0:24d3eb812fd4 12 * documentation and/or other materials provided with the distribution.
JMF 0:24d3eb812fd4 13 * 3. Neither the name of the copyright holder nor the names of its
JMF 0:24d3eb812fd4 14 * contributors may be used to endorse or promote products derived
JMF 0:24d3eb812fd4 15 * from this software without specific prior written permission.
JMF 0:24d3eb812fd4 16 *
JMF 0:24d3eb812fd4 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
JMF 0:24d3eb812fd4 18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
JMF 0:24d3eb812fd4 19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
JMF 0:24d3eb812fd4 20 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
JMF 0:24d3eb812fd4 21 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
JMF 0:24d3eb812fd4 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
JMF 0:24d3eb812fd4 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
JMF 0:24d3eb812fd4 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
JMF 0:24d3eb812fd4 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
JMF 0:24d3eb812fd4 26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
JMF 0:24d3eb812fd4 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
JMF 0:24d3eb812fd4 28 * OF THE POSSIBILITY OF SUCH DAMAGE.
JMF 0:24d3eb812fd4 29 *
JMF 0:24d3eb812fd4 30 */
JMF 0:24d3eb812fd4 31 /*---------------------------------------------------------------------------*/
JMF 0:24d3eb812fd4 32 #ifndef __SPIRIT1_CONST_H__
JMF 0:24d3eb812fd4 33 #define __SPIRIT1_CONST_H__
JMF 0:24d3eb812fd4 34 /*---------------------------------------------------------------------------*/
JMF 0:24d3eb812fd4 35
JMF 0:24d3eb812fd4 36 /*---------------------------------------------------------------------------*/
JMF 0:24d3eb812fd4 37
JMF 0:24d3eb812fd4 38 /* The state bitfield and values for different states, as read from MC_STATE[1:0] registers,
JMF 0:24d3eb812fd4 39 which are returned on any SPI read or write operation. */
JMF 0:24d3eb812fd4 40 #define SPIRIT1_STATE_STATEBITS (0x00FE)
JMF 0:24d3eb812fd4 41 /*---------------------------------------------------------------------------*/
JMF 0:24d3eb812fd4 42
JMF 0:24d3eb812fd4 43 #define SPIRIT1_STATE_STANDBY ((0x0040)<<1)
JMF 0:24d3eb812fd4 44 #define SPIRIT1_STATE_SLEEP ((0x0036)<<1)
JMF 0:24d3eb812fd4 45 #define SPIRIT1_STATE_READY ((0x0003)<<1)
JMF 0:24d3eb812fd4 46 #define SPIRIT1_STATE_LOCK ((0x000F)<<1)
JMF 0:24d3eb812fd4 47 #define SPIRIT1_STATE_RX ((0x0033)<<1)
JMF 0:24d3eb812fd4 48 #define SPIRIT1_STATE_TX ((0x005F)<<1)
JMF 0:24d3eb812fd4 49 /* NB the below states were extracted from ST drivers, but are not specified in the datasheet */
JMF 0:24d3eb812fd4 50 #define SPIRIT1_STATE_PM_SETUP ((0x003D)<<1)
JMF 0:24d3eb812fd4 51 #define SPIRIT1_STATE_XO_SETTLING ((0x0023)<<1)
JMF 0:24d3eb812fd4 52 #define SPIRIT1_STATE_SYNTH_SETUP ((0x0053)<<1)
JMF 0:24d3eb812fd4 53 #define SPIRIT1_STATE_PROTOCOL ((0x001F)<<1)
JMF 0:24d3eb812fd4 54 #define SPIRIT1_STATE_SYNTH_CALIBRATION ((0x004F)<<1)
JMF 0:24d3eb812fd4 55 /*---------------------------------------------------------------------------*/
JMF 0:24d3eb812fd4 56 /* strobe commands */
JMF 0:24d3eb812fd4 57 #define SPIRIT1_STROBE_TX 0x60
JMF 0:24d3eb812fd4 58 #define SPIRIT1_STROBE_RX 0x61
JMF 0:24d3eb812fd4 59 #define SPIRIT1_STROBE_READY 0x62
JMF 0:24d3eb812fd4 60 #define SPIRIT1_STROBE_STANDBY 0x63
JMF 0:24d3eb812fd4 61 #define SPIRIT1_STROBE_SLEEP 0x64
JMF 0:24d3eb812fd4 62 #define SPIRIT1_STROBE_SABORT 0x67
JMF 0:24d3eb812fd4 63 #define SPIRIT1_STROBE_SRES 0x70
JMF 0:24d3eb812fd4 64 #define SPIRIT1_STROBE_FRX 0x71
JMF 0:24d3eb812fd4 65 #define SPIRIT1_STROBE_FTX 0x72
JMF 0:24d3eb812fd4 66 /*---------------------------------------------------------------------------*/
JMF 0:24d3eb812fd4 67
JMF 0:24d3eb812fd4 68
JMF 0:24d3eb812fd4 69
JMF 0:24d3eb812fd4 70 /* Exported types ------------------------------------------------------------*/
JMF 0:24d3eb812fd4 71 /*------------------------------------------------------------------*/
JMF 0:24d3eb812fd4 72
JMF 0:24d3eb812fd4 73
JMF 0:24d3eb812fd4 74 #endif /* __SPIRIT1_CONST_H__ */
JMF 0:24d3eb812fd4 75 /*---------------------------------------------------------------------------*/