X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fzeroplus-logic-cube%2Fanalyzer.h;h=9f872598b839cdb22b8672ed18501f54c1c9cfa2;hb=43cd4637285833706f8a404ca027bcf0ee75b9ae;hp=d427c4369e5c53aa3d637f1d27f9ea3f9be6319d;hpb=45c59c8bdd01954f9214fe7b869d92c55415d109;p=libsigrok.git diff --git a/hardware/zeroplus-logic-cube/analyzer.h b/hardware/zeroplus-logic-cube/analyzer.h index d427c436..9f872598 100644 --- a/hardware/zeroplus-logic-cube/analyzer.h +++ b/hardware/zeroplus-logic-cube/analyzer.h @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2010 Sven Peter * Copyright (C) 2010 Haxx Enterprises @@ -43,10 +43,16 @@ #define STATUS_FLAG_READ 0x10 #define STATUS_FLAG_20 0x20 +/* In bytes */ #define MEMORY_SIZE_8K 0x00 #define MEMORY_SIZE_64K 0x01 #define MEMORY_SIZE_128K 0x02 +#define MEMORY_SIZE_256K 0x03 #define MEMORY_SIZE_512K 0x04 +#define MEMORY_SIZE_1M 0x05 +#define MEMORY_SIZE_2M 0x06 +#define MEMORY_SIZE_4M 0x07 +#define MEMORY_SIZE_8M 0x08 #define STATUS_BUSY 0x01 /* WTF / ??? */ #define STATUS_READY 0x02 @@ -68,23 +74,19 @@ #define COMPRESSION_ENABLE 0x8001 #define COMPRESSION_DOUBLE 0x8002 -enum { - TRIGGER_HIGH = 0, - TRIGGER_LOW, - TRIGGER_POSEDGE, - TRIGGER_NEGEDGE, - TRIGGER_ANYEDGE, -}; - SR_PRIV void analyzer_set_freq(int freq, int scale); SR_PRIV void analyzer_set_ramsize_trigger_address(unsigned int address); SR_PRIV void analyzer_set_triggerbar_address(unsigned int address); +SR_PRIV unsigned int analyzer_get_ramsize_trigger_address(void ); +SR_PRIV unsigned int analyzer_get_triggerbar_address(void); SR_PRIV void analyzer_set_compression(unsigned int type); SR_PRIV void analyzer_set_memory_size(unsigned int size); -SR_PRIV void analyzer_add_trigger(int channel, int type); +SR_PRIV int analyzer_add_triggers(const struct sr_dev_inst *sdi); SR_PRIV void analyzer_set_trigger_count(int count); SR_PRIV void analyzer_add_filter(int channel, int type); +SR_PRIV void analyzer_set_voltage_threshold(int thresh); +SR_PRIV unsigned int analyzer_read_status(libusb_device_handle *devh); SR_PRIV unsigned int analyzer_read_id(libusb_device_handle *devh); SR_PRIV unsigned int analyzer_get_stop_address(libusb_device_handle *devh); SR_PRIV unsigned int analyzer_get_now_address(libusb_device_handle *devh);