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

Function ls1c_touch_irqhandler

bsp/loongson/ls1cdev/drivers/touch.c:328–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void ls1c_touch_irqhandler(void) /* TouchScreen */
329{
330 if(gpio_get(TOUCH_INT_PIN)==0)
331 {
332 /* 触摸屏按下后操作 */
333 if (gpio_level_low == gpio_get(led_gpio))
334 gpio_set(led_gpio, gpio_level_high);
335 else
336 gpio_set(led_gpio, gpio_level_low);
337 touch_int_cmd(RT_FALSE);
338 rt_event_send(&touch->event, 1);
339 }
340}
341
342/*管脚初始化,配置中断打开SPI1 CS0 设备*/
343rt_inline void touch_init(void)

Callers

nothing calls this directly

Calls 4

touch_int_cmdFunction · 0.85
rt_event_sendFunction · 0.85
gpio_getFunction · 0.50
gpio_setFunction · 0.50

Tested by

no test coverage detected