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:
parent
232b8eb2a5
commit
13942225eb
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Koen Zandberg <koen@bergzand.net>
|
* 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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -14,6 +15,7 @@
|
|||||||
* @brief Default configuration for jc42
|
* @brief Default configuration for jc42
|
||||||
*
|
*
|
||||||
* @author Koen Zandberg <koen@bergzand.net>
|
* @author Koen Zandberg <koen@bergzand.net>
|
||||||
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef JC42_PARAMS_H
|
#ifndef JC42_PARAMS_H
|
||||||
@ -31,7 +33,7 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#ifndef JC42_PARAM_I2C_DEV
|
#ifndef JC42_PARAM_I2C_DEV
|
||||||
#define JC42_PARAM_I2C_DEV (0)
|
#define JC42_PARAM_I2C_DEV I2C_DEV(0)
|
||||||
#endif
|
#endif
|
||||||
#ifndef JC42_PARAM_ADDR
|
#ifndef JC42_PARAM_ADDR
|
||||||
#define JC42_PARAM_ADDR (0x18)
|
#define JC42_PARAM_ADDR (0x18)
|
||||||
@ -40,9 +42,9 @@ extern "C" {
|
|||||||
#define JC42_PARAM_SPEED I2C_SPEED_FAST
|
#define JC42_PARAM_SPEED I2C_SPEED_FAST
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define JC42_PARAMS_DEFAULT {.i2c = JC42_PARAM_I2C_DEV, \
|
#define JC42_PARAMS_DEFAULT { .i2c = JC42_PARAM_I2C_DEV, \
|
||||||
.speed = JC42_PARAM_SPEED, \
|
.speed = JC42_PARAM_SPEED, \
|
||||||
.addr = JC42_PARAM_ADDR }
|
.addr = JC42_PARAM_ADDR }
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,6 +59,14 @@ static const jc42_params_t jc42_params[] =
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configure SAUL registry entries
|
||||||
|
*/
|
||||||
|
static const saul_reg_info_t jc42_saul_reg_info[] =
|
||||||
|
{
|
||||||
|
{ .name= "jc42" }
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -48,17 +48,6 @@ static saul_reg_t saul_entries[JC42_NUMOF];
|
|||||||
extern const saul_driver_t jc42_temperature_saul_driver;
|
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)
|
void auto_init_jc42(void)
|
||||||
{
|
{
|
||||||
for (unsigned i = 0; i < JC42_NUMOF; i++) {
|
for (unsigned i = 0; i < JC42_NUMOF; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user