RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
pic.h 文件参考
#include <rthw.h>
#include <bitmap.h>
#include <drivers/ofw.h>
#include <drivers/core/dm.h>
+ pic.h 的引用(Include)关系图:
+ 此图展示该文件被哪些文件直接或间接地引用了:

浏览该文件的源代码.

结构体

struct  rt_pic
 
struct  rt_pic_ops
 
struct  rt_pic_isr
 
struct  rt_pic_irq
 

宏定义

#define RT_IRQ_STATE_PENDING   0
 
#define RT_IRQ_STATE_ACTIVE   1
 
#define RT_IRQ_STATE_MASKED   2
 
#define RT_PIC_F_IRQ_ROUTING   RT_BIT(0) /* Routing ISR when cascade */
 
#define RT_IRQ_F_NONE   0
 
#define RT_IRQ_AFFINITY_DECLARE(name)
 
#define RT_IRQ_AFFINITY_SET(affinity, cpuid)
 
#define RT_IRQ_AFFINITY_CLEAR(affinity, cpuid)
 
#define RT_IRQ_MODE_NONE   0
 
#define RT_IRQ_MODE_EDGE_RISING   1
 
#define RT_IRQ_MODE_EDGE_FALLING   2
 
#define RT_IRQ_MODE_EDGE_BOTH   (RT_IRQ_MODE_EDGE_FALLING | RT_IRQ_MODE_EDGE_RISING)
 
#define RT_IRQ_MODE_LEVEL_HIGH   4
 
#define RT_IRQ_MODE_LEVEL_LOW   8
 
#define RT_IRQ_MODE_LEVEL_MASK   (RT_IRQ_MODE_LEVEL_LOW | RT_IRQ_MODE_LEVEL_HIGH)
 
#define RT_IRQ_MODE_MASK   0xf
 
#define RT_PIC_OFW_DECLARE(name, ids, handler)
 

函数

void rt_pic_default_name (struct rt_pic *pic)
 
struct rt_picrt_pic_dynamic_cast (void *ptr)
 
rt_err_t rt_pic_linear_irq (struct rt_pic *pic, rt_size_t irq_nr)
 
rt_err_t rt_pic_cancel_irq (struct rt_pic *pic)
 
int rt_pic_config_ipi (struct rt_pic *pic, int ipi_index, int hwirq)
 
int rt_pic_config_irq (struct rt_pic *pic, int irq_index, int hwirq)
 
rt_inline struct rt_pic_irqrt_pic_find_irq (struct rt_pic *pic, int irq_index)
 
struct rt_pic_irqrt_pic_find_ipi (struct rt_pic *pic, int ipi_index)
 
struct rt_pic_irqrt_pic_find_pirq (struct rt_pic *pic, int irq)
 
rt_err_t rt_pic_cascade (struct rt_pic_irq *pirq, int parent_irq)
 
rt_err_t rt_pic_uncascade (struct rt_pic_irq *pirq)
 
rt_err_t rt_pic_attach_irq (int irq, rt_isr_handler_t handler, void *uid, const char *name, int flags)
 
rt_err_t rt_pic_detach_irq (int irq, void *uid)
 
rt_err_t rt_pic_add_traps (rt_bool_t(*handler)(void *), void *data)
 
rt_err_t rt_pic_do_traps (void)
 
rt_err_t rt_pic_handle_isr (struct rt_pic_irq *pirq)
 
rt_err_t rt_pic_user_extends (struct rt_pic *pic)
 
rt_err_t rt_pic_irq_init (void)
 
rt_err_t rt_pic_irq_finit (void)
 
void rt_pic_irq_enable (int irq)
 
void rt_pic_irq_disable (int irq)
 
void rt_pic_irq_ack (int irq)
 
void rt_pic_irq_mask (int irq)
 
void rt_pic_irq_unmask (int irq)
 
void rt_pic_irq_eoi (int irq)
 
rt_err_t rt_pic_irq_set_priority (int irq, rt_uint32_t priority)
 
rt_uint32_t rt_pic_irq_get_priority (int irq)
 
