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

Function rt_pm_device_register

components/drivers/pm/pm.c:815–826  ·  view source on GitHub ↗

* Register a device with PM feature * * @param device the device with PM feature * @param ops the PM ops for device */

Source from the content-addressed store, hash-verified

813 * @param ops the PM ops for device
814 */
815void rt_pm_device_register(struct rt_device *device, const struct rt_device_pm_ops *ops)
816{
817 struct rt_device_pm *device_pm;
818
819 device_pm = RT_KERNEL_MALLOC(sizeof(struct rt_device_pm));
820 if (device_pm != RT_NULL)
821 {
822 rt_slist_append(&_pm.device_list, &device_pm->list);
823 device_pm->device = device;
824 device_pm->ops = ops;
825 }
826}
827
828/**
829 * Unregister device from PM manager.

Callers 13

dw_wdt_probeFunction · 0.85
host_bridge_probeFunction · 0.85
nu_usbh_registerFunction · 0.85
nu_usbh_registerFunction · 0.85
rt_hw_wdt_initFunction · 0.85
nu_usbh_registerFunction · 0.85
rt_hw_wdt_initFunction · 0.85
rt_hw_wdt_initFunction · 0.85
nu_usbh_registerFunction · 0.85
rt_hw_wdt_initFunction · 0.85
nu_usbh_registerFunction · 0.85
rt_hw_wdt_initFunction · 0.85

Calls 1

rt_slist_appendFunction · 0.85

Tested by

no test coverage detected