summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
5952553)
- Added the analog probe (unfinished).
- Reset trigger to state to 0 before capture, just incase the scope is in
the middle of a capture.
#include "protocol.h"
static const int hwcaps[] = {
#include "protocol.h"
static const int hwcaps[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_SLOPE,
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_SLOPE,
* See also: http://www.linkinstruments.com/images/mso19_1113.gif
*/
SR_PRIV const char *mso19_probe_names[NUM_PROBES + 1] = {
* See also: http://www.linkinstruments.com/images/mso19_1113.gif
*/
SR_PRIV const char *mso19_probe_names[NUM_PROBES + 1] = {
- "0", "1", "2", "3", "4", "5", "6", "7", NULL
+ /* Note: DSO needs to be first. */
+ "DSO", "0", "1", "2", "3", "4", "5", "6", "7", NULL,
};
static const struct sr_samplerates samplerates = {
};
static const struct sr_samplerates samplerates = {
GSList *l;
struct sr_config *src;
struct udev *udev;
GSList *l;
struct sr_config *src;
struct udev *udev;
for (i = 0; i < NUM_PROBES; i++) {
struct sr_probe *probe;
for (i = 0; i < NUM_PROBES; i++) {
struct sr_probe *probe;
- if (!(probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+ ptype = (i == 0) ? SR_PROBE_ANALOG : SR_PROBE_LOGIC;
+ if (!(probe = sr_probe_new(i, ptype, TRUE,
mso19_probe_names[i])))
return 0;
sdi->probes = g_slist_append(sdi->probes, probe);
mso19_probe_names[i])))
return 0;
sdi->probes = g_slist_append(sdi->probes, probe);
if (ret != SR_OK)
return ret;
if (ret != SR_OK)
return ret;
+ /* Reset trigger state. */
+ devc->trigger_state = 0x00;
+
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
+ /* Our first probe is analog, the other 8 are of type 'logic'. */
+ /* TODO. */
+
sr_source_add(devc->serial->fd, G_IO_IN, -1, mso_receive_data, cb_data);
return SR_OK;
sr_source_add(devc->serial->fd, G_IO_IN, -1, mso_receive_data, cb_data);
return SR_OK;
-SR_PRIV int mso_check_trigger(struct sr_serial_dev_inst *serial, uint8_t * info)
+SR_PRIV int mso_check_trigger(struct sr_serial_dev_inst *serial, uint8_t *info)
{
uint16_t ops[] = { mso_trans(REG_TRIGGER, 0) };
int ret;
{
uint16_t ops[] = { mso_trans(REG_TRIGGER, 0) };
int ret;
uint8_t buf = 0;
if (serial_read(serial, &buf, 1) != 1) /* FIXME: Need timeout */
ret = SR_ERR;
uint8_t buf = 0;
if (serial_read(serial, &buf, 1) != 1) /* FIXME: Need timeout */
ret = SR_ERR;
+ if (!info)
+ *info = buf;
sr_dbg("Trigger state is: 0x%x.", *info);
return ret;
sr_dbg("Trigger state is: 0x%x.", *info);
return ret;
#define USB_VENDOR "3195"
#define USB_PRODUCT "f190"
#define USB_VENDOR "3195"
#define USB_PRODUCT "f190"
+#define NUM_PROBES (1 + 8)
#define NUM_TRIGGER_STAGES 4
#define TRIGGER_TYPE "01" //the first r/f is used for the whole group
#define SERIALCOMM "460800/8n1/flow=2"
#define NUM_TRIGGER_STAGES 4
#define TRIGGER_TYPE "01" //the first r/f is used for the whole group
#define SERIALCOMM "460800/8n1/flow=2"