* This function will update the frequency of all registered devices */
| 152 | * This function will update the frequency of all registered devices |
| 153 | */ |
| 154 | static void _pm_device_frequency_change(rt_uint8_t mode) |
| 155 | { |
| 156 | struct rt_device_pm *device_pm = RT_NULL; |
| 157 | rt_slist_t *node = RT_NULL; |
| 158 | |
| 159 | for (node = rt_slist_first(&_pm.device_list); node; node = rt_slist_next(node)) |
| 160 | { |
| 161 | device_pm = rt_slist_entry(node, struct rt_device_pm, list); |
| 162 | if (device_pm->ops->frequency_change != RT_NULL) |
| 163 | { |
| 164 | device_pm->ops->frequency_change(device_pm->device, mode); |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * This function will update the system clock frequency when idle |
no test coverage detected