hello. Yes. I finished sensor init and then called func to get parameters. I use this code : bhy_driver_init(&bhy_fw); semTake(imuSem,WAIT_FOREVER); if(bhy_install_sensor_callback(VS_TYPE_GYROSCOPE, VS_WAKEUP, sensors_callback)) { DEBUG("Fail to install VS_TYPE_GYROSCOPE callback\n"); return; } /* enables the virtual sensors : */ if (bhy_enable_virtual_sensor(VS_TYPE_GYROSCOPE, VS_WAKEUP, sample_range, 0, VS_FLUSH_NONE, 0, 0/*dynamic_range*/)) { DEBUG("==========================Fail to enable sensor id=%d==================================\n", VS_TYPE_GYROSCOPE); return; } if (!( bhy_get_physical_sensor_status(&accel_status, &gyro_status, &mag_status))) { dynamic_range = gyro_status.gyro_dynamic_range; DEBUG("read dynamic_range. value is : %d \n",dynamic_range); } else DEBUG("error read dynamic_range. \n"); while(1) { semTake(imuSem,WAIT_FOREVER); /*while (!ioport_get_pin_level(BHY_INT) && !bytes_remaining);*/ bhy_read_fifo(fifo + bytes_left_in_fifo, FIFO_SIZE - bytes_left_in_fifo, &bytes_read, &bytes_remaining); ...... thanks.
... View more