saleae-logic-pro: Driver name consistency fixes.
This commit is contained in:
parent
ca7d19b5c8
commit
b6189f7c8a
|
@ -452,11 +452,11 @@ src_libdrivers_la_SOURCES += \
|
||||||
src/hardware/saleae-logic16/protocol.c \
|
src/hardware/saleae-logic16/protocol.c \
|
||||||
src/hardware/saleae-logic16/api.c
|
src/hardware/saleae-logic16/api.c
|
||||||
endif
|
endif
|
||||||
if HW_SALEAE_LOGICPRO
|
if HW_SALEAE_LOGIC_PRO
|
||||||
src_libdrivers_la_SOURCES += \
|
src_libdrivers_la_SOURCES += \
|
||||||
src/hardware/saleae-logicpro/protocol.h \
|
src/hardware/saleae-logic-pro/protocol.h \
|
||||||
src/hardware/saleae-logicpro/protocol.c \
|
src/hardware/saleae-logic-pro/protocol.c \
|
||||||
src/hardware/saleae-logicpro/api.c
|
src/hardware/saleae-logic-pro/api.c
|
||||||
endif
|
endif
|
||||||
if HW_SCPI_PPS
|
if HW_SCPI_PPS
|
||||||
src_libdrivers_la_SOURCES += \
|
src_libdrivers_la_SOURCES += \
|
||||||
|
|
|
@ -264,7 +264,7 @@ SR_DRIVER([Pipistrello-OLS], [pipistrello-ols], [libftdi])
|
||||||
SR_DRIVER([Rigol DS], [rigol-ds])
|
SR_DRIVER([Rigol DS], [rigol-ds])
|
||||||
SR_DRIVER([Rohde&Schwarz SME-0x], [rohde-schwarz-sme-0x], [libserialport])
|
SR_DRIVER([Rohde&Schwarz SME-0x], [rohde-schwarz-sme-0x], [libserialport])
|
||||||
SR_DRIVER([Saleae Logic16], [saleae-logic16], [libusb])
|
SR_DRIVER([Saleae Logic16], [saleae-logic16], [libusb])
|
||||||
SR_DRIVER([Saleae Logic Pro], [saleae-logicpro], [libusb])
|
SR_DRIVER([Saleae Logic Pro], [saleae-logic-pro], [libusb])
|
||||||
SR_DRIVER([SCPI PPS], [scpi-pps])
|
SR_DRIVER([SCPI PPS], [scpi-pps])
|
||||||
SR_DRIVER([serial DMM], [serial-dmm], [libserialport])
|
SR_DRIVER([serial DMM], [serial-dmm], [libserialport])
|
||||||
SR_DRIVER([serial LCR], [serial-lcr], [libserialport])
|
SR_DRIVER([serial LCR], [serial-lcr], [libserialport])
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define BUF_SIZE (16*1024)
|
#define BUF_SIZE (16*1024)
|
||||||
#define BUF_TIMEOUT (1000*1000)
|
#define BUF_TIMEOUT (1000*1000)
|
||||||
|
|
||||||
SR_PRIV struct sr_dev_driver saleae_logicpro_driver_info;
|
SR_PRIV struct sr_dev_driver saleae_logic_pro_driver_info;
|
||||||
|
|
||||||
static const uint32_t drvopts[] = {
|
static const uint32_t drvopts[] = {
|
||||||
SR_CONF_LOGIC_ANALYZER,
|
SR_CONF_LOGIC_ANALYZER,
|
||||||
|
@ -357,11 +357,11 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
|
||||||
if (sdi->status != SR_ST_ACTIVE)
|
if (sdi->status != SR_ST_ACTIVE)
|
||||||
return SR_ERR_DEV_CLOSED;
|
return SR_ERR_DEV_CLOSED;
|
||||||
|
|
||||||
ret = saleae_logicpro_init(sdi);
|
ret = saleae_logic_pro_init(sdi);
|
||||||
if (ret != SR_OK)
|
if (ret != SR_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = saleae_logicpro_prepare(sdi);
|
ret = saleae_logic_pro_prepare(sdi);
|
||||||
if (ret != SR_OK)
|
if (ret != SR_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
|
||||||
transfer = libusb_alloc_transfer(0);
|
transfer = libusb_alloc_transfer(0);
|
||||||
libusb_fill_bulk_transfer(transfer, usb->devhdl,
|
libusb_fill_bulk_transfer(transfer, usb->devhdl,
|
||||||
2 | LIBUSB_ENDPOINT_IN, buf, BUF_SIZE,
|
2 | LIBUSB_ENDPOINT_IN, buf, BUF_SIZE,
|
||||||
saleae_logicpro_receive_data, (void *)sdi, BUF_TIMEOUT);
|
saleae_logic_pro_receive_data, (void *)sdi, BUF_TIMEOUT);
|
||||||
if ((ret = libusb_submit_transfer(transfer)) != 0) {
|
if ((ret = libusb_submit_transfer(transfer)) != 0) {
|
||||||
sr_err("Failed to submit transfer: %s.",
|
sr_err("Failed to submit transfer: %s.",
|
||||||
libusb_error_name(ret));
|
libusb_error_name(ret));
|
||||||
|
@ -393,7 +393,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
|
||||||
|
|
||||||
std_session_send_df_header(sdi);
|
std_session_send_df_header(sdi);
|
||||||
|
|
||||||
saleae_logicpro_start(sdi);
|
saleae_logic_pro_start(sdi);
|
||||||
if (ret != SR_OK)
|
if (ret != SR_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
|
||||||
if (sdi->status != SR_ST_ACTIVE)
|
if (sdi->status != SR_ST_ACTIVE)
|
||||||
return SR_ERR_DEV_CLOSED;
|
return SR_ERR_DEV_CLOSED;
|
||||||
|
|
||||||
saleae_logicpro_stop(sdi);
|
saleae_logic_pro_stop(sdi);
|
||||||
|
|
||||||
std_session_send_df_end(sdi);
|
std_session_send_df_end(sdi);
|
||||||
|
|
||||||
|
@ -419,9 +419,9 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
SR_PRIV struct sr_dev_driver saleae_logicpro_driver_info = {
|
SR_PRIV struct sr_dev_driver saleae_logic_pro_driver_info = {
|
||||||
.name = "saleae-logicpro",
|
.name = "saleae-logic-pro",
|
||||||
.longname = "saleae-logicpro",
|
.longname = "Saleae Logic Pro",
|
||||||
.api_version = 1,
|
.api_version = 1,
|
||||||
.init = std_init,
|
.init = std_init,
|
||||||
.cleanup = std_cleanup,
|
.cleanup = std_cleanup,
|
||||||
|
@ -438,4 +438,4 @@ SR_PRIV struct sr_dev_driver saleae_logicpro_driver_info = {
|
||||||
.context = NULL,
|
.context = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
SR_REGISTER_DEV_DRIVER(saleae_logicpro_driver_info);
|
SR_REGISTER_DEV_DRIVER(saleae_logic_pro_driver_info);
|
|
@ -437,7 +437,7 @@ static int configure_channels(const struct sr_dev_inst *sdi)
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
SR_PRIV int saleae_logicpro_init(const struct sr_dev_inst *sdi)
|
SR_PRIV int saleae_logic_pro_init(const struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
reseed(sdi);
|
reseed(sdi);
|
||||||
get_firmware_version(sdi);
|
get_firmware_version(sdi);
|
||||||
|
@ -447,7 +447,7 @@ SR_PRIV int saleae_logicpro_init(const struct sr_dev_inst *sdi)
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
SR_PRIV int saleae_logicpro_prepare(const struct sr_dev_inst *sdi)
|
SR_PRIV int saleae_logic_pro_prepare(const struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
struct dev_context *devc = sdi->priv;
|
struct dev_context *devc = sdi->priv;
|
||||||
uint8_t regs_unknown[][2] = {
|
uint8_t regs_unknown[][2] = {
|
||||||
|
@ -517,7 +517,7 @@ SR_PRIV int saleae_logicpro_prepare(const struct sr_dev_inst *sdi)
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
SR_PRIV int saleae_logicpro_start(const struct sr_dev_inst *sdi)
|
SR_PRIV int saleae_logic_pro_start(const struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
struct dev_context *devc = sdi->priv;
|
struct dev_context *devc = sdi->priv;
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@ SR_PRIV int saleae_logicpro_start(const struct sr_dev_inst *sdi)
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
SR_PRIV int saleae_logicpro_stop(const struct sr_dev_inst *sdi)
|
SR_PRIV int saleae_logic_pro_stop(const struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
uint8_t stop_req[] = {0x00, 0x02};
|
uint8_t stop_req[] = {0x00, 0x02};
|
||||||
uint8_t stop_rsp[2] = {};
|
uint8_t stop_rsp[2] = {};
|
||||||
|
@ -540,7 +540,7 @@ SR_PRIV int saleae_logicpro_stop(const struct sr_dev_inst *sdi)
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void saleae_logicpro_send_data(const struct sr_dev_inst *sdi,
|
static void saleae_logic_pro_send_data(const struct sr_dev_inst *sdi,
|
||||||
void *data, size_t length, size_t unitsize)
|
void *data, size_t length, size_t unitsize)
|
||||||
{
|
{
|
||||||
const struct sr_datafeed_logic logic = {
|
const struct sr_datafeed_logic logic = {
|
||||||
|
@ -561,7 +561,7 @@ static void saleae_logicpro_send_data(const struct sr_dev_inst *sdi,
|
||||||
* One batch from the device consists of 32 samples per active digital channel.
|
* One batch from the device consists of 32 samples per active digital channel.
|
||||||
* This stream of batches is packed into USB packets with 16384 bytes each.
|
* This stream of batches is packed into USB packets with 16384 bytes each.
|
||||||
*/
|
*/
|
||||||
static void saleae_logicpro_convert_data(const struct sr_dev_inst *sdi,
|
static void saleae_logic_pro_convert_data(const struct sr_dev_inst *sdi,
|
||||||
const uint32_t *src, size_t srccnt)
|
const uint32_t *src, size_t srccnt)
|
||||||
{
|
{
|
||||||
struct dev_context *devc = sdi->priv;
|
struct dev_context *devc = sdi->priv;
|
||||||
|
@ -601,7 +601,7 @@ static void saleae_logicpro_convert_data(const struct sr_dev_inst *sdi,
|
||||||
devc->batch_index = batch_index;
|
devc->batch_index = batch_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
SR_PRIV void LIBUSB_CALL saleae_logicpro_receive_data(struct libusb_transfer *transfer)
|
SR_PRIV void LIBUSB_CALL saleae_logic_pro_receive_data(struct libusb_transfer *transfer)
|
||||||
{
|
{
|
||||||
const struct sr_dev_inst *sdi = transfer->user_data;
|
const struct sr_dev_inst *sdi = transfer->user_data;
|
||||||
struct dev_context *devc = sdi->priv;
|
struct dev_context *devc = sdi->priv;
|
||||||
|
@ -619,8 +619,8 @@ SR_PRIV void LIBUSB_CALL saleae_logicpro_receive_data(struct libusb_transfer *tr
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
saleae_logicpro_convert_data(sdi, (uint32_t*)transfer->buffer, 16*1024/4);
|
saleae_logic_pro_convert_data(sdi, (uint32_t*)transfer->buffer, 16*1024/4);
|
||||||
saleae_logicpro_send_data(sdi, devc->conv_buffer, devc->conv_size, 2);
|
saleae_logic_pro_send_data(sdi, devc->conv_buffer, devc->conv_size, 2);
|
||||||
|
|
||||||
if ((ret = libusb_submit_transfer(transfer)) != LIBUSB_SUCCESS)
|
if ((ret = libusb_submit_transfer(transfer)) != LIBUSB_SUCCESS)
|
||||||
sr_dbg("FIXME resubmit failed");
|
sr_dbg("FIXME resubmit failed");
|
|
@ -17,15 +17,15 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBSIGROK_HARDWARE_SALEAE_LOGICPRO_PROTOCOL_H
|
#ifndef LIBSIGROK_HARDWARE_SALEAE_LOGIC_PRO_PROTOCOL_H
|
||||||
#define LIBSIGROK_HARDWARE_SALEAE_LOGICPRO_PROTOCOL_H
|
#define LIBSIGROK_HARDWARE_SALEAE_LOGIC_PRO_PROTOCOL_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <libsigrok/libsigrok.h>
|
#include <libsigrok/libsigrok.h>
|
||||||
#include "libsigrok-internal.h"
|
#include "libsigrok-internal.h"
|
||||||
|
|
||||||
#define LOG_PREFIX "saleae-logicpro"
|
#define LOG_PREFIX "saleae-logic-pro"
|
||||||
|
|
||||||
/* 16 channels * 32 samples */
|
/* 16 channels * 32 samples */
|
||||||
#define CONV_BATCH_SIZE (2*32)
|
#define CONV_BATCH_SIZE (2*32)
|
||||||
|
@ -57,10 +57,10 @@ struct dev_context {
|
||||||
unsigned int batch_index;
|
unsigned int batch_index;
|
||||||
};
|
};
|
||||||
|
|
||||||
SR_PRIV int saleae_logicpro_init(const struct sr_dev_inst *sdi);
|
SR_PRIV int saleae_logic_pro_init(const struct sr_dev_inst *sdi);
|
||||||
SR_PRIV int saleae_logicpro_prepare(const struct sr_dev_inst *sdi);
|
SR_PRIV int saleae_logic_pro_prepare(const struct sr_dev_inst *sdi);
|
||||||
SR_PRIV int saleae_logicpro_start(const struct sr_dev_inst *sdi);
|
SR_PRIV int saleae_logic_pro_start(const struct sr_dev_inst *sdi);
|
||||||
SR_PRIV int saleae_logicpro_stop(const struct sr_dev_inst *sdi);
|
SR_PRIV int saleae_logic_pro_stop(const struct sr_dev_inst *sdi);
|
||||||
SR_PRIV void LIBUSB_CALL saleae_logicpro_receive_data(struct libusb_transfer *transfer);
|
SR_PRIV void LIBUSB_CALL saleae_logic_pro_receive_data(struct libusb_transfer *transfer);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue