Loading...
Searching...
No Matches
l3g4200d_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "l3g4200d.h"
20#include "saul_reg.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef L3G4200D_PARAM_I2C
31#define L3G4200D_PARAM_I2C I2C_DEV(0)
32#endif
33#ifndef L3G4200D_PARAM_ADDR
34#define L3G4200D_PARAM_ADDR (CONFIG_L3G4200D_DEFAULT_ADDRESS)
35#endif
36#ifndef L3G4200D_PARAM_INT1
37#define L3G4200D_PARAM_INT1 (GPIO_PIN(0, 0))
38#endif
39#ifndef L3G4200D_PARAM_INT2
40#define L3G4200D_PARAM_INT2 (GPIO_PIN(0, 1))
41#endif
42#ifndef L3G4200D_PARAM_MODE
43#define L3G4200D_PARAM_MODE (L3G4200D_MODE_200_25)
44#endif
45#ifndef L3G4200D_PARAM_SCALE
46#define L3G4200D_PARAM_SCALE (L3G4200D_SCALE_500DPS)
47#endif
48
49#ifndef L3G4200D_PARAMS
50#define L3G4200D_PARAMS { .i2c = L3G4200D_PARAM_I2C, \
51 .addr = L3G4200D_PARAM_ADDR, \
52 .int1 = L3G4200D_PARAM_INT1, \
53 .int2 = L3G4200D_PARAM_INT2, \
54 .mode = L3G4200D_PARAM_MODE, \
55 .scale = L3G4200D_PARAM_SCALE }
56#endif
57#ifndef L3G4200D_SAUL_INFO
58#define L3G4200D_SAUL_INFO { .name = "l3g4200d" }
59#endif
61
66{
67 L3G4200D_PARAMS
68};
69
74{
75 L3G4200D_SAUL_INFO
76};
77
78#ifdef __cplusplus
79}
80#endif
81
Device driver interface for the L3G4200D gyroscope.
static const saul_reg_info_t l3g4200d_saul_info[]
Additional meta information to keep in the SAUL registry.
static const l3g4200d_params_t l3g4200d_params[]
Allocate some memory to store the actual configuration.
SAUL registry interface definition.
Device initialization parameters.
Definition l3g4200d.h:94
Additional data to collect for each entry.
Definition saul_reg.h:48