Contiki-NG
Toggle main menu visibility
Loading...
Searching...
No Matches
cc1200-rf-cfg.h
1
/*
2
* Copyright (c) 2015, Weptech elektronik GmbH Germany
3
* http://www.weptech.de
4
*
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
* 1. Redistributions of source code must retain the above copyright
11
* notice, this list of conditions and the following disclaimer.
12
* 2. Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
* 3. Neither the name of the copyright holder nor the names of its
16
* contributors may be used to endorse or promote products derived
17
* from this software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30
* OF THE POSSIBILITY OF SUCH DAMAGE.
31
*
32
* This file is part of the Contiki operating system.
33
*/
34
35
#ifndef CC1200_RF_CFG_H
36
#define CC1200_RF_CFG_H
37
38
#include "contiki.h"
39
40
#include <stdint.h>
41
#include <stdlib.h>
42
43
/*---------------------------------------------------------------------------*/
44
/*
45
* We export the register setup from SmartRF using the standard template
46
* "trxEB RF Settings Performance Line" and have therefore to typedef
47
* the following struct.
48
*/
49
typedef
struct
cc1200_registerSetting {
50
uint16_t addr;
51
uint8_t val;
52
} registerSetting_t;
53
/*---------------------------------------------------------------------------*/
54
/* Map SmartRF typedef to reflect Contiki's naming conventions */
55
typedef
registerSetting_t cc1200_register_settings_t;
56
/*---------------------------------------------------------------------------*/
57
/* This struct holds the complete configuration for a given mode */
58
typedef
struct
cc1200_rf_cfg {
59
/* A string describing the mode */
60
const
char
*cfg_descriptor;
61
/* A pointer to a register setup exported from SmartRF */
62
const
cc1200_register_settings_t *register_settings;
63
/* The size of the register setup */
64
size_t
size_of_register_settings;
65
/*
66
* TX packet lifetime. Maximum duration of a TX packet including preamble,
67
* synch word + phy header, payload + CRC.
68
*/
69
rtimer_clock_t tx_pkt_lifetime;
70
/* The maximum time it takes to switch from Tx to Rx */
71
rtimer_clock_t tx_rx_turnaround;
72
/* The delay between a call to transmit() and end of SFD */
73
rtimer_clock_t delay_before_tx;
74
/* Delay between GO signal and start listening
75
* Measured 104us: between GO signal and start listening */
76
rtimer_clock_t delay_before_rx;
77
/* Delay between the SFD finishes arriving and it is detected in software */
78
rtimer_clock_t delay_before_detect;
79
/* Base frequency in kHz */
80
uint32_t chan_center_freq0;
81
/* Channel spacing in Hz */
82
uint32_t chan_spacing;
83
/* The minimum channel */
84
uint8_t min_channel;
85
/* The maximum channel */
86
uint8_t max_channel;
87
/* The maximum output power in dBm */
88
int8_t max_txpower;
89
/*
90
* The carrier sense level used for CCA in dBm (int8_t). Limited by
91
* CC1200_CONST_CCA_THRESHOLD_MIN and CC1200_CONST_CCA_THRESHOLD_MAX.
92
*/
93
int8_t cca_threshold;
94
/* The RSSI offset in dBm.
95
* -99 when MDMCFG1.DVGA_GAIN=00, -81 when MDMCFG1.DVGA_GAIN=01 */
96
int8_t rssi_offset;
97
/* The bitrate in bps */
98
uint32_t bitrate;
99
/* TSCH timeslot timing */
100
const
uint16_t *tsch_timing;
101
} cc1200_rf_cfg_t;
102
/*---------------------------------------------------------------------------*/
103
#endif
/* CC1200_RF_CFG_H */
arch
dev
radio
cc1200
cc1200-rf-cfg.h
Generated on
for Contiki-NG by
1.17.0