diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-12-25 18:35:52 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-12-25 18:35:52 +0100 |
commit | bc9d07a4d4acd1e612c1bb509372e40e60cd4d8d (patch) | |
tree | cbe96c43adb3814ec2d0f3b2781977ae62433a93 | |
parent | 536430357852402390e6d44115bd997b8cb7dc42 (diff) |
Configure SoftI2C SDA/SCL via kconfig only; remove external pull-up support
-rw-r--r-- | src/driver/Kconfig | 16 | ||||
-rw-r--r-- | src/driver/soft_i2c.cc | 22 |
2 files changed, 1 insertions, 37 deletions
diff --git a/src/driver/Kconfig b/src/driver/Kconfig index 5fe4bad..457b6e3 100644 --- a/src/driver/Kconfig +++ b/src/driver/Kconfig @@ -129,10 +129,6 @@ select meta_driver_i2c endmenu -config driver_softi2c_name -string "Instance Name" -default "i2c" - config driver_softi2c_scl string "SCL Pin" default "pc5" if arch_arduino_nano @@ -162,16 +158,4 @@ bool "Internal Dynamic Pull-Up" help Internal Pull-Up, disabled when transmitting LOW -config driver_softi2c_pullup_dynamic_external -bool "GPIO Dynamic Pull-Up" -depends on arch_msp430fr5969lp || arch_msp430fr5994lp -help - Pull-Up resistors connected to GPIO, disabled when transmitting LOW - -config driver_softi2c_pullup_external -bool "GPIO Static Pull-Up" -depends on arch_msp430fr5969lp || arch_msp430fr5994lp -help - Pull-Up resistors connected to GPIO, always on - endchoice diff --git a/src/driver/soft_i2c.cc b/src/driver/soft_i2c.cc index ada0481..ac4163d 100644 --- a/src/driver/soft_i2c.cc +++ b/src/driver/soft_i2c.cc @@ -237,26 +237,6 @@ ON_TIMER_INTERRUPT_tail #ifndef DRIVER_HARDWARE_I2C -#if CONFIG_driver_softi2c_pullup_dynamic_external -#ifdef MULTIPASS_ARCH_msp430fr5969lp -SoftI2C i2c(GPIO::p1_6, GPIO::p1_7, GPIO::p1_4, GPIO::p1_5); -#elif MULTIPASS_ARCH_msp430fr5994lp -SoftI2C i2c(GPIO::p5_0, GPIO::p5_1, GPIO::p8_2, GPIO::p8_3); -#else -#error "softi2c_pullup = external not supported on this architecture" -#endif /* MULTIPASS_ARCH_* */ -#else -#if MULTIPASS_ARCH_arduino_nano -SoftI2C i2c(GPIO::pc4, GPIO::pc5); -#elif MULTIPASS_ARCH_blinkenrocket -SoftI2C i2c(GPIO::pc4, GPIO::pc5); -#elif MULTIPASS_ARCH_msp430fr5969lp -SoftI2C i2c(GPIO::p1_6, GPIO::p1_7); -#elif MULTIPASS_ARCH_msp430fr5994lp -SoftI2C i2c(GPIO::p5_0, GPIO::p5_1); -#elif MULTIPASS_ARCH_posix -SoftI2C i2c(GPIO::px00, GPIO::px01); -#endif /* MULTIPASS_ARCH_* */ -#endif /* !CONFIG_driver_softi2c_pullup_dynamic_external */ +SoftI2C i2c(GPIO::CONFIG_driver_softi2c_sda, GPIO::CONFIG_driver_softi2c_scl); #endif /* !DRIVER_HARDWARE_I2C */ |