drivers/lpsxxx : Expose to Kconfig
Expose configurations to Kconfig and update documentation.
This commit is contained in:
parent
db7ca7eed9
commit
a084383baf
@ -16,6 +16,7 @@ menu "Sensor Device Drivers"
|
|||||||
rsource "ads101x/Kconfig"
|
rsource "ads101x/Kconfig"
|
||||||
rsource "fxos8700/Kconfig"
|
rsource "fxos8700/Kconfig"
|
||||||
rsource "hdc1000/Kconfig"
|
rsource "hdc1000/Kconfig"
|
||||||
|
rsource "lpsxxx/Kconfig"
|
||||||
rsource "mag3110/Kconfig"
|
rsource "mag3110/Kconfig"
|
||||||
rsource "mma8x5x/Kconfig"
|
rsource "mma8x5x/Kconfig"
|
||||||
rsource "opt3001/Kconfig"
|
rsource "opt3001/Kconfig"
|
||||||
|
|||||||
@ -44,9 +44,10 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @brief The sensors default I2C address
|
* @brief The sensors default I2C address
|
||||||
*
|
*
|
||||||
* Default address corresponds to SDO/SA0 pad connected to ground. If SDO/SA0
|
* The address depends on the status of SDO/SA0 Pin. Default
|
||||||
* pad is connected to power supply, I2C address is 0x5C.
|
* address corresponds to SDO/SA0 connected to VDD. For more
|
||||||
* Refer to 'I2C Operation' section on the datasheet
|
* information refer to the section 'I2C operation' in the
|
||||||
|
* datasheet.
|
||||||
*/
|
*/
|
||||||
#ifndef CONFIG_LPSXXX_DEFAULT_ADDRESS
|
#ifndef CONFIG_LPSXXX_DEFAULT_ADDRESS
|
||||||
#define CONFIG_LPSXXX_DEFAULT_ADDRESS (0x5d)
|
#define CONFIG_LPSXXX_DEFAULT_ADDRESS (0x5d)
|
||||||
|
|||||||
25
drivers/lpsxxx/Kconfig
Normal file
25
drivers/lpsxxx/Kconfig
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# 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_LPSXXX
|
||||||
|
bool "Configure LPSXXX driver"
|
||||||
|
depends on MODULE_LPSXXX
|
||||||
|
help
|
||||||
|
Configure the LPSXXX driver using Kconfig.
|
||||||
|
|
||||||
|
if KCONFIG_MODULE_LPSXXX
|
||||||
|
|
||||||
|
config LPSXXX_DEFAULT_ADDRESS
|
||||||
|
hex "Default I2C address"
|
||||||
|
range 0x5c 0x5d
|
||||||
|
default 0x5d
|
||||||
|
help
|
||||||
|
The address depends on the status of SDO/SA0 Pin. Default
|
||||||
|
address corresponds to SDO/SA0 connected to VDD. For more
|
||||||
|
information refer to the section 'I2C operation' in the
|
||||||
|
datasheet.
|
||||||
|
|
||||||
|
endif # KCONFIG_MODULE_LPSXXX
|
||||||
Loading…
x
Reference in New Issue
Block a user