Fork of my original MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:43:14 2017 +0000
Revision:
0:a1734fe1ec4b
Initial commit

Who changed what in which revision?

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