Skip to content

Commit

Permalink
drivers/isl29020 : Expose to Kconfig
Browse files Browse the repository at this point in the history
Expose configurations to Kconfig.
  • Loading branch information
akshaim committed May 8, 2020
1 parent f01bbd3 commit db96ebc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rsource "ads101x/Kconfig"
rsource "bmx055/Kconfig"
rsource "fxos8700/Kconfig"
rsource "hdc1000/Kconfig"
rsource "isl29020/Kconfig"
rsource "l3g4200d/Kconfig"
rsource "lpsxxx/Kconfig"
rsource "mag3110/Kconfig"
Expand Down
7 changes: 3 additions & 4 deletions drivers/include/isl29020.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ extern "C" {
/**
* @brief Default address
*
* The address depends on the status of A0 Pin.
* Default address corresponds to A0 connected to GND.
* For more information on SerialBus Address, refer Section I2C
* Interface on Page 3 of datasheet.
* The address depends on the status of A0 Pin. Default address corresponds to
* A0 connected to GND. For more information refer to the section 'I2C
* Interface' in the datasheet.
*/
#ifndef CONFIG_ISL29020_DEFAULT_ADDRESS
#define CONFIG_ISL29020_DEFAULT_ADDRESS 0x44
Expand Down
24 changes: 24 additions & 0 deletions drivers/isl29020/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_ISL29020
bool "Configure ISL29020 driver"
depends on MODULE_ISL29020
help
Configure the ISL29020 driver using Kconfig.

if KCONFIG_MODULE_ISL29020

config ISL29020_DEFAULT_ADDRESS
hex "Default I2C address"
range 0x44 0x45
default 0x44
help
The address depends on the status of A0 Pin. Default address
corresponds to A0 connected to GND. For more information refer to the
section 'I2C Interface' in the datasheet.

endif # KCONFIG_MODULE_ISL29020

0 comments on commit db96ebc

Please sign in to comment.