drivers: sensors: Fix log module registration
All sensors were using legacy log module registeration method where LOG_LEVEL was defined before registeration. This method was error prone as it requires preserving includes order. Replaced with LOG_MODULE_REGISTER(foo, level). Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
6c34983ed2
commit
ac417abdf0
99 changed files with 116 additions and 228 deletions
|
@ -14,9 +14,8 @@
|
|||
|
||||
#include "adt7420.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(ADT7420);
|
||||
LOG_MODULE_REGISTER(ADT7420, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int adt7420_temp_reg_read(struct device *dev, u8_t reg, s16_t *val)
|
||||
{
|
||||
|
|
|
@ -13,9 +13,8 @@
|
|||
|
||||
#include "adt7420.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(ADT7420);
|
||||
LOG_MODULE_DECLARE(ADT7420, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void adt7420_thread_cb(void *arg)
|
||||
{
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#include "adxl362.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(ADXL362);
|
||||
LOG_MODULE_REGISTER(ADXL362, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static struct adxl362_data adxl362_data;
|
||||
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
|
||||
#include "adxl362.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(ADXL362);
|
||||
LOG_MODULE_DECLARE(ADXL362, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void adxl362_thread_cb(void *arg)
|
||||
{
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include "adxl372.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(ADXL372);
|
||||
LOG_MODULE_REGISTER(ADXL372, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int adxl372_bus_access(struct device *dev, u8_t reg,
|
||||
void *data, size_t length)
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
#include <drivers/sensor.h>
|
||||
#include "adxl372.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(ADXL372);
|
||||
LOG_MODULE_DECLARE(ADXL372, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void adxl372_thread_cb(void *arg)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "ak8975.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(AK8975);
|
||||
LOG_MODULE_REGISTER(AK8975, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int ak8975_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#include "amg88xx.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(AMG88XX);
|
||||
LOG_MODULE_REGISTER(AMG88XX, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int amg88xx_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
|
||||
extern struct amg88xx_data amg88xx_driver;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(AMG88XX);
|
||||
LOG_MODULE_DECLARE(AMG88XX, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int amg88xx_attr_set(struct device *dev,
|
||||
enum sensor_channel chan,
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "iAQcore.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(IAQ_CORE);
|
||||
LOG_MODULE_REGISTER(IAQ_CORE, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int iaqcore_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
|
||||
#include "apds9960.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(APDS9960);
|
||||
LOG_MODULE_REGISTER(APDS9960, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void apds9960_gpio_callback(struct device *dev,
|
||||
struct gpio_callback *cb, u32_t pins)
|
||||
|
|
|
@ -14,9 +14,8 @@
|
|||
|
||||
extern struct apds9960_data apds9960_driver;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(APDS9960);
|
||||
LOG_MODULE_DECLARE(APDS9960, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
void apds9960_work_cb(struct k_work *work)
|
||||
{
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
|
||||
#include "bma280.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(BMA280);
|
||||
LOG_MODULE_REGISTER(BMA280, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int bma280_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
|
||||
#include "bma280.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(BMA280);
|
||||
LOG_MODULE_DECLARE(BMA280, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int bma280_attr_set(struct device *dev,
|
||||
enum sensor_channel chan,
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
|
||||
#include "bmc150_magn.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(BMC150_MAGN);
|
||||
LOG_MODULE_REGISTER(BMC150_MAGN, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static const struct {
|
||||
int freq;
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
|
||||
#include "bmc150_magn.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(BMC150_MAGN);
|
||||
LOG_MODULE_DECLARE(BMC150_MAGN, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int bmc150_magn_trigger_set(struct device *dev,
|
||||
const struct sensor_trigger *trig,
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
|
||||
#include "bme280.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(BME280);
|
||||
LOG_MODULE_REGISTER(BME280, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int bm280_reg_read(struct bme280_data *data,
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#include "bmg160.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(BMG160);
|
||||
LOG_MODULE_REGISTER(BMG160, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
struct bmg160_device_data bmg160_data;
|
||||
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
|
||||
extern struct bmg160_device_data bmg160_data;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(BMG160);
|
||||
LOG_MODULE_DECLARE(BMG160, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void bmg160_gpio_callback(struct device *port, struct gpio_callback *cb,
|
||||
u32_t pin)
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#include "bmi160.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(BMI160);
|
||||
LOG_MODULE_REGISTER(BMI160, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
struct bmi160_device_data bmi160_data;
|
||||
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
#include "bmi160.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(BMI160);
|
||||
LOG_MODULE_DECLARE(BMI160, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void bmi160_handle_anymotion(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include <logging/log.h>
|
||||
#include "bmm150.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(BMM150);
|
||||
LOG_MODULE_REGISTER(BMM150, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static const struct {
|
||||
int freq;
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#include "ccs811.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(CCS811);
|
||||
LOG_MODULE_REGISTER(CCS811, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int ccs811_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "dht.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(DHT);
|
||||
LOG_MODULE_REGISTER(DHT, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/**
|
||||
* @brief Measure duration of signal send by sensor
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
#include <logging/log.h>
|
||||
#include "ens210.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(ENS210);
|
||||
LOG_MODULE_REGISTER(ENS210, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#ifdef ENS210_CRC_CHECK
|
||||
u32_t ens210_crc7(u32_t bitstream)
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include <sys/__assert.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(FXAS21002);
|
||||
LOG_MODULE_REGISTER(FXAS21002, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/* Sample period in microseconds, indexed by output data rate encoding (DR) */
|
||||
static const u32_t sample_period[] = {
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
|
||||
#include "fxas21002.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(FXAS21002);
|
||||
LOG_MODULE_DECLARE(FXAS21002, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void fxas21002_gpio_callback(struct device *dev,
|
||||
struct gpio_callback *cb,
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
#include <logging/log.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(FXOS8700);
|
||||
LOG_MODULE_REGISTER(FXOS8700, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int fxos8700_set_odr(struct device *dev, const struct sensor_value *val)
|
||||
{
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
*/
|
||||
|
||||
#include "fxos8700.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(FXOS8700);
|
||||
|
||||
LOG_MODULE_DECLARE(FXOS8700, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void fxos8700_gpio_callback(struct device *dev,
|
||||
struct gpio_callback *cb,
|
||||
|
|
|
@ -9,10 +9,9 @@
|
|||
#include <math.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <zephyr.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(grove_light);
|
||||
|
||||
LOG_MODULE_REGISTER(grove_light, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
struct gls_data {
|
||||
struct device *adc;
|
||||
|
|
|
@ -9,10 +9,9 @@
|
|||
#include <math.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <zephyr.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(grove_temp);
|
||||
|
||||
LOG_MODULE_REGISTER(grove_temp, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/* thermistor Nominal B-Constant */
|
||||
#if defined(CONFIG_GROVE_TEMPERATURE_SENSOR_V1_0)
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
|
||||
#include "hmc5883l.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(HMC5883L);
|
||||
LOG_MODULE_REGISTER(HMC5883L, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void hmc5883l_convert(struct sensor_value *val, s16_t raw_val,
|
||||
u16_t divider)
|
||||
|
|
|
@ -10,12 +10,10 @@
|
|||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "hmc5883l.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(HMC5883L);
|
||||
LOG_MODULE_DECLARE(HMC5883L, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int hmc5883l_trigger_set(struct device *dev,
|
||||
const struct sensor_trigger *trig,
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
|
||||
#include "hp206c.h"
|
||||
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(HP206C);
|
||||
LOG_MODULE_REGISTER(HP206C, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int hp206c_bus_config(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
|
||||
#include "hts221.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(HTS221);
|
||||
LOG_MODULE_REGISTER(HTS221, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static const char * const hts221_odr_strings[] = {
|
||||
"1", "7", "12.5"
|
||||
|
|
|
@ -10,12 +10,10 @@
|
|||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "hts221.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(HTS221);
|
||||
LOG_MODULE_DECLARE(HTS221, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int hts221_trigger_set(struct device *dev,
|
||||
const struct sensor_trigger *trig,
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#include "iis3dhhc.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(IIS3DHHC);
|
||||
LOG_MODULE_REGISTER(IIS3DHHC, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int iis3dhhc_sample_fetch(struct device *dev,
|
||||
enum sensor_channel chan)
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#define IIS3DHHC_SPI_READ (1 << 7)
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(IIS3DHHC);
|
||||
LOG_MODULE_DECLARE(IIS3DHHC, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static struct spi_config iis3dhhc_spi_conf = {
|
||||
.frequency = DT_INST_0_ST_IIS3DHHC_SPI_MAX_FREQUENCY,
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "iis3dhhc.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(IIS3DHHC);
|
||||
LOG_MODULE_DECLARE(IIS3DHHC, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/**
|
||||
* iis3dhhc_enable_int - enable selected int pin to generate interrupt
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "isl29035.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(ISL29035);
|
||||
LOG_MODULE_REGISTER(ISL29035, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int isl29035_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
|
|
|
@ -9,14 +9,12 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "isl29035.h"
|
||||
|
||||
extern struct isl29035_driver_data isl29035_data;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(ISL29035);
|
||||
LOG_MODULE_DECLARE(ISL29035, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static u16_t isl29035_lux_processed_to_raw(struct sensor_value const *val)
|
||||
{
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
#include <sys/__assert.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(lis2dh);
|
||||
LOG_MODULE_REGISTER(lis2dh, CONFIG_SENSOR_LOG_LEVEL);
|
||||
#include "lis2dh.h"
|
||||
|
||||
#if defined(DT_ST_LIS2DH_BUS_SPI)
|
||||
|
|
|
@ -6,15 +6,14 @@
|
|||
|
||||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#define START_TRIG_INT1 0
|
||||
#define START_TRIG_INT2 1
|
||||
#define TRIGGED_INT1 4
|
||||
#define TRIGGED_INT2 5
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(lis2dh);
|
||||
LOG_MODULE_DECLARE(lis2dh, CONFIG_SENSOR_LOG_LEVEL);
|
||||
#include "lis2dh.h"
|
||||
|
||||
static int lis2dh_trigger_drdy_set(struct device *dev, enum sensor_channel chan,
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
#include "lis2ds12.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LIS2DS12);
|
||||
LOG_MODULE_REGISTER(LIS2DS12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static struct lis2ds12_data lis2ds12_data;
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
static u16_t lis2ds12_i2c_slave_addr = DT_INST_0_ST_LIS2DS12_BASE_ADDRESS;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LIS2DS12);
|
||||
LOG_MODULE_DECLARE(LIS2DS12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lis2ds12_i2c_read_data(struct lis2ds12_data *data, u8_t reg_addr,
|
||||
u8_t *value, u8_t len)
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#define LIS2DS12_SPI_READ (1 << 7)
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LIS2DS12);
|
||||
LOG_MODULE_DECLARE(LIS2DS12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#if defined(DT_INST_0_ST_LIS2DS12_CS_GPIOS_CONTROLLER)
|
||||
static struct spi_cs_control lis2ds12_cs_ctrl;
|
||||
|
|
|
@ -14,12 +14,10 @@
|
|||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "lis2ds12.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(LIS2DS12);
|
||||
LOG_MODULE_DECLARE(LIS2DS12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void lis2ds12_gpio_callback(struct device *dev,
|
||||
struct gpio_callback *cb, u32_t pins)
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
#include "lis2dw12.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LIS2DW12);
|
||||
LOG_MODULE_REGISTER(LIS2DW12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/**
|
||||
* lis2dw12_set_range - set full scale range for acc
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
static u16_t lis2dw12_i2c_slave_addr = DT_INST_0_ST_LIS2DW12_BASE_ADDRESS;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LIS2DW12);
|
||||
LOG_MODULE_DECLARE(LIS2DW12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lis2dw12_i2c_read(struct lis2dw12_data *data, u8_t reg_addr,
|
||||
u8_t *value, u16_t len)
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#define LIS2DW12_SPI_READ (1 << 7)
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LIS2DW12);
|
||||
LOG_MODULE_DECLARE(LIS2DW12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static struct spi_config lis2dw12_spi_conf = {
|
||||
.frequency = DT_INST_0_ST_LIS2DW12_SPI_MAX_FREQUENCY,
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "lis2dw12.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LIS2DW12);
|
||||
LOG_MODULE_DECLARE(LIS2DW12, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/**
|
||||
* lis2dw12_enable_int - enable selected int pin to generate interrupt
|
||||
|
|
|
@ -13,14 +13,12 @@
|
|||
#include <sys/byteorder.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "lis2mdl.h"
|
||||
|
||||
struct lis2mdl_data lis2mdl_data;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(LIS2MDL);
|
||||
LOG_MODULE_REGISTER(LIS2MDL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#ifdef CONFIG_LIS2MDL_MAG_ODR_RUNTIME
|
||||
static int lis2mdl_set_odr(struct device *dev, const struct sensor_value *val)
|
||||
|
|
|
@ -11,12 +11,10 @@
|
|||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <drivers/gpio.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "lis2mdl.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(LIS2MDL);
|
||||
LOG_MODULE_DECLARE(LIS2MDL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lis2mdl_enable_int(struct device *dev, int enable)
|
||||
{
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
|
||||
#include "lis3mdl.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LIS3MDL);
|
||||
LOG_MODULE_REGISTER(LIS3MDL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static void lis3mdl_convert(struct sensor_value *val, s16_t raw_val,
|
||||
u16_t divider)
|
||||
|
|
|
@ -10,12 +10,10 @@
|
|||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "lis3mdl.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(LIS3MDL);
|
||||
LOG_MODULE_DECLARE(LIS3MDL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int lis3mdl_trigger_set(struct device *dev,
|
||||
const struct sensor_trigger *trig,
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#include "lps22hb.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LPS22HB);
|
||||
LOG_MODULE_REGISTER(LPS22HB, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int lps22hb_set_odr_raw(struct device *dev, u8_t odr)
|
||||
{
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include "lps22hh.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LPS22HH);
|
||||
LOG_MODULE_REGISTER(LPS22HH, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int lps22hh_set_odr_raw(struct device *dev, u8_t odr)
|
||||
{
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#ifdef DT_ST_LPS22HH_BUS_I2C
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LPS22HH);
|
||||
LOG_MODULE_DECLARE(LPS22HH, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lps22hh_i2c_read(struct device *dev, u8_t reg_addr,
|
||||
u8_t *value, u16_t len)
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#define LPS22HH_SPI_READ (1 << 7)
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LPS22HH);
|
||||
LOG_MODULE_DECLARE(LPS22HH, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lps22hh_spi_read(struct device *dev, u8_t reg_addr,
|
||||
u8_t *value, u8_t len)
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "lps22hh.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LPS22HH);
|
||||
LOG_MODULE_DECLARE(LPS22HH, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/**
|
||||
* lps22hh_enable_int - enable selected int pin to generate interrupt
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#include "lps25hb.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LPS25HB);
|
||||
LOG_MODULE_REGISTER(LPS25HB, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int lps25hb_power_ctrl(struct device *dev, u8_t value)
|
||||
{
|
||||
|
|
|
@ -7,10 +7,9 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <init.h>
|
||||
#include <drivers/sensor.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(lsm303dlhc_magn);
|
||||
|
||||
LOG_MODULE_REGISTER(lsm303dlhc_magn, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#include "lsm303dlhc_magn.h"
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include "lsm6ds0.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LSM6DS0);
|
||||
LOG_MODULE_REGISTER(LSM6DS0, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int lsm6ds0_reboot(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
#include "lsm6dsl.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LSM6DSL);
|
||||
LOG_MODULE_REGISTER(LSM6DSL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static const u16_t lsm6dsl_odr_map[] = {0, 12, 26, 52, 104, 208, 416, 833,
|
||||
1660, 3330, 6660};
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
static u16_t lsm6dsl_i2c_slave_addr = DT_INST_0_ST_LSM6DSL_BASE_ADDRESS;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LSM6DSL);
|
||||
LOG_MODULE_DECLARE(LSM6DSL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lsm6dsl_i2c_read_data(struct lsm6dsl_data *data, u8_t reg_addr,
|
||||
u8_t *value, u8_t len)
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
|
||||
#include "lsm6dsl.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LSM6DSL);
|
||||
LOG_MODULE_DECLARE(LSM6DSL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#define LSM6DSL_EMBEDDED_SLV0_ADDR 0x02
|
||||
#define LSM6DSL_EMBEDDED_SLV0_SUBADDR 0x03
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#define LSM6DSL_SPI_READ (1 << 7)
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LSM6DSL);
|
||||
LOG_MODULE_DECLARE(LSM6DSL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#if defined(DT_INST_0_ST_LSM6DSL_CS_GPIOS_CONTROLLER)
|
||||
static struct spi_cs_control lsm6dsl_cs_ctrl;
|
||||
|
|
|
@ -10,12 +10,10 @@
|
|||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "lsm6dsl.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(LSM6DSL);
|
||||
LOG_MODULE_DECLARE(LSM6DSL, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int lsm6dsl_trigger_set(struct device *dev,
|
||||
const struct sensor_trigger *trig,
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
#include "lsm6dso.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LSM6DSO);
|
||||
LOG_MODULE_REGISTER(LSM6DSO, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static const u16_t lsm6dso_odr_map[] = {0, 12, 26, 52, 104, 208, 416, 833,
|
||||
1660, 3330, 6660};
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#ifdef DT_ST_LSM6DSO_BUS_I2C
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LSM6DSO);
|
||||
LOG_MODULE_DECLARE(LSM6DSO, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lsm6dso_i2c_read(struct device *dev, u8_t reg_addr,
|
||||
u8_t *value, u8_t len)
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
#include "lsm6dso.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LSM6DSO);
|
||||
LOG_MODULE_DECLARE(LSM6DSO, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#define LSM6DSO_SHUB_DATA_OUT 0x02
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#define LSM6DSO_SPI_READ (1 << 7)
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LSM6DSO);
|
||||
LOG_MODULE_DECLARE(LSM6DSO, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int lsm6dso_spi_read(struct device *dev, u8_t reg_addr,
|
||||
u8_t *value, u8_t len)
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "lsm6dso.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(LSM6DSO);
|
||||
LOG_MODULE_DECLARE(LSM6DSO, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#if defined(CONFIG_LSM6DSO_ENABLE_TEMP)
|
||||
/**
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include "lsm9ds0_gyro.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LSM9DS0_GYRO);
|
||||
LOG_MODULE_REGISTER(LSM9DS0_GYRO, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int lsm9ds0_gyro_power_ctrl(struct device *dev, int power,
|
||||
int x_en, int y_en, int z_en)
|
||||
|
|
|
@ -11,16 +11,14 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/__assert.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include <drivers/gpio.h>
|
||||
|
||||
#include "lsm9ds0_gyro.h"
|
||||
|
||||
extern struct lsm9ds0_gyro_data lsm9ds0_gyro_data;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(LSM9DS0_GYRO);
|
||||
LOG_MODULE_DECLARE(LSM9DS0_GYRO, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int lsm9ds0_gyro_trigger_set(struct device *dev,
|
||||
const struct sensor_trigger *trig,
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
#include "lsm9ds0_mfd.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(LSM9DS0_MFD);
|
||||
LOG_MODULE_REGISTER(LSM9DS0_MFD, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int lsm9ds0_mfd_reboot_memory(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
#include "max30101.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(MAX30101);
|
||||
LOG_MODULE_REGISTER(MAX30101, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int max30101_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
|
||||
#include "max44009.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(MAX44009);
|
||||
LOG_MODULE_REGISTER(MAX44009, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int max44009_reg_read(struct max44009_data *drv_data, u8_t reg,
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#include "mcp9808.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(MCP9808);
|
||||
LOG_MODULE_REGISTER(MCP9808, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int mcp9808_reg_read(struct mcp9808_data *data, u8_t reg, u16_t *val)
|
||||
{
|
||||
|
|
|
@ -11,12 +11,10 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/__assert.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "mcp9808.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(MCP9808);
|
||||
LOG_MODULE_DECLARE(MCP9808, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int mcp9808_reg_write(struct mcp9808_data *data, u8_t reg, u16_t val)
|
||||
{
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
|
||||
#include "mpu6050.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(MPU6050);
|
||||
LOG_MODULE_REGISTER(MPU6050, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/* see "Accelerometer Measurements" section from register map description */
|
||||
static void mpu6050_convert_accel(struct sensor_value *val, s16_t raw_val,
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
#include <sys/util.h>
|
||||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
#include "mpu6050.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(MPU6050);
|
||||
LOG_MODULE_DECLARE(MPU6050, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int mpu6050_trigger_set(struct device *dev,
|
||||
const struct sensor_trigger *trig,
|
||||
|
|
|
@ -10,12 +10,11 @@
|
|||
#include <sys/byteorder.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <sys/__assert.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#include "ms5837.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(MS5837);
|
||||
LOG_MODULE_REGISTER(MS5837, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int ms5837_get_measurement(struct device *i2c_master,
|
||||
const u8_t i2c_address, u32_t *val,
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
#include <drivers/uart.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(PMS7003);
|
||||
LOG_MODULE_REGISTER(PMS7003, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/* wait serial output with 1000ms timeout */
|
||||
#define CFG_PMS7003_SERIAL_TIMEOUT 1000
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
#include <nrfx_qdec.h>
|
||||
#include <hal/nrf_gpio.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(qdec_nrfx);
|
||||
LOG_MODULE_REGISTER(qdec_nrfx, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
|
||||
#define FULL_ANGLE 360
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
|
||||
#include "sht3xd.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(SHT3XD);
|
||||
LOG_MODULE_REGISTER(SHT3XD, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#ifdef CONFIG_SHT3XD_SINGLE_SHOT_MODE
|
||||
static const u16_t measure_cmd[3] = {
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
#include "sht3xd.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(SHT3XD);
|
||||
LOG_MODULE_DECLARE(SHT3XD, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static u16_t sht3xd_temp_processed_to_raw(const struct sensor_value *val)
|
||||
{
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include "stts751.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(STTS751);
|
||||
LOG_MODULE_REGISTER(STTS751, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline int stts751_set_odr_raw(struct device *dev, u8_t odr)
|
||||
{
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#ifdef DT_ST_STTS751_BUS_I2C
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(STTS751);
|
||||
LOG_MODULE_DECLARE(STTS751, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int stts751_i2c_read(struct device *dev, u8_t reg_addr,
|
||||
u8_t *value, u16_t len)
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "stts751.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(STTS751);
|
||||
LOG_MODULE_DECLARE(STTS751, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/**
|
||||
* stts751_enable_int - enable selected int pin to generate interrupt
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include "sx9500.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(SX9500);
|
||||
LOG_MODULE_REGISTER(SX9500, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static u8_t sx9500_reg_defaults[] = {
|
||||
/*
|
||||
|
|
|
@ -14,9 +14,8 @@
|
|||
|
||||
#include "sx9500.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(SX9500);
|
||||
LOG_MODULE_DECLARE(SX9500, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#ifdef CONFIG_SX9500_TRIGGER_OWN_THREAD
|
||||
static K_THREAD_STACK_DEFINE(sx9500_thread_stack, CONFIG_SX9500_THREAD_STACK_SIZE);
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "th02.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(TH02);
|
||||
LOG_MODULE_REGISTER(TH02, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static u8_t read8(struct device *dev, u8_t d)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
#include "ti_hdc.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(TI_HDC);
|
||||
LOG_MODULE_REGISTER(TI_HDC, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#if defined(DT_INST_0_TI_HDC_DRDY_GPIOS_CONTROLLER)
|
||||
static void ti_hdc_gpio_callback(struct device *dev,
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#include "tmp007.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(TMP007);
|
||||
LOG_MODULE_REGISTER(TMP007, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int tmp007_reg_read(struct tmp007_data *drv_data, u8_t reg, u16_t *val)
|
||||
{
|
||||
|
|
|
@ -14,9 +14,8 @@
|
|||
|
||||
extern struct tmp007_data tmp007_driver;
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(TMP007);
|
||||
LOG_MODULE_DECLARE(TMP007, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
int tmp007_attr_set(struct device *dev,
|
||||
enum sensor_channel chan,
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
#include <sys/__assert.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(TMP112);
|
||||
LOG_MODULE_REGISTER(TMP112, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
#define TMP112_I2C_ADDRESS CONFIG_TMP112_I2C_ADDR
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
#include "vl53l0x_api.h"
|
||||
#include "vl53l0x_platform.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(VL53L0X);
|
||||
LOG_MODULE_REGISTER(VL53L0X, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
/* All the values used in this driver are coming from ST datasheet and examples.
|
||||
* It can be found here:
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||
LOG_MODULE_DECLARE(VL53L0X);
|
||||
LOG_MODULE_DECLARE(VL53L0X, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
VL53L0X_Error VL53L0X_WriteMulti(VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata,
|
||||
uint32_t count)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue