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

Function rt_ofw_get_clk

components/drivers/clk/clk.c:1341–1351  ·  view source on GitHub ↗

* @brief Get clock from ofw with acquiring a spin lock by index and node pointer * * @param np point to ofw node * @param index index of clock in ofw * * @return struct rt_clk* point to the newly created clock object, or an error pointer */

Source from the content-addressed store, hash-verified

1339 * @return struct rt_clk* point to the newly created clock object, or an error pointer
1340 */
1341struct rt_clk *rt_ofw_get_clk(struct rt_ofw_node *np, int index)
1342{
1343 struct rt_clk *clk = RT_NULL;
1344
1345 if (np && index >= 0)
1346 {
1347 clk = ofw_get_clk(np, index, RT_NULL);
1348 }
1349
1350 return clk;
1351}
1352
1353/**
1354 * @brief Get clock from ofw with acquiring a spin lock by name

Callers 1

rt_clk_get_by_indexFunction · 0.70

Calls 1

ofw_get_clkFunction · 0.85

Tested by

no test coverage detected