X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=blobdiff_plain;f=source%2Fdrv-protocol.c;h=1b300bbeb87331cd9931cea6a4de57610cea71a8;hp=34f9183b7b800bc92fcda0f9ea7d38fc73dcb6f4;hb=149202b4da310b2828447711db6adbe07e7d815a;hpb=01636a052d1b2a294b4617f302dec75427551d50 diff --git a/source/drv-protocol.c b/source/drv-protocol.c index 34f9183..1b300bb 100644 --- a/source/drv-protocol.c +++ b/source/drv-protocol.c @@ -1,7 +1,7 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * - * Copyright (C) ${year} ${author} <${email}> + * Copyright (C) {year} {author} <{email}> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,26 +17,25 @@ * along with this program. If not, see . */ -#include -#include -#include "libsigrok.h" -#include "libsigrok-internal.h" +#include #include "protocol.h" -SR_PRIV int ${lib}_receive_data(int fd, int revents, void *cb_data) -{ +SR_PRIV int {lib}_receive_data(int fd, int revents, void *cb_data) +{{ const struct sr_dev_inst *sdi; struct dev_context *devc; + (void)fd; + if (!(sdi = cb_data)) return TRUE; if (!(devc = sdi->priv)) return TRUE; - if (revents == G_IO_IN) { + if (revents == G_IO_IN) {{ /* TODO */ - } + }} return TRUE; -} +}}