X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fasix-sigma%2Fprotocol.c;h=e2c34e5c9169699df381d5b8fecbbab3e8685849;hb=8ebad343709aad6ef4d5aa83a2633690ef313de5;hp=41c6dc878cba90fa460d8895548fa553bf527cbb;hpb=db85496ed16eb186a62b16be7d59d61f78e07d81;p=libsigrok.git diff --git a/src/hardware/asix-sigma/protocol.c b/src/hardware/asix-sigma/protocol.c index 41c6dc87..e2c34e5c 100644 --- a/src/hardware/asix-sigma/protocol.c +++ b/src/hardware/asix-sigma/protocol.c @@ -78,12 +78,11 @@ static int sigma_write(void *buf, size_t size, struct dev_context *devc) int ret; ret = ftdi_write_data(&devc->ftdic, (unsigned char *)buf, size); - if (ret < 0) { + if (ret < 0) sr_err("ftdi_write_data failed: %s", ftdi_get_error_string(&devc->ftdic)); - } else if ((size_t) ret != size) { + else if ((size_t) ret != size) sr_err("ftdi_write_data did not complete write."); - } return ret; } @@ -646,16 +645,13 @@ SR_PRIV int sigma_convert_trigger(const struct sr_dev_inst *sdi) if (match->match == SR_TRIGGER_ONE) { devc->trigger.simplevalue |= channelbit; devc->trigger.simplemask |= channelbit; - } - else if (match->match == SR_TRIGGER_ZERO) { + } else if (match->match == SR_TRIGGER_ZERO) { devc->trigger.simplevalue &= ~channelbit; devc->trigger.simplemask |= channelbit; - } - else if (match->match == SR_TRIGGER_FALLING) { + } else if (match->match == SR_TRIGGER_FALLING) { devc->trigger.fallingmask |= channelbit; trigger_set++; - } - else if (match->match == SR_TRIGGER_RISING) { + } else if (match->match == SR_TRIGGER_RISING) { devc->trigger.risingmask |= channelbit; trigger_set++; }