libsigrok
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Data Structures | Defines | Enumerations | Variables
demo.c File Reference
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "sigrok.h"
#include "sigrok-internal.h"
Include dependency graph for demo.c:

Go to the source code of this file.

Data Structures

struct  context

Defines

#define NUM_PROBES   8
#define DEMONAME   "Demo device"
#define BUFSIZE   4096

Enumerations

enum  {
  PATTERN_SIGROK, PATTERN_RANDOM, PATTERN_INC, PATTERN_ALL_LOW,
  PATTERN_ALL_HIGH
}

Variables

SR_PRIV GIOChannel * channels [2]
SR_PRIV struct sr_dev_driver demo_driver_info

Define Documentation

#define BUFSIZE   4096

Definition at line 40 of file demo.c.

#define DEMONAME   "Demo device"

Definition at line 36 of file demo.c.

#define NUM_PROBES   8

Definition at line 34 of file demo.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
PATTERN_SIGROK 

Pattern which spells "sigrok" using '0's (with '1's as "background") when displayed using the 'bits' output format.

PATTERN_RANDOM 

Pattern which consists of (pseudo-)random values on all probes.

PATTERN_INC 

Pattern which consists of incrementing numbers.

TODO: Better description.

PATTERN_ALL_LOW 

Pattern where all probes have a low logic state.

PATTERN_ALL_HIGH 

Pattern where all probes have a high logic state.

Definition at line 43 of file demo.c.


Variable Documentation

SR_PRIV GIOChannel* channels[2]

Definition at line 67 of file demo.c.

Initial value:
 {
        .name = "demo",
        .longname = "Demo driver and pattern generator",
        .api_version = 1,
        .init = hw_init,
        .cleanup = hw_cleanup,
        .dev_open = hw_dev_open,
        .dev_close = hw_dev_close,
        .dev_info_get = hw_dev_info_get,
        .dev_status_get = hw_dev_status_get,
        .hwcap_get_all = hw_hwcap_get_all,
        .dev_config_set = hw_dev_config_set,
        .dev_acquisition_start = hw_dev_acquisition_start,
        .dev_acquisition_stop = hw_dev_acquisition_stop,
}

Definition at line 498 of file demo.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines