mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
"addr" field of I2C transaction struct now takes real I2C address, and not address that is pre-shifted to accommodate the R/W bit
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1321 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
93295154d6
commit
b46bc68e96
@ -962,7 +962,7 @@ static void Task(void* parameters)
|
||||
{
|
||||
const struct pios_i2c_txn txn_list[] = {
|
||||
{
|
||||
.addr = 0x30<<1,
|
||||
.addr = 0x30,
|
||||
.rw = PIOS_I2C_TXN_WRITE,
|
||||
.len = sizeof(msg),
|
||||
.buf = msg,
|
||||
|
@ -338,7 +338,7 @@ static void go_r_any_txn_addr (struct pios_i2c_adapter * i2c_adapter)
|
||||
|
||||
PIOS_DEBUG_Assert(i2c_adapter->active_txn->rw == PIOS_I2C_TXN_READ);
|
||||
|
||||
I2C_Send7bitAddress(i2c_adapter->cfg->regs, i2c_adapter->active_txn->addr, I2C_Direction_Receiver);
|
||||
I2C_Send7bitAddress(i2c_adapter->cfg->regs, (i2c_adapter->active_txn->addr)<<1, I2C_Direction_Receiver);
|
||||
}
|
||||
|
||||
static void go_r_more_txn_pre_one (struct pios_i2c_adapter * i2c_adapter)
|
||||
@ -436,7 +436,7 @@ static void go_w_any_txn_addr (struct pios_i2c_adapter * i2c_adapter)
|
||||
|
||||
PIOS_DEBUG_Assert(i2c_adapter->active_txn->rw == PIOS_I2C_TXN_WRITE);
|
||||
|
||||
I2C_Send7bitAddress(i2c_adapter->cfg->regs, i2c_adapter->active_txn->addr, I2C_Direction_Transmitter);
|
||||
I2C_Send7bitAddress(i2c_adapter->cfg->regs, (i2c_adapter->active_txn->addr)<<1, I2C_Direction_Transmitter);
|
||||
}
|
||||
|
||||
static void go_w_any_txn_middle (struct pios_i2c_adapter * i2c_adapter)
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define PIOS_BMP085_H
|
||||
|
||||
/* BMP085 Addresses */
|
||||
#define BMP085_I2C_ADDR 0xEE
|
||||
#define BMP085_I2C_ADDR 0x77
|
||||
#define BMP085_CALIB_ADDR 0xAA
|
||||
#define BMP085_CALIB_LEN 22
|
||||
#define BMP085_CTRL_ADDR 0xF4
|
||||
|
Loading…
Reference in New Issue
Block a user