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

Function rt_clk_array_put

components/drivers/clk/clk.c:1145–1163  ·  view source on GitHub ↗

* @brief Put reference count of all colock in the clock array * * @param clk_arr point to clock array * */

Source from the content-addressed store, hash-verified

1143 *
1144 */
1145void rt_clk_array_put(struct rt_clk_array *clk_arr)
1146{
1147 if (clk_arr)
1148 {
1149 for (int i = 0; i < clk_arr->count; ++i)
1150 {
1151 if (clk_arr->clks[i])
1152 {
1153 rt_clk_put(clk_arr->clks[i]);
1154 }
1155 else
1156 {
1157 break;
1158 }
1159 }
1160
1161 rt_free(clk_arr);
1162 }
1163}
1164
1165/**
1166 * @brief Put reference count of clock

Callers 1

rt_ofw_get_clk_arrayFunction · 0.85

Calls 2

rt_clk_putFunction · 0.85
rt_freeFunction · 0.85

Tested by

no test coverage detected