X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmanson-hcs-3xxx%2Fprotocol.c;h=d36e25042ccc93e2a9e59a7801ae3f3f48e6b1a4;hb=471ac344a5885c73f58cbcd0d0c87f416926afc2;hp=5b9383269f462a5ad9ea64590005d2d2c2dc9357;hpb=2463ec77fe51a7d7ec37f32ddd2f024b5f328f52;p=libsigrok.git diff --git a/src/hardware/manson-hcs-3xxx/protocol.c b/src/hardware/manson-hcs-3xxx/protocol.c index 5b938326..d36e2504 100644 --- a/src/hardware/manson-hcs-3xxx/protocol.c +++ b/src/hardware/manson-hcs-3xxx/protocol.c @@ -15,14 +15,16 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ -/** @file - * Manson HCS-3xxx Series power supply driver - * @internal - */ +/** + * @file + * + * Manson HCS-3xxx Series power supply driver + * + * @internal + */ #include #include "protocol.h" @@ -56,10 +58,12 @@ SR_PRIV int hcs_send_cmd(struct sr_serial_dev_inst *serial, const char *cmd, ... /** * Read data from interface into buffer blocking until @a lines number of \\r chars * received. + * * @param serial Previously initialized serial port structure. * @param[in] lines Number of \\r-terminated lines to read (1-n). - * @param buf Buffer for result. Contents is NUL-terminated on success. + * @param buf Buffer for result. Contents is NUL-terminated on success. * @param[in] buflen Buffer length (>0). + * * @retval SR_OK Lines received and ending with "OK\r" (success). * @retval SR_ERR Error. * @retval SR_ERR_ARG Invalid argument. @@ -130,7 +134,7 @@ static void send_sample(struct sr_dev_inst *sdi) devc = sdi->priv; - sr_analog_init(&analog, &encoding, &meaning, &spec, 0); + sr_analog_init(&analog, &encoding, &meaning, &spec, 2); packet.type = SR_DF_ANALOG; packet.payload = &analog;