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

Function bus_probe_device

components/drivers/core/bus.c:226–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226static int bus_probe_device(rt_driver_t drv, void *dev_ptr)
227{
228 rt_err_t err;
229
230 err = bus_probe(drv, dev_ptr);
231
232 if (!err)
233 {
234 rt_bus_t bus = drv->bus;
235
236 _dm_bus_lock(&bus->drv_lock);
237 ++drv->ref_count;
238 _dm_bus_unlock(&bus->drv_lock);
239 }
240
241 return err;
242}
243
244/**
245 * @brief This function add a driver to the drv_list of a specific bus

Callers

nothing calls this directly

Calls 3

bus_probeFunction · 0.85
_dm_bus_lockFunction · 0.85
_dm_bus_unlockFunction · 0.85

Tested by

no test coverage detected