| ICM42370P eMD Driver 2.2.7 Documentation of the eMD Driver API

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

inv_imu_selftest.h
Go to the documentation of this file.
1 /*
2 * ________________________________________________________________________________________________________
3 * Copyright (c) 2015-2015 InvenSense Inc. All rights reserved.
4 *
5 * This software, related documentation and any modifications thereto (collectively "Software") is subject
6 * to InvenSense and its licensors' intellectual property rights under U.S. and international copyright
7 * and other intellectual property rights laws.
8 *
9 * InvenSense and its licensors retain all intellectual property and proprietary rights in and to the Software
10 * and any use, reproduction, disclosure or distribution of the Software without an express license agreement
11 * from InvenSense is strictly prohibited.
12 *
13 * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, THE SOFTWARE IS
14 * PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
15 * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
16 * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, IN NO EVENT SHALL
17 * INVENSENSE BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
18 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
19 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20 * OF THE SOFTWARE.
21 * ________________________________________________________________________________________________________
22 */
23
31 #ifndef _INV_IMU_SELFTEST_H_
32 #define _INV_IMU_SELFTEST_H_
33
34 #include <stdint.h>
35
36 #include "Invn/InvExport.h"
37 #include "imu/inv_imu_defs.h"
38 #include "imu/inv_imu_driver.h"
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 /* forward declaration */
45 struct inv_imu_device;
46
48 typedef struct {
49 ST_CONFIG_NUM_SAMPLES_t st_num_samples;
50 SELFTEST_ACCEL_GYRO_ST_EN_t st_control;
51 } inv_imu_selftest_parameters_t;
52
54 typedef struct {
55 int8_t accel_status;
56 int8_t ax_status;
57 int8_t ay_status;
58 int8_t az_status;
59 #if ICM_IS_GYRO_SUPPORTED
60 int8_t gyro_status;
61 int8_t gx_status;
62 int8_t gy_status;
63 int8_t gz_status;
64 #endif
65 } inv_imu_selftest_output_t;
66
73 int inv_imu_run_selftest(struct inv_imu_device *s, const inv_imu_selftest_parameters_t st_params,
74 inv_imu_selftest_output_t *st_output);
75
81 int inv_imu_init_selftest_parameters_struct(struct inv_imu_device * s,
82 inv_imu_selftest_parameters_t *selftest_params);
83
88 int inv_imu_load_selftest_data(struct inv_imu_device *s);
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif /* _INV_IMU_SELFTEST_H_ */
95
inv_imu_defs.h
File exposing the device register map.
SELFTEST_ACCEL_GYRO_ST_EN_t
SELFTEST_ACCEL_GYRO_ST_EN_t
Definition: inv_imu_defs.h:668
ST_CONFIG_NUM_SAMPLES_t
ST_CONFIG_NUM_SAMPLES_t
Definition: inv_imu_defs.h:647
inv_imu_driver.h
inv_imu_run_selftest
int inv_imu_run_selftest(struct inv_imu_device *s, const inv_imu_selftest_parameters_t st_params, inv_imu_selftest_output_t *st_output)
Execute self-test.
inv_imu_init_selftest_parameters_struct
int inv_imu_init_selftest_parameters_struct(struct inv_imu_device *s, inv_imu_selftest_parameters_t *selftest_params)
Fill the self-test configuration structure with default configuration.
inv_imu_load_selftest_data
int inv_imu_load_selftest_data(struct inv_imu_device *s)
Load self-test data.
inv_imu_device
IMU driver states definition.
Definition: inv_imu_driver.h:107
inv_imu_selftest_parameters_t
Self-test input parameters.
Definition: inv_imu_selftest.h:48
inv_imu_selftest_parameters_t::st_num_samples
ST_CONFIG_NUM_SAMPLES_t st_num_samples
Number of samples used to perform self-test.
Definition: inv_imu_selftest.h:49
inv_imu_selftest_parameters_t::st_control
SELFTEST_ACCEL_GYRO_ST_EN_t st_control
Define which sensor is under self-test.
Definition: inv_imu_selftest.h:50
inv_imu_selftest_output_t
Self-test routine outputs.
Definition: inv_imu_selftest.h:54
inv_imu_selftest_output_t::accel_status
int8_t accel_status
global accel self-test passed
Definition: inv_imu_selftest.h:55
inv_imu_selftest_output_t::ay_status
int8_t ay_status
AY self-test status.
Definition: inv_imu_selftest.h:57
inv_imu_selftest_output_t::ax_status
int8_t ax_status
AX self-test status.
Definition: inv_imu_selftest.h:56
inv_imu_selftest_output_t::az_status
int8_t az_status
AZ self-test status.
Definition: inv_imu_selftest.h:58