X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fasix-sigma%2Fasix-sigma.h;h=be7ecbff6fd8538eef25e72102d18fa382087d48;hb=a42aec7f6e61b83fcd00e20827b31cc0ee3852d0;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..be7ecbff 100644 --- a/hardware/asix-sigma/asix-sigma.h +++ b/hardware/asix-sigma/asix-sigma.h @@ -102,4 +102,59 @@ 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 { + /* Only two probes can be used in mask. */ + uint16_t risingmask; + uint16_t fallingmask; + + /* Simple trigger support (<= 50 MHz). */ + uint16_t simplemask; + uint16_t simplevalue; + + /* 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