센서보드 RF IRQ 테스트 중

Fork of stm-spirit1-rf-driver by ST

Committer:
Wolfgang Betz
Date:
Fri Sep 01 08:51:04 2017 +0200
Revision:
75:8dc65c09af67
Parent:
67:93bec0baf1de
Clarification on radio configuration

Who changed what in which revision?

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