]> sigrok.org Git - libsigrok.git/blame - src/hardware/demo/api.c
demo: add convenient bit mask for "all logic channels"
[libsigrok.git] / src / hardware / demo / api.c
CommitLineData
6239c175 1/*
50985c20 2 * This file is part of the libsigrok project.
6239c175
UH
3 *
4 * Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
fc96e6f8 5 * Copyright (C) 2011 Olivier Fauchon <olivier@aixmarseille.com>
c216d623 6 * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
7a8a1aba 7 * Copyright (C) 2015 Bartosz Golaszewski <bgolaszewski@baylibre.com>
6239c175
UH
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
2ea1fdf1 20 * along with this program; if not, see <http://www.gnu.org/licenses/>.
6239c175
UH
21 */
22
6ec6c43b 23#include <config.h>
6239c175
UH
24#include <stdlib.h>
25#include <string.h>
4374219b 26#include <math.h>
c1aae900 27#include <libsigrok/libsigrok.h>
45c59c8b 28#include "libsigrok-internal.h"
ba508e22 29#include "protocol.h"
92bcedf6 30
7db90279 31#define DEFAULT_NUM_LOGIC_CHANNELS 8
b1e6eec6 32#define DEFAULT_LOGIC_PATTERN PATTERN_SIGROK
c03ed397 33
b1e6eec6 34#define DEFAULT_NUM_ANALOG_CHANNELS 4
d9251a2c 35#define DEFAULT_ANALOG_AMPLITUDE 10
85b5af06 36
77463bd3 37/* Note: No spaces allowed because of sigrok-cli. */
8b2d41ed 38static const char *logic_pattern_str[] = {
61c39f54
BV
39 "sigrok",
40 "random",
41 "incremental",
77463bd3
SA
42 "walking-one",
43 "walking-zero",
61c39f54
BV
44 "all-low",
45 "all-high",
81d53a29 46 "squid",
61c39f54
BV
47};
48
55fb76b3
UH
49static const uint32_t scanopts[] = {
50 SR_CONF_NUM_LOGIC_CHANNELS,
51 SR_CONF_NUM_ANALOG_CHANNELS,
52};
53
1e4a7cac
BV
54static const uint32_t drvopts[] = {
55 SR_CONF_DEMO_DEV,
56 SR_CONF_LOGIC_ANALYZER,
57 SR_CONF_OSCILLOSCOPE,
58};
59
390795c0 60static const uint32_t devopts[] = {
e91bb0a6 61 SR_CONF_CONTINUOUS,
5827f61b
BV
62 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
63 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
390795c0 64 SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
7a8a1aba
BG
65 SR_CONF_AVERAGING | SR_CONF_GET | SR_CONF_SET,
66 SR_CONF_AVG_SAMPLES | SR_CONF_GET | SR_CONF_SET,
390795c0
BV
67};
68
69static const uint32_t devopts_cg_logic[] = {
f12d9979 70 SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
49224c28
BV
71};
72
e2b99f04
SA
73static const uint32_t devopts_cg_analog_group[] = {
74 SR_CONF_AMPLITUDE | SR_CONF_GET | SR_CONF_SET,
75};
76
77static const uint32_t devopts_cg_analog_channel[] = {
f12d9979
BV
78 SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
79 SR_CONF_AMPLITUDE | SR_CONF_GET | SR_CONF_SET,
7a1da331
BV
80};
81
d00088ca
BV
82static const uint64_t samplerates[] = {
83 SR_HZ(1),
84 SR_GHZ(1),
85 SR_HZ(1),
4bfbf9fc
BV
86};
87
4f840ce9 88static GSList *scan(struct sr_dev_driver *di, GSList *options)
6239c175 89{
33ef7573 90 struct dev_context *devc;
c07f60e7 91 struct sr_dev_inst *sdi;
ba7dd8bb 92 struct sr_channel *ch;
49224c28 93 struct sr_channel_group *cg, *acg;
c07f60e7 94 struct sr_config *src;
8b2d41ed 95 struct analog_gen *ag;
43376f33 96 GSList *l;
ba7dd8bb
UH
97 int num_logic_channels, num_analog_channels, pattern, i;
98 char channel_name[16];
067d0716 99
3f239f08
UH
100 num_logic_channels = DEFAULT_NUM_LOGIC_CHANNELS;
101 num_analog_channels = DEFAULT_NUM_ANALOG_CHANNELS;
c07f60e7
BV
102 for (l = options; l; l = l->next) {
103 src = l->data;
104 switch (src->key) {
3f239f08 105 case SR_CONF_NUM_LOGIC_CHANNELS:
ba7dd8bb 106 num_logic_channels = g_variant_get_int32(src->data);
c07f60e7 107 break;
3f239f08 108 case SR_CONF_NUM_ANALOG_CHANNELS:
ba7dd8bb 109 num_analog_channels = g_variant_get_int32(src->data);
c07f60e7
BV
110 break;
111 }
112 }
85b5af06 113
aac29cc1 114 sdi = g_malloc0(sizeof(struct sr_dev_inst));
45884333 115 sdi->status = SR_ST_INACTIVE;
4b664cd6 116 sdi->model = g_strdup("Demo device");
e15f48c2 117
a49a320d 118 devc = g_malloc0(sizeof(struct dev_context));
8b2d41ed 119 devc->cur_samplerate = SR_KHZ(200);
ba7dd8bb
UH
120 devc->num_logic_channels = num_logic_channels;
121 devc->logic_unitsize = (devc->num_logic_channels + 7) / 8;
015f0970
GS
122 devc->all_logic_channels_mask = 1UL << 0;
123 devc->all_logic_channels_mask <<= devc->num_logic_channels;
124 devc->all_logic_channels_mask--;
b1e6eec6 125 devc->logic_pattern = DEFAULT_LOGIC_PATTERN;
ba7dd8bb 126 devc->num_analog_channels = num_analog_channels;
8b2d41ed 127
f18e0db3
LPC
128 if (num_logic_channels > 0) {
129 /* Logic channels, all in one channel group. */
130 cg = g_malloc0(sizeof(struct sr_channel_group));
131 cg->name = g_strdup("Logic");
132 for (i = 0; i < num_logic_channels; i++) {
133 sprintf(channel_name, "D%d", i);
f1c79a6a 134 ch = sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, channel_name);
f18e0db3
LPC
135 cg->channels = g_slist_append(cg->channels, ch);
136 }
137 sdi->channel_groups = g_slist_append(NULL, cg);
87ca93c5
BV
138 }
139
ba7dd8bb 140 /* Analog channels, channel groups and pattern generators. */
d91d0b12 141 devc->ch_ag = g_hash_table_new(g_direct_hash, g_direct_equal);
f18e0db3
LPC
142 if (num_analog_channels > 0) {
143 pattern = 0;
144 /* An "Analog" channel group with all analog channels in it. */
145 acg = g_malloc0(sizeof(struct sr_channel_group));
146 acg->name = g_strdup("Analog");
147 sdi->channel_groups = g_slist_append(sdi->channel_groups, acg);
148
f18e0db3
LPC
149 for (i = 0; i < num_analog_channels; i++) {
150 snprintf(channel_name, 16, "A%d", i);
151 ch = sr_channel_new(sdi, i + num_logic_channels, SR_CHANNEL_ANALOG,
f1c79a6a 152 TRUE, channel_name);
f18e0db3
LPC
153 acg->channels = g_slist_append(acg->channels, ch);
154
155 /* Every analog channel gets its own channel group as well. */
156 cg = g_malloc0(sizeof(struct sr_channel_group));
157 cg->name = g_strdup(channel_name);
158 cg->channels = g_slist_append(NULL, ch);
159 sdi->channel_groups = g_slist_append(sdi->channel_groups, cg);
160
161 /* Every channel gets a generator struct. */
162 ag = g_malloc(sizeof(struct analog_gen));
01f2adb0 163 ag->ch = ch;
f18e0db3 164 ag->amplitude = DEFAULT_ANALOG_AMPLITUDE;
3be044aa 165 sr_analog_init(&ag->packet, &ag->encoding, &ag->meaning, &ag->spec, 2);
4b770103
UH
166 ag->packet.meaning->channels = cg->channels;
167 ag->packet.meaning->mq = 0;
168 ag->packet.meaning->mqflags = 0;
169 ag->packet.meaning->unit = SR_UNIT_VOLT;
f18e0db3
LPC
170 ag->packet.data = ag->pattern_data;
171 ag->pattern = pattern;
172 ag->avg_val = 0.0f;
173 ag->num_avgs = 0;
174 g_hash_table_insert(devc->ch_ag, ch, ag);
175
176 if (++pattern == ARRAY_SIZE(analog_pattern_str))
177 pattern = 0;
178 }
33ef7573 179 }
33ef7573
JH
180
181 sdi->priv = devc;
182
43376f33 183 return std_scan_complete(di, g_slist_append(NULL, sdi));
6239c175
UH
184}
185
3553451f 186static void clear_helper(struct dev_context *devc)
ed0b7fed 187{
49224c28
BV
188 GHashTableIter iter;
189 void *value;
ed0b7fed 190
49224c28
BV
191 /* Analog generators. */
192 g_hash_table_iter_init(&iter, devc->ch_ag);
193 while (g_hash_table_iter_next(&iter, NULL, &value))
194 g_free(value);
195 g_hash_table_unref(devc->ch_ag);
ed0b7fed
BV
196}
197
6ab68731 198static int dev_clear(const struct sr_dev_driver *di)
6239c175 199{
3553451f 200 return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
6239c175
UH
201}
202
dd7a72ea
UH
203static int config_get(uint32_t key, GVariant **data,
204 const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
6239c175 205{
c07f60e7 206 struct dev_context *devc;
ba7dd8bb 207 struct sr_channel *ch;
2388ae86
BV
208 struct analog_gen *ag;
209 int pattern;
6f57fd96 210
2388ae86
BV
211 if (!sdi)
212 return SR_ERR_ARG;
8f996b89 213
c07f60e7 214 devc = sdi->priv;
584560f1 215 switch (key) {
123e1313 216 case SR_CONF_SAMPLERATE:
a7684294 217 *data = g_variant_new_uint64(devc->cur_samplerate);
6239c175 218 break;
2474d87e 219 case SR_CONF_LIMIT_SAMPLES:
a7684294 220 *data = g_variant_new_uint64(devc->limit_samples);
2474d87e
BV
221 break;
222 case SR_CONF_LIMIT_MSEC:
a7684294 223 *data = g_variant_new_uint64(devc->limit_msec);
2474d87e 224 break;
7a8a1aba
BG
225 case SR_CONF_AVERAGING:
226 *data = g_variant_new_boolean(devc->avg);
227 break;
228 case SR_CONF_AVG_SAMPLES:
229 *data = g_variant_new_uint64(devc->avg_samples);
230 break;
2474d87e 231 case SR_CONF_PATTERN_MODE:
53b4680f 232 if (!cg)
660e398f 233 return SR_ERR_CHANNEL_GROUP;
49224c28 234 /* Any channel in the group will do. */
ba7dd8bb 235 ch = cg->channels->data;
3f239f08 236 if (ch->type == SR_CHANNEL_LOGIC) {
2388ae86
BV
237 pattern = devc->logic_pattern;
238 *data = g_variant_new_string(logic_pattern_str[pattern]);
3f239f08 239 } else if (ch->type == SR_CHANNEL_ANALOG) {
49224c28 240 ag = g_hash_table_lookup(devc->ch_ag, ch);
2388ae86
BV
241 pattern = ag->pattern;
242 *data = g_variant_new_string(analog_pattern_str[pattern]);
243 } else
244 return SR_ERR_BUG;
c07f60e7 245 break;
dddabe37
BV
246 case SR_CONF_AMPLITUDE:
247 if (!cg)
248 return SR_ERR_CHANNEL_GROUP;
49224c28 249 /* Any channel in the group will do. */
dddabe37
BV
250 ch = cg->channels->data;
251 if (ch->type != SR_CHANNEL_ANALOG)
252 return SR_ERR_ARG;
49224c28 253 ag = g_hash_table_lookup(devc->ch_ag, ch);
dddabe37
BV
254 *data = g_variant_new_double(ag->amplitude);
255 break;
7dfcf010 256 default:
bd6fbf62 257 return SR_ERR_NA;
6239c175
UH
258 }
259
dfb0fa1a 260 return SR_OK;
6239c175
UH
261}
262
dd7a72ea
UH
263static int config_set(uint32_t key, GVariant *data,
264 const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
6239c175 265{
8b2d41ed 266 struct dev_context *devc;
4374219b 267 struct analog_gen *ag;
ba7dd8bb 268 struct sr_channel *ch;
49224c28 269 GSList *l;
a9010323 270 int logic_pattern, analog_pattern;
6239c175 271
8b2d41ed 272 devc = sdi->priv;
6239c175 273
584560f1 274 switch (key) {
2388ae86 275 case SR_CONF_SAMPLERATE:
a7684294 276 devc->cur_samplerate = g_variant_get_uint64(data);
2388ae86
BV
277 break;
278 case SR_CONF_LIMIT_SAMPLES:
a7684294
JH
279 devc->limit_msec = 0;
280 devc->limit_samples = g_variant_get_uint64(data);
2388ae86
BV
281 break;
282 case SR_CONF_LIMIT_MSEC:
a7684294
JH
283 devc->limit_msec = g_variant_get_uint64(data);
284 devc->limit_samples = 0;
2388ae86 285 break;
7a8a1aba
BG
286 case SR_CONF_AVERAGING:
287 devc->avg = g_variant_get_boolean(data);
288 sr_dbg("%s averaging", devc->avg ? "Enabling" : "Disabling");
289 break;
290 case SR_CONF_AVG_SAMPLES:
291 devc->avg_samples = g_variant_get_uint64(data);
292 sr_dbg("Setting averaging rate to %" PRIu64, devc->avg_samples);
293 break;
2388ae86 294 case SR_CONF_PATTERN_MODE:
53b4680f 295 if (!cg)
660e398f 296 return SR_ERR_CHANNEL_GROUP;
697fb6dd
UH
297 logic_pattern = std_str_idx(data, ARRAY_AND_SIZE(logic_pattern_str));
298 analog_pattern = std_str_idx(data, ARRAY_AND_SIZE(analog_pattern_str));
299 if (logic_pattern < 0 && analog_pattern < 0)
49224c28
BV
300 return SR_ERR_ARG;
301 for (l = cg->channels; l; l = l->next) {
302 ch = l->data;
303 if (ch->type == SR_CHANNEL_LOGIC) {
304 if (logic_pattern == -1)
305 return SR_ERR_ARG;
306 sr_dbg("Setting logic pattern to %s",
307 logic_pattern_str[logic_pattern]);
308 devc->logic_pattern = logic_pattern;
309 /* Might as well do this now, these are static. */
310 if (logic_pattern == PATTERN_ALL_LOW)
311 memset(devc->logic_data, 0x00, LOGIC_BUFSIZE);
312 else if (logic_pattern == PATTERN_ALL_HIGH)
313 memset(devc->logic_data, 0xff, LOGIC_BUFSIZE);
314 } else if (ch->type == SR_CHANNEL_ANALOG) {
315 if (analog_pattern == -1)
316 return SR_ERR_ARG;
317 sr_dbg("Setting analog pattern for channel %s to %s",
318 ch->name, analog_pattern_str[analog_pattern]);
319 ag = g_hash_table_lookup(devc->ch_ag, ch);
320 ag->pattern = analog_pattern;
321 } else
322 return SR_ERR_BUG;
323 }
2388ae86 324 break;
dddabe37
BV
325 case SR_CONF_AMPLITUDE:
326 if (!cg)
327 return SR_ERR_CHANNEL_GROUP;
49224c28
BV
328 for (l = cg->channels; l; l = l->next) {
329 ch = l->data;
330 if (ch->type != SR_CHANNEL_ANALOG)
331 return SR_ERR_ARG;
332 ag = g_hash_table_lookup(devc->ch_ag, ch);
333 ag->amplitude = g_variant_get_double(data);
334 }
dddabe37 335 break;
2388ae86 336 default:
a9010323 337 return SR_ERR_NA;
6239c175
UH
338 }
339
a9010323 340 return SR_OK;
6239c175
UH
341}
342
dd7a72ea
UH
343static int config_list(uint32_t key, GVariant **data,
344 const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
a1c743fc 345{
ba7dd8bb 346 struct sr_channel *ch;
a1c743fc 347
53b4680f 348 if (!cg) {
7a1da331 349 switch (key) {
e66d1892 350 case SR_CONF_SCAN_OPTIONS:
7a1da331 351 case SR_CONF_DEVICE_OPTIONS:
e66d1892 352 return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
7a1da331 353 case SR_CONF_SAMPLERATE:
53012da6 354 *data = std_gvar_samplerates_steps(ARRAY_AND_SIZE(samplerates));
7a1da331
BV
355 break;
356 default:
357 return SR_ERR_NA;
358 }
359 } else {
ba7dd8bb 360 ch = cg->channels->data;
7a1da331
BV
361 switch (key) {
362 case SR_CONF_DEVICE_OPTIONS:
49224c28 363 if (ch->type == SR_CHANNEL_LOGIC)
53012da6 364 *data = std_gvar_array_u32(ARRAY_AND_SIZE(devopts_cg_logic));
e2b99f04
SA
365 else if (ch->type == SR_CHANNEL_ANALOG) {
366 if (strcmp(cg->name, "Analog") == 0)
53012da6 367 *data = std_gvar_array_u32(ARRAY_AND_SIZE(devopts_cg_analog_group));
e2b99f04 368 else
53012da6 369 *data = std_gvar_array_u32(ARRAY_AND_SIZE(devopts_cg_analog_channel));
e2b99f04 370 }
49224c28
BV
371 else
372 return SR_ERR_BUG;
7a1da331
BV
373 break;
374 case SR_CONF_PATTERN_MODE:
e2b99f04
SA
375 /* The analog group (with all 4 channels) shall not have a pattern property. */
376 if (strcmp(cg->name, "Analog") == 0)
377 return SR_ERR_NA;
378
3f239f08 379 if (ch->type == SR_CHANNEL_LOGIC)
53012da6 380 *data = g_variant_new_strv(ARRAY_AND_SIZE(logic_pattern_str));
3f239f08 381 else if (ch->type == SR_CHANNEL_ANALOG)
53012da6 382 *data = g_variant_new_strv(ARRAY_AND_SIZE(analog_pattern_str));
2388ae86
BV
383 else
384 return SR_ERR_BUG;
7a1da331
BV
385 break;
386 default:
387 return SR_ERR_NA;
388 }
a1c743fc
BV
389 }
390
391 return SR_OK;
392}
393
695dc859 394static int dev_acquisition_start(const struct sr_dev_inst *sdi)
6239c175 395{
61c39f54 396 struct dev_context *devc;
1b7b72d4
GS
397 GSList *l;
398 struct sr_channel *ch;
4a465510
GS
399 int bitpos;
400 uint8_t mask;
49224c28
BV
401 GHashTableIter iter;
402 void *value;
85b5af06 403
61c39f54 404 devc = sdi->priv;
a49a320d 405 devc->sent_samples = 0;
767ca135 406 devc->sent_frame_samples = 0;
85b5af06 407
4a465510
GS
408 /*
409 * Determine the numbers of logic and analog channels that are
410 * involved in the acquisition. Determine an offset and a mask to
411 * remove excess logic data content before datafeed submission.
412 */
1b7b72d4
GS
413 devc->enabled_logic_channels = 0;
414 devc->enabled_analog_channels = 0;
415 for (l = sdi->channels; l; l = l->next) {
416 ch = l->data;
417 if (!ch->enabled)
418 continue;
419 if (ch->type == SR_CHANNEL_ANALOG) {
420 devc->enabled_analog_channels++;
421 continue;
422 }
4a465510 423 if (ch->type != SR_CHANNEL_LOGIC)
1b7b72d4 424 continue;
4a465510
GS
425 /*
426 * TODO: Need we create a channel map here, such that the
427 * session datafeed packets will have a dense representation
428 * of the enabled channels' data? For example store channels
429 * D3 and D5 in bit positions 0 and 1 respectively, when all
430 * other channels are disabled? The current implementation
431 * generates a sparse layout, might provide data for logic
432 * channels that are disabled while it might suppress data
433 * from enabled channels at the same time.
434 */
435 devc->enabled_logic_channels++;
1b7b72d4 436 }
4a465510
GS
437 devc->first_partial_logic_index = devc->enabled_logic_channels / 8;
438 bitpos = devc->enabled_logic_channels % 8;
439 mask = (1 << bitpos) - 1;
440 devc->first_partial_logic_mask = mask;
91057d2f
UH
441 sr_dbg("num logic %zu, partial off %zu, mask 0x%02x.",
442 devc->enabled_logic_channels,
4a465510
GS
443 devc->first_partial_logic_index,
444 devc->first_partial_logic_mask);
445
446 /*
447 * Have the waveform for analog patterns pre-generated. It's
448 * supposed to be periodic, so the generator just needs to
449 * access the prepared sample data (DDS style).
450 */
49224c28
BV
451 g_hash_table_iter_init(&iter, devc->ch_ag);
452 while (g_hash_table_iter_next(&iter, NULL, &value))
ba508e22 453 demo_generate_analog_pattern(value, devc->cur_samplerate);
4374219b 454
98c01fe1 455 sr_session_source_add(sdi->session, -1, 0, 100,
ba508e22 456 demo_prepare_data, (struct sr_dev_inst *)sdi);
85b5af06 457
bee2b016 458 std_session_send_df_header(sdi);
f366e86c 459
f55bea76
SA
460 if (SAMPLES_PER_FRAME > 0)
461 std_session_send_frame_begin(sdi);
462
3b203673 463 /* We use this timestamp to decide how many more samples to send. */
a49a320d
DE
464 devc->start_us = g_get_monotonic_time();
465 devc->spent_us = 0;
471ac344 466 devc->step = 0;
3b203673 467
e46b8fb1 468 return SR_OK;
6239c175
UH
469}
470
695dc859 471static int dev_acquisition_stop(struct sr_dev_inst *sdi)
6239c175 472{
027bf077 473 sr_session_source_remove(sdi->session, -1);
f55bea76
SA
474
475 if (SAMPLES_PER_FRAME > 0)
476 std_session_send_frame_end(sdi);
477
bee2b016 478 std_session_send_df_end(sdi);
7fd3e859 479
3010f21c 480 return SR_OK;
6239c175
UH
481}
482
dd5c48a6 483static struct sr_dev_driver demo_driver_info = {
e519ba86
UH
484 .name = "demo",
485 .longname = "Demo driver and pattern generator",
486 .api_version = 1,
c2fdcc25 487 .init = std_init,
700d6b64 488 .cleanup = std_cleanup,
6078d2c9 489 .scan = scan,
c01bf34c 490 .dev_list = std_dev_list,
6ab68731 491 .dev_clear = dev_clear,
035a1078
BV
492 .config_get = config_get,
493 .config_set = config_set,
a1c743fc 494 .config_list = config_list,
4d67b9d9
UH
495 .dev_open = std_dummy_dev_open,
496 .dev_close = std_dummy_dev_close,
6078d2c9
UH
497 .dev_acquisition_start = dev_acquisition_start,
498 .dev_acquisition_stop = dev_acquisition_stop,
41812aca 499 .context = NULL,
6239c175 500};
dd5c48a6 501SR_REGISTER_DEV_DRIVER(demo_driver_info);