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

Function icu_sample

bsp/renesas/ra2l1-cpk/src/hal_entry.c:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void icu_sample(void)
41{
42 /* init */
43 rt_uint32_t pin = rt_pin_get(USER_INPUT);
44 rt_kprintf("\n pin number : 0x%04X \n", pin);
45 rt_err_t err = rt_pin_attach_irq(pin, PIN_IRQ_MODE_RISING, irq_callback_test, RT_NULL);
46 if (RT_EOK != err)
47 {
48 rt_kprintf("\n attach irq failed. \n");
49 }
50 err = rt_pin_irq_enable(pin, PIN_IRQ_ENABLE);
51 if (RT_EOK != err)
52 {
53 rt_kprintf("\n enable irq failed. \n");
54 }
55}
56MSH_CMD_EXPORT(icu_sample, icu sample);
57#endif

Callers

nothing calls this directly

Calls 4

rt_pin_getFunction · 0.85
rt_kprintfFunction · 0.85
rt_pin_attach_irqFunction · 0.85
rt_pin_irq_enableFunction · 0.85

Tested by

no test coverage detected