Home
last modified time | relevance | path

Searched refs:smd (Results 1 – 8 of 8) sorted by relevance

/hardware/knowles/athletico/sound_trigger_hal/tests/
Doslo_iaxxx_sensor_control.c29 struct ia_sensor_mgr *smd = NULL; in iaxxx_sensor_mgr_init() local
31 smd = (struct ia_sensor_mgr *)malloc(sizeof(struct ia_sensor_mgr)); in iaxxx_sensor_mgr_init()
32 if (NULL == smd) { in iaxxx_sensor_mgr_init()
37 if ((smd->dev_node = fopen(IAXXX_DEV_NODE, "rw")) == NULL) { in iaxxx_sensor_mgr_init()
40 free(smd); in iaxxx_sensor_mgr_init()
44 return smd; in iaxxx_sensor_mgr_init()
47 int iaxxx_sensor_mgr_deinit(struct ia_sensor_mgr *smd) { in iaxxx_sensor_mgr_deinit() argument
48 if (smd == NULL) { in iaxxx_sensor_mgr_deinit()
53 if (smd->dev_node) { in iaxxx_sensor_mgr_deinit()
54 fclose(smd->dev_node); in iaxxx_sensor_mgr_deinit()
[all …]
Dsensor_param_test.c71 void set_param(struct ia_sensor_mgr *smd, int param_id, float param_val) { in set_param() argument
75 if (NULL == smd) { in set_param()
91 err = ioctl(fileno(smd->dev_node), MODULE_SENSOR_SET_PARAM, (unsigned long) &sp); in set_param()
99 void get_param(struct ia_sensor_mgr *smd, int param_id) { in get_param() argument
104 if (NULL == smd) { in get_param()
113 err = ioctl(fileno(smd->dev_node), MODULE_SENSOR_GET_PARAM, (unsigned long) &sp); in get_param()
127 struct ia_sensor_mgr * smd; in main() local
177 smd = (struct ia_sensor_mgr*) malloc(sizeof(struct ia_sensor_mgr)); in main()
178 if (NULL == smd) { in main()
183 if((smd->dev_node = fopen(DEV_NODE, "rw")) == NULL) { in main()
[all …]
Dcrash_trigger_test.c78 struct ia_script_mgr * smd = NULL; in main() local
106 smd = (struct ia_script_mgr*) malloc(sizeof(struct ia_script_mgr)); in main()
107 if (NULL == smd) { in main()
113 if((smd->dev_node = fopen(DEV_NODE, "rw")) == NULL) { in main()
130 err = ioctl(fileno(smd->dev_node), SCRIPT_TRIGGER, (unsigned long) &script_id); in main()
139 if (smd) { in main()
140 if (smd->dev_node) { in main()
141 fclose(smd->dev_node); in main()
143 free(smd); in main()
144 smd = NULL; in main()
Doslo_get_stats.c31 struct ia_sensor_mgr *smd; in main() local
35 smd = iaxxx_sensor_mgr_init(); in main()
36 if (NULL == smd) { in main()
43 oslo_driver_set_param(smd, SENSOR_PARAM_DUMP_STATS, 1); in main()
44 rc = oslo_driver_get_stats(smd, sensor_stats); in main()
79 iaxxx_sensor_mgr_deinit(smd); in main()
Doslo_config_test.c317 void oslo_enable(struct ia_sensor_mgr *smd, bool enable) { in oslo_enable() argument
320 oslo_driver_set_param(smd, OSLO_CONTROL_RESTART, 1); in oslo_enable()
323 oslo_driver_set_param(smd, OSLO_CONTROL_STOP, 0); in oslo_enable()
329 bool ping_test(struct ia_sensor_mgr *smd, uint32_t ping_timeout_sec) { in ping_test() argument
334 oslo_enable(smd, true); in ping_test()
337 radar_frames_initial = oslo_driver_get_param(smd, SENSOR_PARAM_FRAMES_PROCESSED); in ping_test()
340 uint32_t radar_frames = oslo_driver_get_param(smd, SENSOR_PARAM_FRAMES_PROCESSED); in ping_test()
351 oslo_enable(smd, false); in ping_test()
359 void read_register(struct ia_sensor_mgr *smd, uint32_t reg_addr) { in read_register() argument
367 reg_val = oslo_driver_get_param(smd, OSLO_REGISTER_MIN + reg_addr); in read_register()
[all …]
Doslo_iaxxx_sensor_control.h190 int iaxxx_sensor_mgr_deinit(struct ia_sensor_mgr *smd);
191 void oslo_driver_set_param(struct ia_sensor_mgr *smd, int param_id, float param_val);
192 uint32_t oslo_driver_get_param(struct ia_sensor_mgr *smd, int param_id);
193 size_t oslo_driver_set_param_blk(struct ia_sensor_mgr *smd, uint32_t param_blk_id,
195 int oslo_driver_get_stats(struct ia_sensor_mgr *smd, struct iaxxx_sensor_mode_stats stats[]);
Doslo_data_injection_test.c186 struct ia_sensor_mgr *smd; in main() local
255 smd = iaxxx_sensor_mgr_init(); in main()
256 if (NULL == smd) { in main()
262 frames_processed_pre_inject = oslo_driver_get_param(smd, SENSOR_PARAM_FRAMES_PROCESSED); in main()
299 bytes_written = oslo_driver_set_param_blk(smd, PARAM_BLK_ID_FRAME_DATA_INJECTION, in main()
313 oslo_driver_set_param(smd, OSLO_CONTROL_INJECT_FRAME_READY, 1); in main()
322 frames_processed_post_inject = oslo_driver_get_param(smd, SENSOR_PARAM_FRAMES_PROCESSED); in main()
329 iaxxx_sensor_mgr_deinit(smd); in main()
/hardware/invensense/6515/libsensors_iio/software/simple_apps/gesture_test/
Dinv_gesture_test.c502 int smd; in smd_handler() local
505 fscanf(fp, "%d\n", &smd); in smd_handler()
511 printf("SMD (%d)\n", smd); in smd_handler()