Lines Matching refs:evt
77 dev_event_t *evt; in _event_write() local
78 evt = (dev_event_t *)pdev->buf_cache.next; in _event_write()
80 if (pdev->cache_count > 0 && evt->len == len) { in _event_write()
81 dlist_del(&evt->node); in _event_write()
84 evt = (dev_event_t *)aos_malloc(sizeof(*evt) + len); in _event_write()
87 if (evt == NULL) { in _event_write()
94 evt->len = len; in _event_write()
95 memcpy(evt->buf, buf, len); in _event_write()
97 dlist_add(&evt->node, &pdev->bufs); in _event_write()
99 dlist_add_tail(&evt->node, &pdev->bufs); in _event_write()
142 dev_event_t *evt = (dev_event_t *)pdev->bufs.next; in event_read() local
143 dlist_del(&evt->node); in event_read()
144 cnt = (len > evt->len) ? evt->len : len; in event_read()
145 memcpy(buf, evt->buf, cnt); in event_read()
148 dlist_add(&evt->node, &pdev->buf_cache); in event_read()
151 aos_free(evt); in event_read()