Loading...
Searching...
No Matches
kw2xrf_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Hamburg University of Applied Sciences
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
19#ifndef KW2XRF_PARAMS_H
20#define KW2XRF_PARAMS_H
21
22#include "board.h"
23#include "kw2xrf.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#ifndef KW2XRF_PARAM_SPI
34#define KW2XRF_PARAM_SPI (SPI_DEV(0))
35#endif
36#ifndef KW2XRF_PARAM_SPI_CLK
37#define KW2XRF_PARAM_SPI_CLK (SPI_CLK_10MHZ)
38#endif
39#ifndef KW2XRF_PARAM_CS
40#define KW2XRF_PARAM_CS (GPIO_PIN(0, 0))
41#endif
42#ifndef KW2XRF_PARAM_INT
43#define KW2XRF_PARAM_INT (GPIO_PIN(0, 1))
44#endif
45#ifndef KW2XRF_PARAM_SLEEP
46#define KW2XRF_PARAM_SLEEP (GPIO_PIN(0, 2))
47#endif
48#ifndef KW2XRF_PARAM_RESET
49#define KW2XRF_PARAM_RESET (GPIO_PIN(0, 3))
50#endif
51
52#ifndef KW2XRF_PARAMS
53#define KW2XRF_PARAMS { .spi = KW2XRF_PARAM_SPI, \
54 .spi_clk = KW2XRF_PARAM_SPI_CLK, \
55 .cs_pin = KW2XRF_PARAM_CS, \
56 .int_pin = KW2XRF_PARAM_INT, \
57 .rst_pin = KW2XRF_PARAM_RESET }
58#endif
65{
66 KW2XRF_PARAMS
67};
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* KW2XRF_PARAMS_H */
Interface definition for the kw2xrf driver.
Struct holding all params needed for device initialization.
Definition kw2xrf.h:106