это мой код mpu9150
int main(void)
{
my_putstr("\nhello\n");
my_put_int(i2c_master_write_simple(MPU9150_ADDRESS,MPU9150_SLEEP_CONFIG,0));
my_putchar('\n');
my_put_int(i2c_master_write_simple(MPU9150_ADDRESS,MPU9150_USER_CONTROL,0x00));//disable i2c master
my_putchar('\n');
my_put_int(i2c_master_write_simple(MPU9150_ADDRESS,MPU9150_USER_CONTROL,0x02));//enable i2c aux
my_putchar('\n');
my_put_int(i2c_master_write_simple(0x0F,MPU9150_MAGNO_CNTRL,0x01));//single
my_putchar('\n');
my_put_int(i2c_master_read_simple_1Byte(0x0F,0));//single
//IntcLowLevelExample(INTC_BASEADDR);
my_put_int(i2c_master_read_simple_1Byte(i,0));//single
delay_ms(10);
while(1){
}
return 0;
}
, как вы можете видеть. Сначала я включаю mpu9150, затем отключаю мастер i2c, затем включаю режим обхода, а затем пишу на компас, но на компасничего не посылает мне обратно, даже не знаю, что мне делать?мой i2c lib полностью протестирован и все нормально