X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Funi-t-dmm%2Fapi.c;h=2ec99ca176c3e568d6f567bfb808953f0f461234;hb=53b4680fceab9351fc87b8c5b34854733f5fdac0;hp=f874cca0a99bd95877d6eb1a95608294229c2c4d;hpb=d97824e52e3367115860b60c10a5dbb63187f032;p=libsigrok.git diff --git a/hardware/uni-t-dmm/api.c b/hardware/uni-t-dmm/api.c index f874cca0..2ec99ca1 100644 --- a/hardware/uni-t-dmm/api.c +++ b/hardware/uni-t-dmm/api.c @@ -40,6 +40,8 @@ static const int32_t hwcaps[] = { SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut60a_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut60e_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut60g_driver_info; +SR_PRIV struct sr_dev_driver uni_t_ut61b_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61c_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut61e_driver_info; @@ -47,6 +49,7 @@ SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc830_driver_info; SR_PRIV struct sr_dev_driver voltcraft_vc840_driver_info; SR_PRIV struct sr_dev_driver tenma_72_7745_driver_info; +SR_PRIV struct sr_dev_driver tenma_72_7750_driver_info; SR_PRIV struct dmm_info udmms[] = { { @@ -70,6 +73,21 @@ SR_PRIV struct dmm_info udmms[] = { sr_fs9721_00_temp_c, &uni_t_ut60e_driver_info, receive_data_UNI_T_UT60E, }, + { + /* The baudrate is actually 19230, see "Note 1" below. */ + "UNI-T", "UT60G", 19200, + ES519XX_11B_PACKET_SIZE, + sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, + NULL, + &uni_t_ut60g_driver_info, receive_data_UNI_T_UT60G, + }, + { + "UNI-T", "UT61B", 2400, + FS9922_PACKET_SIZE, + sr_fs9922_packet_valid, sr_fs9922_parse, + NULL, + &uni_t_ut61b_driver_info, receive_data_UNI_T_UT61B, + }, { "UNI-T", "UT61C", 2400, FS9922_PACKET_SIZE, @@ -85,15 +103,7 @@ SR_PRIV struct dmm_info udmms[] = { &uni_t_ut61d_driver_info, receive_data_UNI_T_UT61D, }, { - /* - * Important: The actual baudrate of the Cyrustek ES51922 chip - * used in this DMM is 19230. However, the WCH CH9325 chip - * (UART to USB/HID) used in (some versions of) the UNI-T - * UT-D04 cable doesn't support 19230 baud. It only supports - * 19200, and setting an unsupported baudrate will result in - * the default of 2400 being used (which will not work with - * this DMM, of course). - */ + /* The baudrate is actually 19230, see "Note 1" below. */ "UNI-T", "UT61E", 19200, ES519XX_14B_PACKET_SIZE, sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, @@ -131,12 +141,26 @@ SR_PRIV struct dmm_info udmms[] = { FS9721_PACKET_SIZE, sr_fs9721_packet_valid, sr_fs9721_parse, sr_fs9721_00_temp_c, - &tenma_72_7745_driver_info, - /* This is a basic rebadge of the UT60E. */ - receive_data_UNI_T_UT60E, + &tenma_72_7745_driver_info, receive_data_TENMA_72_7745, + }, + { + /* The baudrate is actually 19230, see "Note 1" below. */ + "Tenma", "72-7750", 19200, + ES519XX_11B_PACKET_SIZE, + sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, + NULL, + &tenma_72_7750_driver_info, receive_data_TENMA_72_7750, }, }; +/* + * Note 1: The actual baudrate of the Cyrustek ES519xx chip used in this DMM + * is 19230. However, the WCH CH9325 chip (UART to USB/HID) used in (some + * versions of) the UNI-T UT-D04 cable doesn't support 19230 baud. It only + * supports 19200, and setting an unsupported baudrate will result in the + * default of 2400 being used (which will not work with this DMM, of course). + */ + static int dev_clear(int dmm) { return std_dev_clear(udmms[dmm].di, NULL); @@ -248,11 +272,11 @@ static int cleanup(int dmm) } static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, - const struct sr_probe_group *probe_group) + const struct sr_channel_group *cg) { struct dev_context *devc; - (void)probe_group; + (void)cg; devc = sdi->priv; @@ -283,10 +307,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, } static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, - const struct sr_probe_group *probe_group) + const struct sr_channel_group *cg) { (void)sdi; - (void)probe_group; + (void)cg; switch (key) { case SR_CONF_SCAN_OPTIONS: @@ -391,6 +415,8 @@ SR_PRIV struct sr_dev_driver ID##_driver_info = { \ DRV(tecpel_dmm_8061, TECPEL_DMM_8061, "tecpel-dmm-8061", "Tecpel DMM-8061") DRV(uni_t_ut60a, UNI_T_UT60A, "uni-t-ut60a", "UNI-T UT60A") DRV(uni_t_ut60e, UNI_T_UT60E, "uni-t-ut60e", "UNI-T UT60E") +DRV(uni_t_ut60g, UNI_T_UT60G, "uni-t-ut60g", "UNI-T UT60G") +DRV(uni_t_ut61b, UNI_T_UT61B, "uni-t-ut61b", "UNI-T UT61B") DRV(uni_t_ut61c, UNI_T_UT61C, "uni-t-ut61c", "UNI-T UT61C") DRV(uni_t_ut61d, UNI_T_UT61D, "uni-t-ut61d", "UNI-T UT61D") DRV(uni_t_ut61e, UNI_T_UT61E, "uni-t-ut61e", "UNI-T UT61E") @@ -398,3 +424,4 @@ DRV(voltcraft_vc820, VOLTCRAFT_VC820, "voltcraft-vc820", "Voltcraft VC-820") DRV(voltcraft_vc830, VOLTCRAFT_VC830, "voltcraft-vc830", "Voltcraft VC-830") DRV(voltcraft_vc840, VOLTCRAFT_VC840, "voltcraft-vc840", "Voltcraft VC-840") DRV(tenma_72_7745, TENMA_72_7745, "tenma-72-7745", "Tenma 72-7745") +DRV(tenma_72_7750, TENMA_72_7750, "tenma-72-7750", "Tenma 72-7750")