mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 03:23:34 +08:00
Working motors and mtd for CF2
This commit is contained in:
committed by
Lorenz Meier
parent
b65ff53b00
commit
9c8e56401b
@@ -80,10 +80,15 @@ int mtd_main(int argc, char *argv[])
|
||||
static void ramtron_attach(void);
|
||||
#else
|
||||
|
||||
#ifndef PX4_I2C_BUS_ONBOARD
|
||||
# error PX4_I2C_BUS_ONBOARD not defined, cannot locate onboard EEPROM
|
||||
#ifndef PX4_I2C_BUS_MTD
|
||||
# ifdef PX4_I2C_BUS_ONBOARD
|
||||
# define PX4_I2C_BUS_MTD PX4_I2C_BUS_ONBOARD
|
||||
# else
|
||||
# error PX4_I2C_BUS_MTD and PX4_I2C_BUS_ONBOARD not defined, cannot locate onboard EEPROM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
static void at24xxx_attach(void);
|
||||
#endif
|
||||
static void mtd_start(char *partition_names[], unsigned n_partitions);
|
||||
@@ -225,7 +230,7 @@ static void
|
||||
at24xxx_attach(void)
|
||||
{
|
||||
/* find the right I2C */
|
||||
struct i2c_dev_s *i2c = px4_i2cbus_initialize(PX4_I2C_BUS_ONBOARD);
|
||||
struct i2c_dev_s *i2c = px4_i2cbus_initialize(PX4_I2C_BUS_MTD);
|
||||
/* this resets the I2C bus, set correct bus speed again */
|
||||
I2C_SETFREQUENCY(i2c, 400000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user