Icm20948SelfTest.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * ________________________________________________________________________________________________________
  3. * Copyright © 2014-2015 InvenSense Inc. Portions Copyright © 2014-2015 Movea. All rights reserved.
  4. * This software, related documentation and any modifications thereto (collectively “Software”) is subject
  5. * to InvenSense and its licensors' intellectual property rights under U.S. and international copyright and
  6. * other intellectual property rights laws.
  7. * InvenSense and its licensors retain all intellectual property and proprietary rights in and to the Software
  8. * and any use, reproduction, disclosure or distribution of the Software without an express license
  9. * agreement from InvenSense is strictly prohibited.
  10. * ________________________________________________________________________________________________________
  11. */
  12. #ifndef INV_ICM20948_EMS_SELF_TEST_H__
  13. #define INV_ICM20948_EMS_SELF_TEST_H__
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define INV_ICM20948_GYR_SELF_TEST_OK (0x01 << 0)
  18. #define INV_ICM20948_ACC_SELF_TEST_OK (0x01 << 1)
  19. #define INV_ICM20948_MAG_SELF_TEST_OK (0x01 << 2)
  20. #define INV_ICM20948_SELF_TEST_OK ( INV_ICM20948_GYR_SELF_TEST_OK | \
  21. INV_ICM20948_ACC_SELF_TEST_OK | \
  22. INV_ICM20948_MAG_SELF_TEST_OK )
  23. /* forward declaration */
  24. struct inv_icm20948;
  25. /**
  26. * @brief Perform hardware self-test for Accel, Gyro and Compass.
  27. * @param[in] None
  28. * @return COMPASS_SUCESS<<2 | ACCEL_SUCCESS<<1 | GYRO_SUCCESS so 7 if all devices pass the self-test.
  29. */
  30. int INV_EXPORT inv_icm20948_run_selftest(struct inv_icm20948 * s, int gyro_bias_regular[], int accel_bias_regular[]);
  31. void INV_EXPORT inv_icm20948_set_offset(struct inv_icm20948 * s, int raw_bias[]);
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif // INV_v_EMS_SELF_TEST_H__