RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
clk.h 文件参考
#include <rthw.h>
#include <ref.h>
#include <drivers/ofw.h>
+ clk.h 的引用(Include)关系图:

浏览该文件的源代码.

结构体

struct  rt_clk_node
 
struct  rt_clk_fixed_rate
 
struct  rt_clk
 
struct  rt_clk_array
 
struct  rt_clk_ops
 
struct  rt_clk_notifier
 

宏定义

#define RT_CLK_NODE_OBJ_NAME   "CLKNP"
 
#define RT_CLK_MSG_PRE_RATE_CHANGE   RT_BIT(0)
 
#define RT_CLK_MSG_POST_RATE_CHANGE   RT_BIT(1)
 
#define RT_CLK_MSG_ABORT_RATE_CHANGE   RT_BIT(2)
 

类型定义

typedef rt_err_t(* rt_clk_notifier_callback) (struct rt_clk_notifier *notifier, rt_ubase_t msg, rt_ubase_t old_rate, rt_ubase_t new_rate)
 

函数

rt_err_t rt_clk_register (struct rt_clk_node *clk_np, struct rt_clk_node *parent_np)
 
rt_err_t rt_clk_unregister (struct rt_clk_node *clk_np)
 
rt_err_t rt_clk_notifier_register (struct rt_clk *clk, struct rt_clk_notifier *notifier)
 
rt_err_t rt_clk_notifier_unregister (struct rt_clk *clk, struct rt_clk_notifier *notifier)
 
rt_err_t rt_clk_set_parent (struct rt_clk *clk, struct rt_clk *clk_parent)
 
rt_err_t rt_clk_prepare (struct rt_clk *clk)
 
rt_err_t rt_clk_unprepare (struct rt_clk *clk)
 
rt_err_t rt_clk_enable (struct rt_clk *clk)
 
void rt_clk_disable (struct rt_clk *clk)
 
rt_err_t rt_clk_prepare_enable (struct rt_clk *clk)
 
void rt_clk_disable_unprepare (struct rt_clk *clk)
 
rt_err_t rt_clk_array_prepare (struct rt_clk_array *clk_arr)
 
rt_err_t rt_clk_array_unprepare (struct rt_clk_array *clk_arr)
 
rt_err_t rt_clk_array_enable (struct rt_clk_array *clk_arr)
 
void rt_clk_array_disable (struct rt_clk_array *clk_arr)
 
rt_err_t rt_clk_array_prepare_enable (struct rt_clk_array *clk_arr)
 
void rt_clk_array_disable_unprepare (struct rt_clk_array *clk_arr)
 
rt_err_t rt_clk_set_rate_range (struct rt_clk *clk, rt_ubase_t min, rt_ubase_t max)
 
rt_err_t rt_clk_set_min_rate (struct rt_clk *clk, rt_ubase_t rate)
 
rt_err_t rt_clk_set_max_rate (struct rt_clk *clk, rt_ubase_t rate)
 
rt_err_t rt_clk_set_rate (struct rt_clk *clk, rt_ubase_t rate)
 
rt_ubase_t rt_clk_get_rate (struct rt_clk *clk)
 
rt_err_t rt_clk_set_phase (struct rt_clk *clk, int degrees)
 
rt_base_t rt_clk_get_phase (struct rt_clk *clk)
 
rt_base_t rt_clk_round_rate (struct rt_clk *clk, rt_ubase_t rate)
 
struct rt_clkrt_clk_get_parent (struct rt_clk *clk)
 
struct rt_clk_arrayrt_clk_get_array (struct rt_device *dev)
 
struct rt_clkrt_clk_get_by_index (struct rt_device *dev, int index)
 
struct rt_clkrt_clk_get_by_name (struct rt_device *dev, const char *name)
 
void rt_clk_array_put (struct rt_clk_array *clk_arr)
 
void rt_clk_put (struct rt_clk *clk)
 
rt_inline struct rt_clkrt_ofw_get_clk (struct rt_ofw_node *np, int index)
 
rt_inline struct rt_clkrt_ofw_get_clk_by_name (struct rt_ofw_node *np, const char *name)
 
rt_inline rt_ssize_t rt_ofw_count_of_clk (struct rt_ofw_node *clk_ofw_np)
 

宏定义说明

◆ RT_CLK_NODE_OBJ_NAME

#define RT_CLK_NODE_OBJ_NAME   "CLKNP"

在文件 clk.h19 行定义.

◆ RT_CLK_MSG_PRE_RATE_CHANGE

#define RT_CLK_MSG_PRE_RATE_CHANGE   RT_BIT(0)

在文件 clk.h114 行定义.

◆ RT_CLK_MSG_POST_RATE_CHANGE

#define RT_CLK_MSG_POST_RATE_CHANGE   RT_BIT(1)

在文件 clk.h115 行定义.

◆ RT_CLK_MSG_ABORT_RATE_CHANGE

#define RT_CLK_MSG_ABORT_RATE_CHANGE   RT_BIT(2)

在文件 clk.h116 行定义.

类型定义说明

◆ rt_clk_notifier_callback

