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
9#pragma once
10
20
21#include "board.h"
22#include "kw2xrf.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#ifndef KW2XRF_PARAM_SPI
33#define KW2XRF_PARAM_SPI (SPI_DEV(0))
34#endif
35#ifndef KW2XRF_PARAM_SPI_CLK
36#define KW2XRF_PARAM_SPI_CLK (SPI_CLK_10MHZ)
37#endif
38#ifndef KW2XRF_PARAM_CS
39#define KW2XRF_PARAM_CS (GPIO_PIN(0, 0))
40#endif
41#ifndef KW2XRF_PARAM_INT
42#define KW2XRF_PARAM_INT (GPIO_PIN(0, 1))
43#endif
44#ifndef KW2XRF_PARAM_SLEEP
45#define KW2XRF_PARAM_SLEEP (GPIO_PIN(0, 2))
46#endif
47#ifndef KW2XRF_PARAM_RESET
48#define KW2XRF_PARAM_RESET (GPIO_PIN(0, 3))
49#endif
50
51#ifndef KW2XRF_PARAMS
52#define KW2XRF_PARAMS { .spi = KW2XRF_PARAM_SPI, \
53 .spi_clk = KW2XRF_PARAM_SPI_CLK, \
54 .cs_pin = KW2XRF_PARAM_CS, \
55 .int_pin = KW2XRF_PARAM_INT, \
56 .rst_pin = KW2XRF_PARAM_RESET }
57#endif
59
64{
65 KW2XRF_PARAMS
66};
67
68#ifdef __cplusplus
69}
70#endif
71
struct kw2xrf_params kw2xrf_params_t
Struct holding all params needed for device initialization.
Interface definition for the kw2xrf driver.
Struct holding all params needed for device initialization.
Definition kw2xrf.h:105