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