123r

Dependencies:   WNC14A2AInterface

Committer:
JMF
Date:
Wed Apr 19 01:13:10 2017 +0000
Revision:
0:2563b0415d1f
Initial commit

Who changed what in which revision?

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