Skip to content

Commit fceedc2

Browse files
FluffyFTWkammce
authored andcommitted
fixed lpx40xx i2c pin functions and pin
1 parent 3e8882e commit fceedc2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/peripherals/lpc40xx/i2c.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ inline I2c & GetI2c()
392392
// UM10562: Chapter 7: LPC408x/407x I/O configuration page 13
393393
if constexpr (port == 0)
394394
{
395-
static auto & i2c0_sda_pin = GetPin<0, 0>();
396-
static auto & i2c0_scl_pin = GetPin<0, 1>();
395+
static auto & i2c0_sda_pin = GetPin<1, 30>();
396+
static auto & i2c0_scl_pin = GetPin<1, 31>();
397397
static I2c::Transaction_t transaction_i2c0;
398398
/// Definition for I2C bus 0 for LPC40xx.
399399
static const I2c::Port_t kI2c0 = {
@@ -403,16 +403,16 @@ inline I2c & GetI2c()
403403
.transaction = transaction_i2c0,
404404
.sda_pin = i2c0_sda_pin,
405405
.scl_pin = i2c0_scl_pin,
406-
.pin_function = 0b010,
406+
.pin_function = 0b100,
407407
};
408408

409409
static I2c i2c0(kI2c0);
410410
return i2c0;
411411
}
412412
else if constexpr (port == 1)
413413
{
414-
static auto & i2c1_sda_pin = GetPin<1, 30>();
415-
static auto & i2c1_scl_pin = GetPin<1, 31>();
414+
static auto & i2c1_sda_pin = GetPin<0, 0>();
415+
static auto & i2c1_scl_pin = GetPin<0, 1>();
416416
static I2c::Transaction_t transaction_i2c1;
417417
/// Definition for I2C bus 1 for LPC40xx.
418418
static const I2c::Port_t kI2c1 = {

0 commit comments

Comments
 (0)