rt_err_t rt_pic_irq_set_affinity (int irq, rt_bitmap_t *affinity)
 
rt_err_t rt_pic_irq_get_affinity (int irq, rt_bitmap_t *out_affinity)
 
rt_err_t rt_pic_irq_set_triger_mode (int irq, rt_uint32_t mode)
 
rt_uint32_t rt_pic_irq_get_triger_mode (int irq)
 
void rt_pic_irq_send_ipi (int irq, rt_bitmap_t *cpumask)
 
rt_err_t rt_pic_irq_set_state_raw (struct rt_pic *pic, int hwirq, int type, rt_bool_t state)
 
rt_err_t rt_pic_irq_get_state_raw (struct rt_pic *pic, int hwirq, int type, rt_bool_t *out_state)
 
rt_err_t rt_pic_irq_set_state (int irq, int type, rt_bool_t state)
 
rt_err_t rt_pic_irq_get_state (int irq, int type, rt_bool_t *out_state)
 
void rt_pic_irq_parent_enable (struct rt_pic_irq *pirq)
 
void rt_pic_irq_parent_disable (struct rt_pic_irq *pirq)
 
void rt_pic_irq_parent_ack (struct rt_pic_irq *pirq)
 
void rt_pic_irq_parent_mask (struct rt_pic_irq *pirq)
 
void rt_pic_irq_parent_unmask (struct rt_pic_irq *pirq)
 
void rt_pic_irq_parent_eoi (struct rt_pic_irq *pirq)
 
rt_err_t rt_pic_irq_parent_set_priority (struct rt_pic_irq *pirq, rt_uint32_t priority)
 
rt_err_t rt_pic_irq_parent_set_affinity (struct rt_pic_irq *pirq, rt_bitmap_t *affinity)
 
rt_err_t rt_pic_irq_parent_set_triger_mode (struct rt_pic_irq *pirq, rt_uint32_t mode)
 
rt_err_t rt_pic_init (void)
 

宏定义说明

◆ RT_IRQ_STATE_PENDING

#define RT_IRQ_STATE_PENDING   0

在文件 pic.h78 行定义.

◆ RT_IRQ_STATE_ACTIVE

#define RT_IRQ_STATE_ACTIVE   1

在文件 pic.h79 行定义.

◆ RT_IRQ_STATE_MASKED

#define RT_IRQ_STATE_MASKED   2

在文件 pic.h80 行定义.

◆ RT_PIC_F_IRQ_ROUTING

#define RT_PIC_F_IRQ_ROUTING   RT_BIT(0) /* Routing ISR when cascade */

在文件 pic.h87 行定义.

◆ RT_IRQ_F_NONE

#define RT_IRQ_F_NONE   0

在文件 pic.h95 行定义.

◆ RT_IRQ_AFFINITY_DECLARE

#define RT_IRQ_AFFINITY_DECLARE ( name)
值:
RT_BITMAP_DECLARE(name, RT_CPUS_NR)

在文件 pic.h100 行定义.

◆ RT_IRQ_AFFINITY_SET

#define RT_IRQ_AFFINITY_SET ( affinity,
cpuid )
值:
rt_bitmap_set_bit(affinity, cpuid)

在文件 pic.h101 行定义.

◆ RT_IRQ_AFFINITY_CLEAR

#define RT_IRQ_AFFINITY_CLEAR ( affinity,
cpuid )
值:
rt_bitmap_clear_bit(affinity, cpuid)

在文件 pic.h102 行定义.

◆ RT_IRQ_MODE_NONE

#define RT_IRQ_MODE_NONE   0

在文件 pic.h118 行定义.

◆ RT_IRQ_MODE_EDGE_RISING

#define RT_IRQ_MODE_EDGE_RISING   1

在文件 pic.h119 行定义.

◆ RT_IRQ_MODE_EDGE_FALLING

#define RT_IRQ_MODE_EDGE_FALLING   2

在文件 pic.h120 行定义.

◆ RT_IRQ_MODE_EDGE_BOTH