typedef rt_err_t(* rt_clk_notifier_callback) (struct rt_clk_notifier *notifier, rt_ubase_t msg, rt_ubase_t old_rate, rt_ubase_t new_rate)

在文件 clk.h118 行定义.

函数说明

◆ rt_clk_register()

rt_err_t rt_clk_register ( struct rt_clk_node * clk_np,
struct rt_clk_node * parent_np )

◆ rt_clk_unregister()

rt_err_t rt_clk_unregister ( struct rt_clk_node * clk_np)

◆ rt_clk_notifier_register()

rt_err_t rt_clk_notifier_register ( struct rt_clk * clk,
struct rt_clk_notifier * notifier )

◆ rt_clk_notifier_unregister()

rt_err_t rt_clk_notifier_unregister ( struct rt_clk * clk,
struct rt_clk_notifier * notifier )

◆ rt_clk_set_parent()

rt_err_t rt_clk_set_parent ( struct rt_clk * clk,
struct rt_clk * clk_parent )

◆ rt_clk_prepare()

rt_err_t rt_clk_prepare ( struct rt_clk * clk)

◆ rt_clk_unprepare()

rt_err_t rt_clk_unprepare ( struct rt_clk * clk)

◆ rt_clk_enable()

rt_err_t rt_clk_enable ( struct rt_clk * clk)

◆ rt_clk_disable()

void rt_clk_disable ( struct rt_clk * clk)

◆ rt_clk_prepare_enable()

rt_err_t rt_clk_prepare_enable ( struct rt_clk * clk)

◆ rt_clk_disable_unprepare()

void rt_clk_disable_unprepare ( struct rt_clk * clk)

◆ rt_clk_array_prepare()

rt_err_t rt_clk_array_prepare ( struct rt_clk_array * clk_arr)

◆ rt_clk_array_unprepare()

rt_err_t rt_clk_array_unprepare ( struct rt_clk_array * clk_arr)

◆ rt_clk_array_enable()

rt_err_t rt_clk_array_enable ( struct rt_clk_array * clk_arr)

◆ rt_clk_array_disable()

void rt_clk_array_disable ( struct rt_clk_array * clk_arr)

◆ rt_clk_array_prepare_enable()

rt_err_t rt_clk_array_prepare_enable ( struct rt_clk_array * clk_arr)

◆ rt_clk_array_disable_unprepare()

void rt_clk_array_disable_unprepare ( struct rt_clk_array * clk_arr)

◆ rt_clk_set_rate_range()

rt_err_t rt_clk_set_rate_range ( struct rt_clk * clk,
rt_ubase_t min,
rt_ubase_t max )

◆ rt_clk_set_min_rate()

rt_err_t rt_clk_set_min_rate ( struct rt_clk * clk,
rt_ubase_t rate )

◆ rt_clk_set_max_rate()

rt_err_t rt_clk_set_max_rate ( struct rt_clk * clk,
rt_ubase_t rate )

◆ rt_clk_set_rate()

rt_err_t rt_clk_set_rate ( struct rt_clk * clk,
rt_ubase_t rate )

◆ rt_clk_get_rate()

rt_ubase_t rt_clk_get_rate ( struct rt_clk * clk)

◆ rt_clk_set_phase()

rt_err_t rt_clk_set_phase ( struct rt_clk * clk,
int degrees )

◆ rt_clk_get_phase()

rt_base_t rt_clk_get_phase ( struct rt_clk * clk)

◆ rt_clk_round_rate()

rt_base_t rt_clk_round_rate ( struct rt_clk * clk,
rt_ubase_t rate )

◆ rt_clk_get_parent()

struct rt_clk * rt_clk_get_parent ( struct rt_clk * clk)

◆ rt_clk_get_array()

struct rt_clk_array * rt_clk_get_array ( struct rt_device * dev)

◆ rt_clk_get_by_index()

struct rt_clk * rt_clk_get_by_index ( struct rt_device * dev,
int index )

◆ rt_clk_get_by_name()

struct rt_clk * rt_clk_get_by_name ( struct rt_device * dev,
const char * name )

◆ rt_clk_array_put()

void rt_clk_array_put ( struct rt_clk_array * clk_arr)

◆ rt_clk_put()

void rt_clk_put ( struct rt_clk * clk)

◆ rt_ofw_get_clk()

rt_inline struct rt_clk * rt_ofw_get_clk ( struct rt_ofw_node * np,
int index )

在文件 clk.h181 行定义.

182{
183 return RT_NULL;
184}
#define RT_NULL

引用了 RT_NULL.

◆ rt_ofw_get_clk_by_name()

rt_inline struct rt_clk * rt_ofw_get_clk_by_name ( struct rt_ofw_node * np,
const char * name )

在文件 clk.h185 行定义.

186{
187 return RT_NULL;
188}

引用了 RT_NULL.

◆ rt_ofw_count_of_clk()

rt_inline rt_ssize_t rt_ofw_count_of_clk ( struct rt_ofw_node * clk_ofw_np)

在文件 clk.h189 行定义.

190{
191 return 0;
192}