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
9#pragma once
10
20
21#include "board.h" /* THIS INCLUDE IS MANDATORY */
22#include "saul_reg.h"
23#include "ph_oem.h"
24#include "ph_oem_regs.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef PH_OEM_PARAM_I2C
35#define PH_OEM_PARAM_I2C (I2C_DEV(0))
36#endif
37#ifndef PH_OEM_PARAM_ADDR
38#define PH_OEM_PARAM_ADDR (0x65)
39#endif
40#ifndef PH_OEM_PARAM_INTERRUPT_PIN
41#define PH_OEM_PARAM_INTERRUPT_PIN (GPIO_UNDEF)
42#endif
43#ifndef PH_OEM_PARAM_INTERRUPT_OPTION
44#define PH_OEM_PARAM_INTERRUPT_OPTION (PH_OEM_IRQ_BOTH)
45#endif
46#ifndef PH_OEM_PARAM_INTERRUPT_GPIO_MODE
47#define PH_OEM_PARAM_INTERRUPT_GPIO_MODE (GPIO_IN_PD)
48#endif
49
50#ifndef PH_OEM_PARAMS
51#define PH_OEM_PARAMS { .i2c = PH_OEM_PARAM_I2C, \
52 .addr = PH_OEM_PARAM_ADDR, \
53 .interrupt_pin = PH_OEM_PARAM_INTERRUPT_PIN, \
54 .gpio_mode = PH_OEM_PARAM_INTERRUPT_GPIO_MODE, \
55 .irq_option = PH_OEM_PARAM_INTERRUPT_OPTION }
56#endif
57#ifndef PH_OEM_SAUL_INFO
58#define PH_OEM_SAUL_INFO { .name = "pH OEM sensor" }
59#endif
65{
66 PH_OEM_PARAMS
67};
68
73{
74 PH_OEM_SAUL_INFO
75};
76
77#ifdef __cplusplus
78}
79#endif
80
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