1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/si1133/include/si1133_params.h
iosabi ce76125a22 drivers/si1133: New SI1133 UV/IR/Ambient light driver
The SI1133 from Silicon Labs is a UV Index Sensor and Ambient Light
Sensor in a small 2x2 mm DFN package. The sensor can measure
independently ultra violet (UV) light, infra red (IR) light and
ambient light, however the ambient light is also influenced by the
IR light requiring compensation from the IR readings.

The SI1133 is quite different from other Silicon Labs chips in RIOT OS
and therefore needs its own driver. In particular, the SI1133 has 7
different photodiode configurations to read but only 6 channels to
read them in parallel so only some channels can be read each time.

This patch implements a new driver allowing to read the data directly
and a saul interface for the three kinds of light source. There are
many configuration options including interrupts and continous modes
that are left out of this initial driver.
2020-12-14 03:13:23 +00:00

75 lines
1.4 KiB
C

/*
* Copyright (C) 2020 iosabi
*
* 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_si1133
*
* @{
* @file
* @brief Default configuration for SI1133
*
* @author iosabi <iosabi@protonmail.com>
*/
#ifndef SI1133_PARAMS_H
#define SI1133_PARAMS_H
#include "board.h"
#include "si1133.h"
#include "saul_reg.h"
#include "si1133_internals.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Set default configuration parameters for the Si1133
* @{
*/
#ifndef SI1133_PARAM_I2C_DEV
#define SI1133_PARAM_I2C_DEV I2C_DEV(0)
#endif
#ifndef SI1133_PARAM_ADDR
#define SI1133_PARAM_ADDR SI1133_I2C_ADDRESS
#endif
#ifndef SI1133_PARAMS
#define SI1133_PARAMS { .i2c_dev = SI1133_PARAM_I2C_DEV, \
.address = SI1133_PARAM_ADDR }
#endif
#ifndef SI1133_SAUL_INFO
#define SI1133_SAUL_INFO { .name = "si1133" }
#endif
/**@}*/
/**
* @brief Configure Si1133
*/
static const si1133_params_t si1133_params[] =
{
SI1133_PARAMS
};
/**
* @brief Allocate and configure entries to the SAUL registry
*/
saul_reg_t si1133_saul_reg_info[] =
{
SI1133_SAUL_INFO
};
#ifdef __cplusplus
}
#endif
#endif /* SI1133_PARAMS_H */
/** @} */