]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/demo/demo.c
Fix a bunch of typos.
[libsigrok.git] / src / hardware / demo / demo.c
index a3deecc3b68029d81cb0577d80e2cadc4cd57d21..63afcd106a67e54bd8a396c7224a0f5c8cd9ff52 100644 (file)
@@ -212,14 +212,13 @@ static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
                }
                ag->num_samples = last_end;
                break;
-
        case PATTERN_SINE:
                frequency = (double) sample_rate / ANALOG_SAMPLES_PER_PERIOD;
 
                /* Make sure the number of samples we put out is an integer
                 * multiple of our period size */
                /* FIXME we actually need only one period. A ringbuffer would be
-                * usefull here.*/
+                * useful here. */
                while (num_samples % ANALOG_SAMPLES_PER_PERIOD != 0)
                        num_samples--;
 
@@ -231,7 +230,6 @@ static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
 
                ag->num_samples = num_samples;
                break;
-
        case PATTERN_TRIANGLE:
                frequency = (double) sample_rate / ANALOG_SAMPLES_PER_PERIOD;
 
@@ -246,7 +244,6 @@ static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
 
                ag->num_samples = num_samples;
                break;
-
        case PATTERN_SAWTOOTH:
                frequency = (double) sample_rate / ANALOG_SAMPLES_PER_PERIOD;
 
@@ -609,11 +606,11 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                switch (key) {
                case SR_CONF_DEVICE_OPTIONS:
                        if (ch->type == SR_CHANNEL_LOGIC)
-                               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
+                               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                                devopts_cg_logic, ARRAY_SIZE(devopts_cg_logic),
                                                sizeof(uint32_t));
                        else if (ch->type == SR_CHANNEL_ANALOG)
-                               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
+                               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                                devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog),
                                                sizeof(uint32_t));
                        else