Fork of my MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:45:51 2017 +0000
Revision:
0:f1d3878b8dd9
Initial commit

Who changed what in which revision?

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