]> sigrok.org Git - libsigrok.git/commitdiff
kingst-la2016: style nit, drop unnecessary typedefs
authorGerhard Sittig <redacted>
Sun, 23 Jan 2022 19:05:34 +0000 (20:05 +0100)
committerGerhard Sittig <redacted>
Sun, 6 Feb 2022 17:53:53 +0000 (18:53 +0100)
These typedefs in the previous implementation merely seem to save a few
key strokes while typing. Not good enough a reason to keep them.

src/hardware/kingst-la2016/protocol.c
src/hardware/kingst-la2016/protocol.h

index 16892d6b422dc38b16d61e2a1b326809aa8b316e..d42ea8ab51b1de4941c7950247cdb76afbd58611 100644 (file)
@@ -512,7 +512,7 @@ static int set_trigger_config(const struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
        struct sr_trigger *trigger;
-       trigger_cfg_t cfg;
+       struct trigger_cfg cfg;
        GSList *stages;
        GSList *channel;
        struct sr_trigger_stage *stage1;
index 1514171555a3d5fa0cc7abda30921e5502e011ac..353176d3751fd18006a6a1fa382452e026601ea0 100644 (file)
 
 #define LA2016_CONVBUFFER_SIZE (4 * 1024 * 1024)
 
-typedef struct pwm_setting_dev {
+struct pwm_setting_dev {
        uint32_t period;
        uint32_t duty;
-} pwm_setting_dev_t;
+};
 
-typedef struct trigger_cfg {
+struct trigger_cfg {
        uint32_t channels;
        uint32_t enabled;
        uint32_t level;
        uint32_t high_or_falling;
-} trigger_cfg_t;
+};
 
-typedef struct capture_info {
+struct capture_info {
        uint32_t n_rep_packets;
        uint32_t n_rep_packets_before_trigger;
        uint32_t write_pos;
-} capture_info_t;
+};
 
 #define NUM_PACKETS_IN_CHUNK   5
 #define TRANSFER_PACKET_LENGTH 16
 
-typedef struct pwm_setting {
+struct pwm_setting {
        gboolean enabled;
        float freq;
        float duty;
-} pwm_setting_t;
+};
 
 struct dev_context {
        struct sr_context *ctx;
        uint64_t fw_uploaded;
 
        /* User specified parameters. */
-       pwm_setting_t pwm_setting[LA2016_NUM_PWMCH_MAX];
+       struct pwm_setting pwm_setting[LA2016_NUM_PWMCH_MAX];
        unsigned int threshold_voltage_idx;
        float threshold_voltage;
        uint64_t max_samplerate;
@@ -121,7 +121,7 @@ struct dev_context {
        gboolean trigger_involved;
        gboolean completion_seen;
        gboolean download_finished;
-       capture_info_t info;
+       struct capture_info info;
        unsigned int n_transfer_packets_to_read; /* each with 5 acq packets */
        unsigned int n_bytes_to_read;
        unsigned int n_reps_until_trigger;