X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbeaglelogic%2Fprotocol.h;fp=src%2Fhardware%2Fbeaglelogic%2Fprotocol.h;h=521673eeb03b742e0d8cfb32405e5709e16d2a75;hb=9b2b3ef93e9821ffc9edc1c8bdd929c0143939dd;hp=3539a7a4b6d6375c51bd3287d5003073b63cfde5;hpb=0bca2e75f555fc975970c8e9c859c37c74380ede;p=libsigrok.git diff --git a/src/hardware/beaglelogic/protocol.h b/src/hardware/beaglelogic/protocol.h index 3539a7a4..521673ee 100644 --- a/src/hardware/beaglelogic/protocol.h +++ b/src/hardware/beaglelogic/protocol.h @@ -32,6 +32,9 @@ #define SAMPLEUNIT_TO_BYTES(x) ((x) == 1 ? 1 : 2) +#define TCP_BUFFER_SIZE (128 * 1024) + +/** Private, per-device-instance driver context. */ struct dev_context { int max_channels; uint32_t fw_ver; @@ -39,6 +42,13 @@ struct dev_context { /* Operations */ const struct beaglelogic_ops *beaglelogic; + /* TCP Settings */ + char *address; + char *port; + int socket; + unsigned int read_timeout; + unsigned char *tcp_buffer; + /* Acquisition settings: see beaglelogic.h */ uint64_t cur_samplerate; uint64_t limit_samples; @@ -64,6 +74,7 @@ struct dev_context { gboolean trigger_fired; }; -SR_PRIV int beaglelogic_receive_data(int fd, int revents, void *cb_data); +SR_PRIV int beaglelogic_native_receive_data(int fd, int revents, void *cb_data); +SR_PRIV int beaglelogic_tcp_receive_data(int fd, int revents, void *cb_data); #endif