Merge pull request #13980 from akshaim/Kconfig_tcs37727
drivers/tcs37727 : Expose Configurations to Kconfig
This commit is contained in:
commit
e272cc920b
@ -25,6 +25,7 @@ rsource "mag3110/Kconfig"
|
|||||||
rsource "mma8x5x/Kconfig"
|
rsource "mma8x5x/Kconfig"
|
||||||
rsource "opt3001/Kconfig"
|
rsource "opt3001/Kconfig"
|
||||||
rsource "sps30/Kconfig"
|
rsource "sps30/Kconfig"
|
||||||
|
rsource "tcs37727/Kconfig"
|
||||||
endmenu # Sensor Device Drivers
|
endmenu # Sensor Device Drivers
|
||||||
|
|
||||||
menu "Storage Device Drivers"
|
menu "Storage Device Drivers"
|
||||||
|
|||||||
@ -47,10 +47,14 @@ extern "C"
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Default RGBC integration time.
|
* @brief Default RGBC integration time in microseconds.
|
||||||
|
*
|
||||||
|
* RGBC integration time impacts both the resolution and the sensitivity of the
|
||||||
|
* RGBC reading. Refer to the section "RGBC Time Register" in the datasheet for
|
||||||
|
* more information.
|
||||||
*/
|
*/
|
||||||
#ifndef TCS37727_ATIME_DEFAULT
|
#ifndef CONFIG_TCS37727_ATIME_DEFAULT
|
||||||
#define TCS37727_ATIME_DEFAULT 200000
|
#define CONFIG_TCS37727_ATIME_DEFAULT 200000
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|||||||
24
drivers/tcs37727/Kconfig
Normal file
24
drivers/tcs37727/Kconfig
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright (c) 2020 Freie Universitaet 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
|
||||||
|
# directory for more details.
|
||||||
|
#
|
||||||
|
menuconfig KCONFIG_MODULE_TCS37727
|
||||||
|
bool "Configure TCS37727 driver"
|
||||||
|
depends on MODULE_TCS37727
|
||||||
|
help
|
||||||
|
Configure the TCS37727 driver using Kconfig.
|
||||||
|
|
||||||
|
if KCONFIG_MODULE_TCS37727
|
||||||
|
|
||||||
|
config TCS37727_ATIME_DEFAULT
|
||||||
|
int "RGBC integration time in microseconds"
|
||||||
|
range 2400 614000
|
||||||
|
default 200000
|
||||||
|
help
|
||||||
|
RGBC integration time impacts both the resolution and the sensitivity
|
||||||
|
of the RGBC reading. Refer to the section "RGBC Time Register" in the
|
||||||
|
datasheet for more information.
|
||||||
|
|
||||||
|
endif # KCONFIG_MODULE_TCS37727
|
||||||
@ -38,7 +38,7 @@ extern "C" {
|
|||||||
#define TCS37727_PARAM_ADDR (TCS37727_I2C_ADDRESS)
|
#define TCS37727_PARAM_ADDR (TCS37727_I2C_ADDRESS)
|
||||||
#endif
|
#endif
|
||||||
#ifndef TCS37727_PARAM_ATIME
|
#ifndef TCS37727_PARAM_ATIME
|
||||||
#define TCS37727_PARAM_ATIME (TCS37727_ATIME_DEFAULT)
|
#define TCS37727_PARAM_ATIME (CONFIG_TCS37727_ATIME_DEFAULT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TCS37727_PARAMS
|
#ifndef TCS37727_PARAMS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user