MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / sensor_irq_rx_entry

Function sensor_irq_rx_entry

components/drivers/sensor/v2/sensor_cmd.c:427–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425MSH_CMD_EXPORT(sensor_fifo, Sensor fifo mode test function);
426
427static void sensor_irq_rx_entry(void *parameter)
428{
429 rt_device_t dev = (rt_device_t)parameter;
430 rt_sensor_t sensor = (rt_sensor_t)parameter;
431 struct rt_sensor_data data;
432 rt_size_t res, i = 0;
433
434 while (1)
435 {
436 rt_sem_take(sensor_rx_sem, RT_WAITING_FOREVER);
437
438 res = rt_device_read(dev, 0, &data, 1);
439 if (res == 1)
440 {
441 sensor_show_data(i++, sensor, &data);
442 }
443 }
444}
445
446static void sensor_int(int argc, char **argv)
447{

Callers

nothing calls this directly

Calls 3

rt_sem_takeFunction · 0.85
rt_device_readFunction · 0.85
sensor_show_dataFunction · 0.70

Tested by

no test coverage detected