]> sigrok.org Git - libsigrok.git/blobdiff - hardware/link-mso19/link-mso19.h
link-mso19: Added struct definitions for the pattern generator config and the protoco...
[libsigrok.git] / hardware / link-mso19 / link-mso19.h
index 79078f5db6c198a6bbac33be6011a79a0d7b4bbb..f88ee723c536976948330ad19c3187ccc5c1d834 100644 (file)
@@ -2,6 +2,7 @@
  * This file is part of the sigrok project.
  *
  * Copyright (C) 2011 Daniel Ribeiro <drwyrm@gmail.com>
+ * Copyright (C) 2012 Renato Caldas <rmsc@fe.up.pt>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #ifndef SIGROK_LINK_MSO19_H
 #define SIGROK_LINK_MSO19_H
 
+/* Structure for the pattern generator state */
+struct mso_patgen {
+       /* Pattern generator clock config */
+       uint16_t clock;
+       /* Buffer start address */
+       uint16_t start;
+       /* Buffer end address */
+       uint16_t end;
+       /* Pattern generator config */
+       uint8_t config;
+       /* Samples buffer */
+       uint8_t buffer[1024];
+       /* Input/output configuration for the samples buffer (?)*/
+       uint8_t io[1024];
+       /* Number of loops for the pattern generator */
+       uint8_t loops;
+       /* Bit enable mask for the I/O lines */
+       uint8_t mask;
+};
+
+/* Data structure for the protocol trigger state */
+struct mso_prototrig {
+       /* Word match buffer */
+       uint8_t word[4];
+       /* Masks for the wordmatch buffer */
+       uint8_t mask[4];
+       /* SPI mode 0, 1, 2, 3. Set to 0 for I2C */
+       uint8_t spimode;
+};
+
 /* our private per-instance data */
 struct mso {
        /* info */