X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Frdtech-dps%2Fprotocol.c;fp=src%2Fhardware%2Frdtech-dps%2Fprotocol.c;h=05b0e06b9a019330aa22af4455d26483dc2bac79;hp=0000000000000000000000000000000000000000;hb=0549416e36730bb455068fd6a68b856d817fb087;hpb=7b50a9b86987845bc596bfa226c69313afab6b8b diff --git a/src/hardware/rdtech-dps/protocol.c b/src/hardware/rdtech-dps/protocol.c new file mode 100644 index 00000000..05b0e06b --- /dev/null +++ b/src/hardware/rdtech-dps/protocol.c @@ -0,0 +1,41 @@ +/* + * This file is part of the libsigrok project. + * + * Copyright (C) 2018 James Churchill + * + * 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 rdtech_dps_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; +}