Loading...
Searching...
No Matches
ph_oem_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 University of Applied Sciences Emden / Leer
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 PH_OEM_PARAMS_H
20#define PH_OEM_PARAMS_H
21
22#include "board.h" /* THIS INCLUDE IS MANDATORY */
23#include "saul_reg.h"
24#include "ph_oem.h"
25#include "ph_oem_regs.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35#ifndef PH_OEM_PARAM_I2C
36#define PH_OEM_PARAM_I2C (I2C_DEV(0))
37#endif
38#ifndef PH_OEM_PARAM_ADDR
39#define PH_OEM_PARAM_ADDR (0x65)
40#endif
41#ifndef PH_OEM_PARAM_INTERRUPT_PIN
42#define PH_OEM_PARAM_INTERRUPT_PIN (GPIO_UNDEF)
43#endif
44#ifndef PH_OEM_PARAM_INTERRUPT_OPTION
45#define PH_OEM_PARAM_INTERRUPT_OPTION (PH_OEM_IRQ_BOTH)
46#endif
47#ifndef PH_OEM_PARAM_INTERRUPT_GPIO_MODE
48#define PH_OEM_PARAM_INTERRUPT_GPIO_MODE (GPIO_IN_PD)
49#endif
50
51#ifndef PH_OEM_PARAMS
52#define PH_OEM_PARAMS { .i2c = PH_OEM_PARAM_I2C, \
53 .addr = PH_OEM_PARAM_ADDR, \
54 .interrupt_pin = PH_OEM_PARAM_INTERRUPT_PIN, \
55 .gpio_mode = PH_OEM_PARAM_INTERRUPT_GPIO_MODE, \
56 .irq_option = PH_OEM_PARAM_INTERRUPT_OPTION }
57#endif
58#ifndef PH_OEM_SAUL_INFO
59#define PH_OEM_SAUL_INFO { .name = "pH OEM sensor" }
60#endif
66{
67 PH_OEM_PARAMS
68};
69
74{
75 PH_OEM_SAUL_INFO
76};
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* PH_OEM_PARAMS_H */
Device driver for Atlas Scientific pH OEM Sensor with SMBus/I2C interface.
static const saul_reg_info_t ph_oem_saul_info[]
Additional meta information to keep in the SAUL registry.
Register definitions for the Atlas Scientific pH OEM sensor.
SAUL registry interface definition.
pH OEM sensor params
Definition ph_oem.h:111
Additional data to collect for each entry.
Definition saul_reg.h:49