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

Function bus_probe

components/drivers/core/bus.c:190–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190static rt_err_t bus_probe(rt_driver_t drv, rt_device_t dev)
191{
192 rt_bus_t bus = drv->bus;
193 rt_err_t err = -RT_EEMPTY;
194
195 if (!bus)
196 {
197 bus = dev->bus;
198 }
199
200 if (!dev->drv && bus->match(drv, dev))
201 {
202 dev->drv = drv;
203
204 err = bus->probe(dev);
205
206 if (err)
207 {
208 dev->drv = RT_NULL;
209 }
210 }
211
212 return err;
213}
214
215static int bus_probe_driver(rt_device_t dev, void *drv_ptr)
216{

Callers 2

bus_probe_driverFunction · 0.85
bus_probe_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected