- Main Page
- Related Pages
- Modules
- Data Structures
- Files

# const.h

Go to the documentation of this file.

    00001 /* Copyright (c) 2007, 2008, 2009
    00002     Marco Arena
    00003     Axel Wachtler
    00004
    00005    All rights reserved.
    00006
    00007    Redistribution and use in source and binary forms, with or without
    00008    modification, are permitted provided that the following conditions
    00009    are met:
    00010
    00011    * Redistributions of source code must retain the above copyright
    00012      notice, this list of conditions and the following disclaimer.
    00013    * Redistributions in binary form must reproduce the above copyright
    00014      notice, this list of conditions and the following disclaimer in the
    00015      documentation and/or other materials provided with the distribution.
    00016    * Neither the name of the authors nor the names of its contributors
    00017      may be used to endorse or promote products derived from this software
    00018      without specific prior written permission.
    00019
    00020    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    00021    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    00022    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    00023    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    00024    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    00025    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    00026    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    00027    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    00028    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    00029    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    00030    POSSIBILITY OF SUCH DAMAGE. */
    00031
    00032 /* $Id: const.h,v 1.30 2010/01/02 15:37:06 awachtler Exp $ */
    00038 /*====================================================================*/
    00039 #ifndef CONST_H
    00040 #define CONST_H
    00041 #include <stdint.h>
    00042 #include <stdbool.h>
    00049 /*=== board constants ================================================*/
    00050 /*raven boards */
    00051 #define  RZ_USB230       (1)
    00052 #define  RAV_RF230       (2)
    00053 #define  RAV_LCD         (3)
    00055 /* Atmel/Dresden Elektonic boards */
    00056 #define  PSK_230         (10)
    00057 #define  PSK_230B        (11)
    00058 #define  PSK_231         (12)
    00059 #define  PSK_212         (13)
    00061 #define  RDK_230         (15)
    00062 #define  RDK_231         (17)
    00063 #define  RDK_212         (18)
    00065 #define  STB_230         (20)
    00066 #define  STB_230B        (21)
    00067 #define  STB_231         (22)
    00068 #define  STB_212         (23)
    00070 #define  RCB_BB_230      (25)
    00071 #define  RCB_BB_230B     (26)
    00072 #define  RCB_BB_231      (27)
    00073 #define  RCB_BB_212      (28)
    00075 #define  DE_MOD_128RFA1   (29)
    00077 #define  RCB_BB_128RFA1  (24)
    00080 /* Meshnetics boards */
    00081 #define  WDB_A1281       (30)
    00082 #define  MNB_900         (31)
    00083 /* in-cirquit */
    00084 //#define  IC_MEGA8_8    (40) /**< Board description see @ref grpICM8 . */
    00085 #define  ICT_RF230       (41)
    00086 #define  ICSTICK_RF230   (42)
    00087 #define  ICMODULE_RF230  (43)
    00088
    00089 /* ATZGB modules */
    00090 #define  ZGB_LINK_230    (50)
    00091 #define  ZGB_LINK_231    (51)
    00092 #define  ZGB_LINK_212    (52)
    00094 /* DIY and wirewrap projects */
    00095 #define  TINY_230        (90)
    00096 #define  STK500_MEGA8    (91)
    00097 #define  STK500_MEGA16   (92)
    00098 #define  STK500_TINY26   (93)
    00099 #define  LITTLE_GEE_231  (94)
    00109 /*=== cpu constants ==================================================*/
    00110
    00111 #define  CPU_M8          (1)
    00112 #define  CPU_M16         (2)
    00113 #define  CPU_M1281       (3)
    00114 #define  CPU_T26         (4)
    00115 #define  CPU_T44         (5)
    00116 #define  CPU_M1287       (6)
    00117 #define  CPU_M1284       (7)
    00118 #define  CPU_M88         (8)
    00119 #define  CPU_M644P       (9)
    00120 #define  CPU_M128RFA1    (10)
    00130 /*=== radio constants ================================================*/
    00131 #define  RADIO_AT86RF230 (1)
    00132 #define  RADIO_AT86RF230A (RADIO_AT86RF230)
    00133 #define  RADIO_AT86RF230B (2)
    00134 #define  RADIO_AT86RF231 (3)
    00135 #define  RADIO_AT86RF212 (4)
    00136 #define  RADIO_ATMEGA128RFA1_A (5)
    00137 #define  RADIO_ATMEGA128RFA1_B (6)
    00138 #define  RADIO_ATMEGA128RFA1_C (7)
    00139 #define  RADIO_ATMEGA128RFA1_D (8)
    00141 #define RADIO_BAND_700 (1)
    00142 #define RADIO_BAND_800 (2)
    00143 #define RADIO_BAND_900 (3)
    00144 #define RADIO_BAND_2400 (4)
    00146 /*=== modulation schemes =============================================*/
    00147 #define MOD_BPSK_20    (0)
    00148 #define MOD_BPSK_40    (1)
    00149 #define MOD_OQPSK_100  (2)
    00150 #define MOD_OQPSK_200  (3)
    00151 #define MOD_OQPSK_250  (4)
    00152 #define MOD_OQPSK_400  (5)
    00153 #define MOD_OQPSK_500  (6)
    00154 #define MOD_OQPSK_1000 (7)
    00155 #define MOD_OQPSK_2000 (8)
    00167 /*=== HIF type constants =============================================*/
    00168 #define  HIF_NONE     (0)
    00170 #define  HIF_UART_0   (10)
    00171 #define  HIF_UART_1   (11)
    00172 #define  HIF_FT245    (20)
    00173 #define  HIF_AT90USB  (21)
    00175 /*=== USB constants ==================================================*/
    00176
    00184 #define URACOLI_USB_VID (5824)
    00185
    00189 #define URACOLI_USB_PID (2183)
    00190
    00191 #define URACOLI_USB_BCD_RELEASE (0x100)
    00192 #define URACOLI_USB_VENDOR_NAME  L"URACOLI"
    00193 #define URACOLI_USB_PRODUCT_NAME L"RZUSBSTICK"
    00194 /*=== spi constants ==================================================*/
    00195 #define SPI_RATE_1_2      (4)
    00196 #define SPI_RATE_1_4      (0)
    00197 #define SPI_RATE_1_8      (5)
    00198 #define SPI_RATE_1_16     (1)
    00199 #define SPI_RATE_1_32     (6)
    00200 #define SPI_RATE_1_64     (2)
    00201 #define SPI_RATE_1_128    (3)
    00204 #if defined (DOXYGEN)
    00205
    00206 #define SHORTENUM
    00207 #else
    00208 #define SHORTENUM  __attribute__((packed))
    00209 #endif
    00210
    00211
    00212 #define FCTL_DATA _BV(0)
    00213 #define FCTL_ACK  _BV(5)
    00214 #define FCTL_IPAN _BV(6)
    00215 #define FCTL_DST_SHORT 0x0800
    00216 #define FCTL_DST_LONG  0x0c00
    00217 #define FCTL_SRC_SHORT 0x8000
    00218 #define FCTL_SRC_LONG  0xc000
    00220 #define FCTL_SRC_MASK (FCTL_SRC_LONG)
    00221 #define FCTL_DST_MASK (FCTL_DST_LONG)
    00222 #define FCTL_IPAN_MASK (FCTL_IPAN)
    00223
    00224 /* === Types ================================================================= */
    00226 typedef int8_t  channel_t;
    00227
    00229 typedef int8_t  txpwr_t;
    00230
    00234 typedef bool    rxidle_t;
    00235
    00237 typedef uint8_t ccamode_t;
    00238
    00239 /* ... cca_ed_tresh, clkm, pdt, ... */
    00240
    00244 typedef struct
    00245 {
    00247     channel_t chan;
    00249     uint8_t txp   : 4;
    00251     ccamode_t cca   : 2;
    00253     uint8_t edt   : 4;
    00254
    00256     uint8_t clkm  : 3;
    00257
    00258 } trx_param_t;
    00259
    00260
    00262 #endif  /* #ifndef CONST_H */