#define RT_IRQ_MODE_EDGE_BOTH   (RT_IRQ_MODE_EDGE_FALLING | RT_IRQ_MODE_EDGE_RISING)

在文件 pic.h121 行定义.

◆ RT_IRQ_MODE_LEVEL_HIGH

#define RT_IRQ_MODE_LEVEL_HIGH   4

在文件 pic.h122 行定义.

◆ RT_IRQ_MODE_LEVEL_LOW

#define RT_IRQ_MODE_LEVEL_LOW   8

在文件 pic.h123 行定义.

◆ RT_IRQ_MODE_LEVEL_MASK

#define RT_IRQ_MODE_LEVEL_MASK   (RT_IRQ_MODE_LEVEL_LOW | RT_IRQ_MODE_LEVEL_HIGH)

在文件 pic.h124 行定义.

◆ RT_IRQ_MODE_MASK

#define RT_IRQ_MODE_MASK   0xf

在文件 pic.h125 行定义.

◆ RT_PIC_OFW_DECLARE

#define RT_PIC_OFW_DECLARE ( name,
ids,
handler )
值:
RT_OFW_STUB_EXPORT(name, ids, pic, handler)
#define RT_OFW_STUB_EXPORT(_name, _ids, _class, _handler,...)
定义 ofw.h:103

在文件 pic.h213 行定义.

函数说明

◆ rt_pic_default_name()

void rt_pic_default_name ( struct rt_pic * pic)

◆ rt_pic_dynamic_cast()

struct rt_pic * rt_pic_dynamic_cast ( void * ptr)

◆ rt_pic_linear_irq()

rt_err_t rt_pic_linear_irq ( struct rt_pic * pic,
rt_size_t irq_nr )

◆ rt_pic_cancel_irq()

rt_err_t rt_pic_cancel_irq ( struct rt_pic * pic)

◆ rt_pic_config_ipi()

int rt_pic_config_ipi ( struct rt_pic * pic,
int ipi_index,
int hwirq )

◆ rt_pic_config_irq()

int rt_pic_config_irq ( struct rt_pic * pic,
int irq_index,
int hwirq )

◆ rt_pic_find_irq()

rt_inline struct rt_pic_irq * rt_pic_find_irq ( struct rt_pic * pic,
int irq_index )

在文件 pic.h156 行定义.

157{
158 /* This is a quickly interface */
159 RT_ASSERT(pic != RT_NULL);
160 RT_ASSERT(pic->pirqs != RT_NULL);
161 RT_ASSERT(irq_index < pic->irq_nr);
162
163 return &pic->pirqs[irq_index];
164}
#define RT_ASSERT(EX)
#define RT_NULL
struct rt_pic_irq * pirqs
定义 pic.h:50

引用了 rt_pic_irq::pic, rt_pic::pirqs, RT_ASSERT , 以及 RT_NULL.

◆ rt_pic_find_ipi()

struct rt_pic_irq * rt_pic_find_ipi ( struct rt_pic * pic,
int ipi_index )

◆ rt_pic_find_pirq()

struct rt_pic_irq * rt_pic_find_pirq ( struct rt_pic * pic,
int irq )

◆ rt_pic_cascade()

rt_err_t rt_pic_cascade ( struct rt_pic_irq * pirq,
int parent_irq )

◆ rt_pic_uncascade()

rt_err_t rt_pic_uncascade ( struct rt_pic_irq * pirq)

◆ rt_pic_attach_irq()

rt_err_t rt_pic_attach_irq ( int irq,
rt_isr_handler_t handler,
void * uid,
const char * name,
int flags )

◆ rt_pic_detach_irq()

rt_err_t rt_pic_detach_irq ( int irq,
void * uid )

◆ rt_pic_add_traps()

rt_err_t rt_pic_add_traps ( rt_bool_t(* handler )(void *),
void * data )

◆ rt_pic_do_traps()

rt_err_t rt_pic_do_traps ( void )

◆ rt_pic_handle_isr()

