mirror of
https://github.com/Lurkars/esp-ena.git
synced 2026-05-08 20:10:37 +02:00
added dependable build for interface choice in menuconfig
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
menu "I²C"
|
||||
|
||||
config I2C_SDA_PIN
|
||||
int "I²C sda pin"
|
||||
default 21
|
||||
|
||||
config I2C_SCL_PIN
|
||||
int "I²C scl pin"
|
||||
default 22
|
||||
|
||||
config I2C_CLOCKSPEED
|
||||
int "I²C clock speed"
|
||||
default 1000000
|
||||
|
||||
endmenu
|
||||
@@ -20,9 +20,14 @@
|
||||
#ifndef _i2c_main_H_
|
||||
#define _i2c_main_H_
|
||||
|
||||
#if defined(CONFIG_ENA_INTERFACE_CUSTOM)
|
||||
#define I2C_SDA_PIN (CONFIG_I2C_SDA_PIN)
|
||||
#define I2C_SCL_PIN (CONFIG_I2C_SCL_PIN)
|
||||
#define I2C_CLK_SPEED (CONFIG_I2C_CLOCKSPEED)
|
||||
#else
|
||||
#define I2C_SDA_PIN 21
|
||||
#define I2C_SCL_PIN 22
|
||||
#endif
|
||||
#define I2C_CLK_SPEED (1000000)
|
||||
|
||||
/**
|
||||
* @brief initialize main I2C interface
|
||||
|
||||
Reference in New Issue
Block a user