X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fkingst-la2016%2Fprotocol.h;h=353176d3751fd18006a6a1fa382452e026601ea0;hb=66f5f6978e7f8a3ff3fc97573e79faca44f8775b;hp=1514171555a3d5fa0cc7abda30921e5502e011ac;hpb=86d77b75faadd96304a8e83db192bd5ebd972070;p=libsigrok.git diff --git a/src/hardware/kingst-la2016/protocol.h b/src/hardware/kingst-la2016/protocol.h index 15141715..353176d3 100644 --- a/src/hardware/kingst-la2016/protocol.h +++ b/src/hardware/kingst-la2016/protocol.h @@ -76,39 +76,39 @@ #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;