diff options
author | Timofey Titovets <nefelim4ag@gmail.com> | 2024-09-13 22:02:05 +0200 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2024-10-26 22:06:30 -0400 |
commit | 08a85ba869c3232ca7063c737c238ca41e20885e (patch) | |
tree | 85f6db1bf9f85a6957bacd525ec336e58408fe0d /src/sensor_ldc1612.c | |
parent | 39f08aeda184c5dcf257f88f66b3173f9593f1b7 (diff) | |
download | kutter-08a85ba869c3232ca7063c737c238ca41e20885e.tar.gz kutter-08a85ba869c3232ca7063c737c238ca41e20885e.tar.xz kutter-08a85ba869c3232ca7063c737c238ca41e20885e.zip |
i2ccmds: abstract i2c dev from bus implementation
Added wrapper around sw/hw bus API,
pins.py code will ensure that pins will not mix
between HW/SW buses.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Diffstat (limited to 'src/sensor_ldc1612.c')
-rw-r--r-- | src/sensor_ldc1612.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sensor_ldc1612.c b/src/sensor_ldc1612.c index 45e8b84e..28c0bed5 100644 --- a/src/sensor_ldc1612.c +++ b/src/sensor_ldc1612.c @@ -7,7 +7,6 @@ #include <string.h> // memcpy #include "basecmd.h" // oid_alloc -#include "board/gpio.h" // i2c_read #include "board/irq.h" // irq_disable #include "board/misc.h" // timer_read_time #include "command.h" // DECL_COMMAND @@ -147,7 +146,7 @@ check_home(struct ldc1612 *ld, uint32_t data) static void read_reg(struct ldc1612 *ld, uint8_t reg, uint8_t *res) { - i2c_read(ld->i2c->i2c_config, sizeof(reg), ®, 2, res); + i2c_dev_read(ld->i2c, sizeof(reg), ®, 2, res); } // Read the status register on the ldc1612 |