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

Function icu_sample

bsp/renesas/ra6m4-cpk/src/hal_entry.c:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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