Loading...
Searching...
No Matches
l3g4200d_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Freie Universität Berlin
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 "l3g4200d.h"
23#include "saul_reg.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#ifndef L3G4200D_PARAM_I2C
34#define L3G4200D_PARAM_I2C I2C_DEV(0)
35#endif
36#ifndef L3G4200D_PARAM_ADDR
37#define L3G4200D_PARAM_ADDR (CONFIG_L3G4200D_DEFAULT_ADDRESS)
38#endif
39#ifndef L3G4200D_PARAM_INT1
40#define L3G4200D_PARAM_INT1 (GPIO_PIN(0, 0))
41#endif
42#ifndef L3G4200D_PARAM_INT2
43#define L3G4200D_PARAM_INT2 (GPIO_PIN(0, 1))
44#endif
45#ifndef L3G4200D_PARAM_MODE
46#define L3G4200D_PARAM_MODE (L3G4200D_MODE_200_25)
47#endif
48#ifndef L3G4200D_PARAM_SCALE
49#define L3G4200D_PARAM_SCALE (L3G4200D_SCALE_500DPS)
50#endif
51
52#ifndef L3G4200D_PARAMS
53#define L3G4200D_PARAMS { .i2c = L3G4200D_PARAM_I2C, \
54 .addr = L3G4200D_PARAM_ADDR, \
55 .int1 = L3G4200D_PARAM_INT1, \
56 .int2 = L3G4200D_PARAM_INT2, \
57 .mode = L3G4200D_PARAM_MODE, \
58 .scale = L3G4200D_PARAM_SCALE }
59#endif
60#ifndef L3G4200D_SAUL_INFO
61#define L3G4200D_SAUL_INFO { .name = "l3g4200d" }
62#endif
64
69{
70 L3G4200D_PARAMS
71};
72
77{
78 L3G4200D_SAUL_INFO
79};
80
81#ifdef __cplusplus
82}
83#endif
84
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:97
Additional data to collect for each entry.
Definition saul_reg.h:48