X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fcommon%2Fdmm%2Ffs9721.c;fp=hardware%2Fcommon%2Fdmm%2Ffs9721.c;h=85de00746ca51e08bc701377b54a1d675eb09598;hb=d327972b9720b4c69b3aaca895416121757806e0;hp=9b195d0bc5d479702bef37875bf0d79bc4c19afb;hpb=641d8f276ce52e84903a3d918187cf4d74c7dda4;p=libsigrok.git diff --git a/hardware/common/dmm/fs9721.c b/hardware/common/dmm/fs9721.c index 9b195d0b..85de0074 100644 --- a/hardware/common/dmm/fs9721.c +++ b/hardware/common/dmm/fs9721.c @@ -421,3 +421,25 @@ SR_PRIV void sr_fs9721_01_10_temp_f_c(struct sr_datafeed_analog *analog, void *i analog->unit = SR_UNIT_CELSIUS; } } + +SR_PRIV void sr_fs9721_max_c_min(struct sr_datafeed_analog *analog, void *info) +{ + struct fs9721_info *info_local; + + info_local = (struct fs9721_info *)info; + + /* User-defined FS9721_LP3 flag 'c2c1_00' means MAX. */ + if (info_local->is_c2c1_00) + analog->mqflags |= SR_MQFLAG_MAX; + + /* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (C). */ + if (info_local->is_c2c1_01) { + analog->mq = SR_MQ_TEMPERATURE; + analog->unit = SR_UNIT_CELSIUS; + } + + /* User-defined FS9721_LP3 flag 'c2c1_11' means MIN. */ + if (info_local->is_c2c1_11) + analog->mqflags |= SR_MQFLAG_MIN; + +}