Loading...
Searching...
No Matches
ph_oem_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 University of Applied Sciences Emden / Leer
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h" /* THIS INCLUDE IS MANDATORY */
19#include "saul_reg.h"
20#include "ph_oem.h"
21#include "ph_oem_regs.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31#ifndef PH_OEM_PARAM_I2C
32#define PH_OEM_PARAM_I2C (I2C_DEV(0))
33#endif
34#ifndef PH_OEM_PARAM_ADDR
35#define PH_OEM_PARAM_ADDR (0x65)
36#endif
37#ifndef PH_OEM_PARAM_INTERRUPT_PIN
38#define PH_OEM_PARAM_INTERRUPT_PIN (GPIO_UNDEF)
39#endif
40#ifndef PH_OEM_PARAM_INTERRUPT_OPTION
41#define PH_OEM_PARAM_INTERRUPT_OPTION (PH_OEM_IRQ_BOTH)
42#endif
43#ifndef PH_OEM_PARAM_INTERRUPT_GPIO_MODE
44#define PH_OEM_PARAM_INTERRUPT_GPIO_MODE (GPIO_IN_PD)
45#endif
46
47#ifndef PH_OEM_PARAMS
48#define PH_OEM_PARAMS { .i2c = PH_OEM_PARAM_I2C, \
49 .addr = PH_OEM_PARAM_ADDR, \
50 .interrupt_pin = PH_OEM_PARAM_INTERRUPT_PIN, \
51 .gpio_mode = PH_OEM_PARAM_INTERRUPT_GPIO_MODE, \
52 .irq_option = PH_OEM_PARAM_INTERRUPT_OPTION }
53#endif
54#ifndef PH_OEM_SAUL_INFO
55#define PH_OEM_SAUL_INFO { .name = "pH OEM sensor" }
56#endif
62{
63 PH_OEM_PARAMS
64};
65
70{
71 PH_OEM_SAUL_INFO
72};
73
74#ifdef __cplusplus
75}
76#endif
77
struct ph_oem_params ph_oem_params_t
pH OEM sensor params
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:110
Additional data to collect for each entry.
Definition saul_reg.h:48