]> sigrok.org Git - libsigrok.git/blobdiff - hardware/asix-sigma/asix-sigma.h
Sigma: Merge storage of rise/fall triggers.
[libsigrok.git] / hardware / asix-sigma / asix-sigma.h
index 2d38294ea964c5d348a3ae0830aef50e37ab7973..be7ecbff6fd8538eef25e72102d18fa382087d48 100644 (file)
@@ -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