X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fzketech-ebd-usb%2Fprotocol.c;fp=src%2Fhardware%2Fzketech-ebd-usb%2Fprotocol.c;h=f4939761d5c67ab31d1d8cc2f90229b3614b496e;hb=c527132aec5ff8f2fc9646f360a7b0874301e4e7;hp=0000000000000000000000000000000000000000;hpb=23d68466f827fa2f2f9b6c5768353d2f7ceab573;p=libsigrok.git diff --git a/src/hardware/zketech-ebd-usb/protocol.c b/src/hardware/zketech-ebd-usb/protocol.c new file mode 100644 index 00000000..f4939761 --- /dev/null +++ b/src/hardware/zketech-ebd-usb/protocol.c @@ -0,0 +1,41 @@ +/* + * This file is part of the libsigrok project. + * + * Copyright (C) 2018 Sven Bursch-Osewold + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include "protocol.h" + +SR_PRIV int zketech_ebd_usb_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) { + /* TODO */ + } + + return TRUE; +}