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

Function rt_device_find

components/drivers/core/device.c:122–125  ·  view source on GitHub ↗

* @brief This function finds a device driver by specified name. * * @param name is the device driver's name. * * @return the registered device driver on successful, or RT_NULL on failure. */

Source from the content-addressed store, hash-verified

120 * @return the registered device driver on successful, or RT_NULL on failure.
121 */
122rt_device_t rt_device_find(const char *name)
123{
124 return (rt_device_t)rt_object_find(name, RT_Object_Class_Device);
125}
126RTM_EXPORT(rt_device_find);
127
128#ifdef RT_USING_HEAP

Callers 15

finsh_set_deviceFunction · 0.85
rt_usb_device_initFunction · 0.85
_function_enableFunction · 0.85
speaker_entryFunction · 0.85
mic_entryFunction · 0.85
rt_usb_host_initFunction · 0.85
sys_device_findFunction · 0.85
sys_getrandomFunction · 0.85
fb_initFunction · 0.85
uart_test_blocking_rxFunction · 0.85
utest_tc_cleanupFunction · 0.85
nonblock_writeFunction · 0.85

Calls 1

rt_object_findFunction · 0.85

Tested by 15

test_rt_device_findFunction · 0.68
showcolorFunction · 0.68
uart_tx_demoFunction · 0.68
uart_rx_demoFunction · 0.68
test_ts_readFunction · 0.68
test_ts_controlFunction · 0.68
test_rtc_setFunction · 0.68
test_rtc_alarmFunction · 0.68
test_rtc_interfaceFunction · 0.68
pwm_demoFunction · 0.68
test_hwtimerFunction · 0.68
test_readFunction · 0.68