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>
This commit is contained in:
committed by
KevinOConnor
parent
39f08aeda1
commit
08a85ba869
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user