X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fasix-sigma%2Fasix-sigma.h;h=1320acec39eefdc1241abb2bdc8ba2c2b568ff7f;hb=4ae1f451363013d2f0fff180942e5b140e39f049;hp=2d38294ea964c5d348a3ae0830aef50e37ab7973;hpb=57bbf56b8420e75bcad45b417c0d36c0a55a3910;p=libsigrok.git diff --git a/hardware/asix-sigma/asix-sigma.h b/hardware/asix-sigma/asix-sigma.h index 2d38294e..1320acec 100644 --- a/hardware/asix-sigma/asix-sigma.h +++ b/hardware/asix-sigma/asix-sigma.h @@ -102,4 +102,63 @@ struct triggerinout { uint8_t trgin_enable : 1; }; +struct triggerlut { + /* The actual LUTs. */ + uint16_t m0d[4], m1d[4], m2d[4]; + uint16_t m3, m3s, m4; + + /* Paramters should be sent as a single register write. */ + struct { + uint8_t selc : 2; + uint8_t selpresc : 6; + + uint8_t selinc : 2; + uint8_t selres : 2; + uint8_t sela : 2; + uint8_t selb : 2; + + uint16_t cmpb; + uint16_t cmpa; + } params; +}; + +/* Trigger configuration */ +struct sigma_trigger { + /* Single-pin trigger support (100 and 200 MHz).*/ + uint8_t fast_pin; + uint8_t fast_fall; + + /* Simple trigger support (<= 50 MHz). */ + uint16_t simplemask; + uint16_t simplevalue; + + /* Only two probes can be used in mask */ + uint16_t risingmask; + uint16_t fallingmask; + + /* TODO: Advanced trigger support (boolean expressions). */ +}; + +/* Events for trigger operation. */ +enum triggerop { + OP_LEVEL = 1, + OP_NOT, + OP_RISE, + OP_FALL, + OP_RISEFALL, + OP_NOTRISE, + OP_NOTFALL, + OP_NOTRISEFALL, +}; + +/* Logical functions for trigger operation. */ +enum triggerfunc { + FUNC_AND = 1, + FUNC_NAND, + FUNC_OR, + FUNC_NOR, + FUNC_XOR, + FUNC_NXOR, +}; + #endif