From 259b92a30280cdec2b7798df3c14da596c417ef1 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 19 Jun 2010 12:10:27 +0200 Subject: Restructure mtdev api Split the api into plumbing and porcelain layers and move the plumbing part to its own optional header file. The main usecase is to fetch events from the device, route them through the converter and extract the processed events. To simplify the API, replace the intermediate mtdev_pull() function by the higher-level mtdev_get(). This function does all the required steps, and has the same semantics as read(). Signed-off-by: Henrik Rydberg --- src/evbuf.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/evbuf.h') diff --git a/src/evbuf.h b/src/evbuf.h index ba61cd5..1afd9f5 100644 --- a/src/evbuf.h +++ b/src/evbuf.h @@ -42,11 +42,6 @@ static inline int evbuf_empty(const struct mtdev_evbuf *evbuf) return evbuf->head == evbuf->tail; } -static inline int evbuf_full(const struct mtdev_evbuf *evbuf) -{ - return ((evbuf->head + 1) & (DIM_EVENTS - 1)) == evbuf->tail; -} - static inline void evbuf_put(struct mtdev_evbuf *evbuf, const struct input_event *ev) { -- cgit v1.2.3