Loading...
Searching...
No Matches
itg320x_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Gunar Schorcht
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
17#ifndef ITG320X_PARAMS_H
18#define ITG320X_PARAMS_H
19
20#include "board.h"
21#include "itg320x.h"
22#include "saul_reg.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#ifndef ITG320X_PARAM_DEV
33#define ITG320X_PARAM_DEV I2C_DEV(0)
34#endif
35#ifndef ITG320X_PARAM_ADDR
36#define ITG320X_PARAM_ADDR (ITG320X_I2C_ADDRESS_1)
37#endif
38#ifndef ITG320X_PARAM_LPF_BW
39#define ITG320X_PARAM_LPF_BW (ITG320X_LPF_BW_5)
40#endif
41#ifndef ITG320X_PARAM_ISR_DIV
42#define ITG320X_PARAM_ISR_DIV (99)
43#endif
44#ifndef ITG320X_PARAM_CLK_SEL
45#define ITG320X_PARAM_CLK_SEL (ITG320X_CLK_PLL_X_GYRO)
46#endif
47#ifndef ITG320X_PARAM_INT_PIN
48#define ITG320X_PARAM_INT_PIN (GPIO_UNDEF)
49#endif
50#ifndef ITG320X_PARAM_INT_LEVEL
51#define ITG320X_PARAM_INT_LEVEL (ITG320X_INT_LOW)
52#endif
53#ifndef ITG320X_PARAM_INT_DRIVE
54#define ITG320X_PARAM_INT_DRIVE (ITG320X_INT_PUSH_PULL)
55#endif
56
57#ifndef ITG320X_PARAMS
58#ifdef MODULE_ITG320X_INT
59#define ITG320X_PARAMS { \
60 .dev = ITG320X_PARAM_DEV, \
61 .addr = ITG320X_PARAM_ADDR, \
62 .lpf_bw = ITG320X_PARAM_LPF_BW, \
63 .isr_div = ITG320X_PARAM_ISR_DIV, \
64 .clk_sel = ITG320X_PARAM_CLK_SEL, \
65 .int_pin = ITG320X_PARAM_INT_PIN, \
66 .int_level = ITG320X_PARAM_INT_LEVEL, \
67 .int_drive = ITG320X_PARAM_INT_DRIVE, \
68 }
69#else /* MODULE_ITG320X_INT */
70#define ITG320X_PARAMS { \
71 .dev = ITG320X_PARAM_DEV, \
72 .addr = ITG320X_PARAM_ADDR, \
73 .lpf_bw = ITG320X_PARAM_LPF_BW, \
74 .isr_div = ITG320X_PARAM_ISR_DIV, \
75 .clk_sel = ITG320X_PARAM_CLK_SEL, \
76 }
77#endif /* MODULE_ITG320X_INT */
78#endif /* ITG320X_PARAMS */
79
80#ifndef ITG320X_SAUL_INFO
81#define ITG320X_SAUL_INFO { .name = "itg320x" }
82#endif
89{
90 ITG320X_PARAMS
91};
92
97{
98 ITG320X_SAUL_INFO
99};
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* ITG320X_PARAMS_H */
Device driver for InvenSense ITG320X 3-axis gyroscope.
static const itg320x_params_t itg320x_params[]
Allocate some memory to store the actual configuration.
static const saul_reg_info_t itg320x_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
ITG320X device initialization parameters.
Definition itg320x.h:148
Additional data to collect for each entry.
Definition saul_reg.h:49