1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/ph_oem/include/ph_oem_params.h
Igor Knippenberg ead03d4a08 drivers/ph_oem: Initial implementation of the pH OEM sensor
The Atlas Scientific pH OEM sensor is a small circuit to be embedded in
end products to measure the pH value with any commercially available pH
electrode
2019-09-05 12:47:10 +02:00

84 lines
2.0 KiB
C

/*
* Copyright (C) 2019 University of Applied Sciences Emden / Leer
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup drivers_ph_oem
* @{
*
* @file
* @brief Default configuration for Atlas Scientific pH OEM sensors
*
* @author Igor Knippenberg <igor.knippenberg@gmail.com>
*/
#ifndef PH_OEM_PARAMS_H
#define PH_OEM_PARAMS_H
#include "board.h" /* THIS INCLUDE IS MANDATORY */
#include "saul_reg.h"
#include "ph_oem.h"
#include "ph_oem_regs.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Set default configuration parameters for the Atlas Scientific pH OEM driver
* @{
*/
#ifndef PH_OEM_PARAM_I2C
#define PH_OEM_PARAM_I2C (I2C_DEV(0))
#endif
#ifndef PH_OEM_PARAM_ADDR
#define PH_OEM_PARAM_ADDR (0x65)
#endif
#ifndef PH_OEM_PARAM_INTERRUPT_PIN
#define PH_OEM_PARAM_INTERRUPT_PIN (GPIO_UNDEF)
#endif
#ifndef PH_OEM_PARAM_INTERRUPT_OPTION
#define PH_OEM_PARAM_INTERRUPT_OPTION (PH_OEM_IRQ_BOTH)
#endif
#ifndef PH_OEM_PARAM_INTERRUPT_GPIO_MODE
#define PH_OEM_PARAM_INTERRUPT_GPIO_MODE (GPIO_IN_PD)
#endif
#ifndef PH_OEM_PARAMS
#define PH_OEM_PARAMS { .i2c = PH_OEM_PARAM_I2C, \
.addr = PH_OEM_PARAM_ADDR, \
.interrupt_pin = PH_OEM_PARAM_INTERRUPT_PIN, \
.gpio_mode = PH_OEM_PARAM_INTERRUPT_GPIO_MODE, \
.irq_option = PH_OEM_PARAM_INTERRUPT_OPTION }
#endif
#ifndef PH_OEM_SAUL_INFO
#define PH_OEM_SAUL_INFO { .name = "pH OEM sensor" }
#endif
/** @} */
/**
* @brief pH OEM defaults if not defined for a board or application
*/
static const ph_oem_params_t ph_oem_params[] =
{
PH_OEM_PARAMS
};
/**
* @brief Additional meta information to keep in the SAUL registry
*/
static const saul_reg_info_t ph_oem_saul_info[] =
{
PH_OEM_SAUL_INFO
};
#ifdef __cplusplus
}
#endif
#endif /* PH_OEM_PARAMS_H */
/** @} */