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

Function rt_platform_device_register

components/drivers/core/platform.c:70–75  ·  view source on GitHub ↗

* @brief This function register a rt_device to platform bus. * * @return the error code, RT_EOK on successfully. */

Source from the content-addressed store, hash-verified

68 * @return the error code, RT_EOK on successfully.
69 */
70rt_err_t rt_platform_device_register(struct rt_platform_device *pdev)
71{
72 RT_ASSERT(pdev != RT_NULL);
73
74 return rt_bus_add_device(&platform_bus, &pdev->parent);
75}
76
77static rt_bool_t platform_match(rt_driver_t drv, rt_device_t dev)
78{

Calls 1

rt_bus_add_deviceFunction · 0.85

Tested by

no test coverage detected