rt_err_t rt_pic_handle_isr ( struct rt_pic_irq * pirq)

◆ rt_pic_user_extends()

rt_err_t rt_pic_user_extends ( struct rt_pic * pic)

◆ rt_pic_irq_init()

rt_err_t rt_pic_irq_init ( void )

◆ rt_pic_irq_finit()

rt_err_t rt_pic_irq_finit ( void )

◆ rt_pic_irq_enable()

void rt_pic_irq_enable ( int irq)

◆ rt_pic_irq_disable()

void rt_pic_irq_disable ( int irq)

◆ rt_pic_irq_ack()

void rt_pic_irq_ack ( int irq)

◆ rt_pic_irq_mask()

void rt_pic_irq_mask ( int irq)

◆ rt_pic_irq_unmask()

void rt_pic_irq_unmask ( int irq)

◆ rt_pic_irq_eoi()

void rt_pic_irq_eoi ( int irq)

◆ rt_pic_irq_set_priority()

rt_err_t rt_pic_irq_set_priority ( int irq,
rt_uint32_t priority )

◆ rt_pic_irq_get_priority()

rt_uint32_t rt_pic_irq_get_priority ( int irq)

◆ rt_pic_irq_set_affinity()

rt_err_t rt_pic_irq_set_affinity ( int irq,
rt_bitmap_t * affinity )

◆ rt_pic_irq_get_affinity()

rt_err_t rt_pic_irq_get_affinity ( int irq,
rt_bitmap_t * out_affinity )

◆ rt_pic_irq_set_triger_mode()

rt_err_t rt_pic_irq_set_triger_mode ( int irq,
rt_uint32_t mode )

◆ rt_pic_irq_get_triger_mode()

rt_uint32_t rt_pic_irq_get_triger_mode ( int irq)

◆ rt_pic_irq_send_ipi()

void rt_pic_irq_send_ipi ( int irq,
rt_bitmap_t * cpumask )

◆ rt_pic_irq_set_state_raw()

rt_err_t rt_pic_irq_set_state_raw ( struct rt_pic * pic,
int hwirq,
int type,
rt_bool_t state )

◆ rt_pic_irq_get_state_raw()

rt_err_t rt_pic_irq_get_state_raw ( struct rt_pic * pic,
int hwirq,
int type,
rt_bool_t * out_state )

◆ rt_pic_irq_set_state()

rt_err_t rt_pic_irq_set_state ( int irq,
int type,
rt_bool_t state )

◆ rt_pic_irq_get_state()

rt_err_t rt_pic_irq_get_state ( int irq,
int type,
rt_bool_t * out_state )

◆ rt_pic_irq_parent_enable()

void rt_pic_irq_parent_enable ( struct rt_pic_irq * pirq)

◆ rt_pic_irq_parent_disable()

void rt_pic_irq_parent_disable ( struct rt_pic_irq * pirq)

◆ rt_pic_irq_parent_ack()

void rt_pic_irq_parent_ack ( struct rt_pic_irq * pirq)

◆ rt_pic_irq_parent_mask()

void rt_pic_irq_parent_mask ( struct rt_pic_irq * pirq)

◆ rt_pic_irq_parent_unmask()

void rt_pic_irq_parent_unmask ( struct rt_pic_irq * pirq)

◆ rt_pic_irq_parent_eoi()

void rt_pic_irq_parent_eoi ( struct rt_pic_irq * pirq)

◆ rt_pic_irq_parent_set_priority()

rt_err_t rt_pic_irq_parent_set_priority ( struct rt_pic_irq * pirq,
rt_uint32_t priority )

◆ rt_pic_irq_parent_set_affinity()

rt_err_t rt_pic_irq_parent_set_affinity ( struct rt_pic_irq * pirq,
rt_bitmap_t * affinity )

◆ rt_pic_irq_parent_set_triger_mode()

rt_err_t rt_pic_irq_parent_set_triger_mode ( struct rt_pic_irq * pirq,
rt_uint32_t mode )

◆ rt_pic_init()

rt_err_t rt_pic_init ( void )