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

Function rtgui_touch_init

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

RT-Thread Device Interface */

Source from the content-addressed store, hash-verified

359
360/* RT-Thread Device Interface */
361static rt_err_t rtgui_touch_init (rt_device_t dev)
362{
363 rt_uint8_t send;
364 rt_uint8_t recv_buffer[2];
365 struct rtgui_touch_device * touch_device = (struct rtgui_touch_device *)dev;
366
367 touch_init();
368 rt_kprintf("touch_init ...\n");
369 send = START | DIFFERENTIAL | POWER_MODE0;
370 touch_send_then_recv(touch->spi_device, &send, 1, recv_buffer, 2);
371
372 return RT_EOK;
373}
374
375static rt_err_t rtgui_touch_control (rt_device_t dev, int cmd, void *args)
376{

Callers

nothing calls this directly

Calls 3

rt_kprintfFunction · 0.85
touch_send_then_recvFunction · 0.85
touch_initFunction · 0.70

Tested by

no test coverage detected