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

Function pin_dm_irq_map

components/drivers/pin/dev_pin_dm.c:282–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282static int pin_dm_irq_map(struct rt_pic *pic, int hwirq, rt_uint32_t mode)
283{
284 int irq = -1;
285 struct rt_device_pin *gpio = pic->priv_data;
286 struct rt_pic_irq *pirq = rt_pic_find_irq(pic, hwirq);
287
288 if (pirq)
289 {
290 irq = rt_pic_config_irq(pic, hwirq, hwirq);
291
292 if (irq >= 0)
293 {
294 rt_pic_cascade(pirq, gpio->irqchip.irq);
295 rt_pic_irq_set_triger_mode(irq, mode);
296 }
297 }
298
299 return irq;
300}
301
302static rt_err_t pin_dm_irq_parse(struct rt_pic *pic,
303 struct rt_ofw_cell_args *args, struct rt_pic_irq *out_pirq)

Callers

nothing calls this directly

Calls 4

rt_pic_find_irqFunction · 0.85
rt_pic_config_irqFunction · 0.85
rt_pic_cascadeFunction · 0.85

Tested by

no test coverage detected