Loading...
Searching...
No Matches
cc110x_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Otto-von-Guericke-Universität Magdeburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
20
21#include "board.h"
22#include "cc110x_settings.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
34#ifndef CC110X_PARAM_SPI
35#define CC110X_PARAM_SPI SPI_DEV(0)
36#endif
37
38#ifndef CC110X_PARAM_CS
39#define CC110X_PARAM_CS GPIO_PIN(1, 21)
40#endif
41
42#ifndef CC110X_PARAM_GDO0
43#define CC110X_PARAM_GDO0 GPIO_PIN(0, 27)
44#endif
45
46#ifndef CC110X_PARAM_GDO2
47#define CC110X_PARAM_GDO2 GPIO_PIN(0, 28)
48#endif
49
50#ifndef CC110X_PARAM_SPI_CLOCK
51#define CC110X_PARAM_SPI_CLOCK SPI_CLK_5MHZ
52#endif
53
54#ifndef CC110X_PARAM_PATABLE
61#if IS_USED(MODULE_CC110X_433MHZ)
62#define CC110X_PARAM_PATABLE (&cc110x_patable_433mhz)
63#elif IS_USED(MODULE_CC110X_868MHZ)
64#define CC110X_PARAM_PATABLE (&cc110x_patable_868mhz)
65#elif IS_USED(MODULE_CC110X_915MHZ)
66#define CC110X_PARAM_PATABLE (&cc110x_patable_915mhz)
67#endif
68#endif
69
70#ifndef CC110X_PARAM_CONFIG
76#if IS_USED(MODULE_CC110X_433MHZ)
77#define CC110X_PARAM_CONFIG (&cc110x_config_433mhz_250kbps_300khz)
78#else
79#define CC110X_PARAM_CONFIG NULL
80#endif
81#endif
82
83#ifndef CC110X_PARAM_CHANNELS
89#if IS_USED(MODULE_CC110X_433MHZ)
90#define CC110X_PARAM_CHANNELS (&cc110x_chanmap_433mhz_300khz)
91#else
92#define CC110X_PARAM_CHANNELS (&cc110x_chanmap_868mhz_lora)
93#endif
94#endif
95
96#ifndef CC110X_PARAMS
100#define CC110X_PARAMS { \
101 .spi = CC110X_PARAM_SPI, \
102 .spi_clk = CC110X_PARAM_SPI_CLOCK, \
103 .cs = CC110X_PARAM_CS, \
104 .gdo0 = CC110X_PARAM_GDO0, \
105 .gdo2 = CC110X_PARAM_GDO2, \
106 .patable = CC110X_PARAM_PATABLE, \
107 .config = CC110X_PARAM_CONFIG, \
108 .channels = CC110X_PARAM_CHANNELS, \
109}
110
111#endif
113
119};
120
121#ifdef __cplusplus
122}
123#endif
#define CC110X_PARAMS
Default initialization parameters of the CC110x driver.
static const cc110x_params_t cc110x_params[]
CC110X initialization parameters.
Default settings of the TI CC1100/CC1101 transceiver.
Structure holding all parameter for driver initialization.
Definition cc110x.h:453