1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/jc42: move SAUL config to params.h

This commit is contained in:
Hauke Petersen 2017-01-17 11:34:55 +01:00
parent 232b8eb2a5
commit 13942225eb
2 changed files with 14 additions and 15 deletions

View File

@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Koen Zandberg <koen@bergzand.net>
* 2017 Freie Universität Berlin
*
* 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
@ -14,6 +15,7 @@
* @brief Default configuration for jc42
*
* @author Koen Zandberg <koen@bergzand.net>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#ifndef JC42_PARAMS_H
@ -31,7 +33,7 @@ extern "C" {
* @{
*/
#ifndef JC42_PARAM_I2C_DEV
#define JC42_PARAM_I2C_DEV (0)
#define JC42_PARAM_I2C_DEV I2C_DEV(0)
#endif
#ifndef JC42_PARAM_ADDR
#define JC42_PARAM_ADDR (0x18)
@ -40,9 +42,9 @@ extern "C" {
#define JC42_PARAM_SPEED I2C_SPEED_FAST
#endif
#define JC42_PARAMS_DEFAULT {.i2c = JC42_PARAM_I2C_DEV, \
.speed = JC42_PARAM_SPEED, \
.addr = JC42_PARAM_ADDR }
#define JC42_PARAMS_DEFAULT { .i2c = JC42_PARAM_I2C_DEV, \
.speed = JC42_PARAM_SPEED, \
.addr = JC42_PARAM_ADDR }
/**@}*/
/**
@ -57,6 +59,14 @@ static const jc42_params_t jc42_params[] =
#endif
};
/**
* @brief Configure SAUL registry entries
*/
static const saul_reg_info_t jc42_saul_reg_info[] =
{
{ .name= "jc42" }
};
#ifdef __cplusplus
}
#endif

View File

@ -48,17 +48,6 @@ static saul_reg_t saul_entries[JC42_NUMOF];
extern const saul_driver_t jc42_temperature_saul_driver;
/** @} */
/**
* @brief Allocate and configure entries to the SAUL registry
*/
saul_reg_t jc42_saul_reg_info[]=
{
{
.name= "jc42",
.driver = &jc42_temperature_saul_driver
}
};
void auto_init_jc42(void)
{
for (unsigned i = 0; i < JC42_NUMOF; i++) {