Searched refs:tmr_dev_0 (Results 1 – 2 of 2) sorted by relevance
| /bsp/k230/drivers/utest/ |
| A D | test_timer.c | 52 static rt_device_t tmr_dev_0; variable 81 tmr_dev_0 = rt_device_find(DEVICE_NAME0); in test_hwtimer() 82 uassert_not_null(tmr_dev_0); in test_hwtimer() 86 ret = rt_device_open(tmr_dev_0, RT_DEVICE_OFLAG_RDWR); in test_hwtimer() 91 ret = rt_device_control(tmr_dev_0, HWTIMER_CTRL_FREQ_SET, &freq); in test_hwtimer() 94 ret = rt_device_set_rx_indicate(tmr_dev_0, tmr_timeout_cb); in test_hwtimer() 103 ret = rt_device_control(tmr_dev_0, HWTIMER_CTRL_MODE_SET, &mode); in test_hwtimer() 105 size = rt_device_write(tmr_dev_0, 0, &timerval, tsize); in test_hwtimer() 121 size = rt_device_read(tmr_dev_0, 0, &timerval, sizeof(timerval)); in test_hwtimer() 132 ret = rt_device_close(tmr_dev_0); in test_hwtimer()
|
| /bsp/wch/risc-v/ch569w-evt/applications/ |
| A D | test.c | 158 static struct rt_device *tmr_dev_0; variable 180 tmr_dev_0 = rt_device_find("timer0"); in test_hwtimer() 182 if (tmr_dev_0 == RT_NULL || tmr_dev_1 == RT_NULL) in test_hwtimer() 186 else if (rt_device_open(tmr_dev_0, RT_DEVICE_OFLAG_RDWR) != RT_EOK || in test_hwtimer() 193 rt_device_set_rx_indicate(tmr_dev_0, tmr_timeout_cb); in test_hwtimer() 200 if (rt_device_control(tmr_dev_0, HWTIMER_CTRL_MODE_SET, &mode) != RT_EOK) in test_hwtimer() 204 else if (rt_device_write(tmr_dev_0, 0, &timerval, tsize) != tsize) in test_hwtimer()
|
Completed in 5 milliseconds