Skip to content

Commit

Permalink
drivers/tcs37727 : Expose to Kconfig
Browse files Browse the repository at this point in the history
Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
  • Loading branch information
akshaim and leandrolanzieri committed May 7, 2020
1 parent 04bdd40 commit b4a23b8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rsource "mag3110/Kconfig"
rsource "mma8x5x/Kconfig"
rsource "opt3001/Kconfig"
rsource "sps30/Kconfig"
rsource "tcs37727/Kconfig"
endmenu # Sensor Device Drivers

menu "Storage Device Drivers"
Expand Down
4 changes: 3 additions & 1 deletion drivers/include/tcs37727.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ extern "C"
/**
* @brief Default RGBC integration time in microseconds.
*
* Refer section "RGBC Time Register" in datasheet for more information.
* 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 CONFIG_TCS37727_ATIME_DEFAULT
#define CONFIG_TCS37727_ATIME_DEFAULT 200000
Expand Down
24 changes: 24 additions & 0 deletions drivers/tcs37727/Kconfig
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b4a23b8

Please sign in to comment.