microchip-pickit2: Minor cosmetics.

This commit is contained in:
Uwe Hermann 2018-12-20 08:32:56 +01:00
parent bde6a99b33
commit e760f2cdaf
3 changed files with 8 additions and 11 deletions

View File

@ -42,7 +42,7 @@
* - The current implementation silently accepts sample count limits beyond
* 1024, just won't provide more than 1024 samples to the session. A
* future implementation could cap the settings upon reception. Apps
* like Pulseview may not be able to specify 1024, and pass 1000 or
* like PulseView may not be able to specify 1024, and pass 1000 or
* 2000 instead (the latter results in 1024 getting used).
* - The manual suggests that users can assign names to devices. The
* current implementation supports conn= specs with USB VID:PID pairs
@ -264,10 +264,10 @@ static int config_get(uint32_t key, GVariant **data,
struct sr_usb_dev_inst *usb;
uint64_t rate, ratio;
devc = sdi ? sdi->priv : NULL;
(void)devc;
(void)cg;
devc = sdi ? sdi->priv : NULL;
switch (key) {
case SR_CONF_CONN:
if (!sdi->conn)
@ -296,10 +296,10 @@ static int config_set(uint32_t key, GVariant *data,
struct dev_context *devc;
int idx;
devc = sdi ? sdi->priv : NULL;
(void)cg;
devc = sdi ? sdi->priv : NULL;
switch (key) {
case SR_CONF_SAMPLERATE:
if (!devc)
@ -454,5 +454,4 @@ static struct sr_dev_driver microchip_pickit2_driver_info = {
.dev_acquisition_stop = dev_acquisition_stop,
.context = NULL,
};
SR_REGISTER_DEV_DRIVER(microchip_pickit2_driver_info);

View File

@ -42,7 +42,6 @@ struct pickit2_cmd {
static void pickit2_cmd_clear(struct pickit2_cmd *cmd)
{
if (!cmd)
return;
memset(&cmd->raw[0], PICKIT2_CMD_PADCHAR, PICKIT2_PACKET_LENGTH);
@ -51,7 +50,6 @@ static void pickit2_cmd_clear(struct pickit2_cmd *cmd)
static void pickit2_cmd_append(struct pickit2_cmd *cmd, uint8_t b)
{
if (!cmd)
return;
if (cmd->length == PICKIT2_PACKET_LENGTH)
@ -72,7 +70,7 @@ static int pickit2_usb_send(const struct sr_dev_inst *sdi, struct pickit2_cmd *c
return SR_ERR_ARG;
text = sr_hexdump_new(&cmd->raw[0], cmd->length);
sr_dbg("usb sent: %s", text->str);
sr_dbg("USB sent: %s", text->str);
sr_hexdump_free(text);
ret = libusb_interrupt_transfer(usb->devhdl,
@ -117,7 +115,7 @@ static int pickit2_usb_recv(const struct sr_dev_inst *sdi, struct pickit2_cmd *c
}
text = sr_hexdump_new(&cmd->raw[0], rcvd);
sr_dbg("usb recv: %s", text->str);
sr_dbg("USB recv: %s", text->str);
sr_hexdump_free(text);
cmd->length = rcvd;

View File

@ -49,7 +49,7 @@ struct dev_context {
size_t curr_captureratio_idx;
struct sr_sw_limits sw_limits;
gboolean detached_kernel_driver;
int32_t triggers[PICKIT2_CHANNEL_COUNT]; /**!< see \ref SR_TRIGGER_ZERO et al */
int32_t triggers[PICKIT2_CHANNEL_COUNT]; /**@< see @ref SR_TRIGGER_ZERO et al */
size_t trigpos;
uint8_t samples_raw[PICKIT2_SAMPLE_RAWLEN];
uint8_t samples_conv[PICKIT2_SAMPLE_COUNT];