Lines Matching refs:sen
49 static void _sensor_cb(rt_sensor_t sen) in _sensor_cb() argument
51 if (sen->parent.rx_indicate == RT_NULL) in _sensor_cb()
56 if (sen->irq_handle != RT_NULL) in _sensor_cb()
58 sen->irq_handle(sen); in _sensor_cb()
62 if (sen->data_len > 0) in _sensor_cb()
64 sen->parent.rx_indicate(&sen->parent, sen->data_len / sizeof(struct rt_sensor_data)); in _sensor_cb()
66 else if (RT_SENSOR_MODE_GET_FETCH(sen->info.mode) == RT_SENSOR_MODE_FETCH_INT) in _sensor_cb()
69 sen->parent.rx_indicate(&sen->parent, 1); in _sensor_cb()
71 else if (RT_SENSOR_MODE_GET_FETCH(sen->info.mode) == RT_SENSOR_MODE_FETCH_FIFO) in _sensor_cb()
73 sen->parent.rx_indicate(&sen->parent, sen->info.fifo_max); in _sensor_cb()
88 _sensor_cb(sensor->module->sen[i]); in _irq_callback()
256 if (sensor->module->sen[i]->parent.ref_count > 0) 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()