Lines Matching refs:module

83     if (sensor->module)  in _irq_callback()
86 for (i = 0; i < sensor->module->sen_num; i++) in _irq_callback()
88 _sensor_cb(sensor->module->sen[i]); in _irq_callback()
152 if (sensor->module) in _sensor_open()
155 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_open()
158 if (sensor->module != RT_NULL && sensor->info.fifo_max > 0 && sensor->data_buf == RT_NULL) in _sensor_open()
220 if (sensor->module) in _sensor_open()
223 rt_mutex_release(sensor->module->lock); in _sensor_open()
237 if (sensor->module) in _sensor_close()
239 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_close()
252 if (sensor->module != RT_NULL && sensor->info.fifo_max > 0 && sensor->data_buf != RT_NULL) in _sensor_close()
254 for (i = 0; i < sensor->module->sen_num; i ++) in _sensor_close()
256 if (sensor->module->sen[i]->parent.ref_count > 0) in _sensor_close()
261 for (i = 0; i < sensor->module->sen_num; i ++) in _sensor_close()
263 if (sensor->module->sen[i]->data_buf) in _sensor_close()
265 rt_free(sensor->module->sen[i]->data_buf); in _sensor_close()
266 sensor->module->sen[i]->data_buf = RT_NULL; in _sensor_close()
280 if (sensor->module) in _sensor_close()
282 rt_mutex_release(sensor->module->lock); in _sensor_close()
299 if (sensor->module) in _sensor_read()
301 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_read()
327 if (sensor->module) in _sensor_read()
329 rt_mutex_release(sensor->module->lock); in _sensor_read()
343 if (sensor->module) in _sensor_control()
345 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_control()
431 if (sensor->module) in _sensor_control()
433 rt_mutex_release(sensor->module->lock); in _sensor_control()
482 if (sensor->module != RT_NULL && sensor->module->lock == RT_NULL) in rt_hw_sensor_register()
485 sensor->module->lock = rt_mutex_create(name, RT_IPC_FLAG_PRIO); in rt_hw_sensor_register()
486 if (sensor->module->lock == RT_NULL) in rt_hw_sensor_register()