diff options
author | Patrick McHardy <kaber@trash.net> | 2010-07-28 00:21:25 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-07-30 02:44:03 +0200 |
commit | dd1f1b6428bfff7118a1fc77d33961f2594b6158 (patch) | |
tree | f9269dc9dcd61a4ce975dd592d984ea01b8c8534 /example | |
parent | fb92f53e967778dc2d56e2fb39995b6870db3877 (diff) |
example: add program to wait for page message
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'example')
-rw-r--r-- | example/.gitignore | 1 | ||||
-rw-r--r-- | example/Makefile.in | 6 | ||||
-rw-r--r-- | example/pp-wait-page.c | 27 |
3 files changed, 33 insertions, 1 deletions
diff --git a/example/.gitignore b/example/.gitignore index 8cbc580..58d1ada 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -8,3 +8,4 @@ pp-access-rights pp-location-update pp-detach pp-list-access +pp-wait-page diff --git a/example/Makefile.in b/example/Makefile.in index 9af4e7b..5a7cc0f 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -1,7 +1,7 @@ CFLAGS += $(EVENT_CFLAGS) LDFLAGS += -Wl,-rpath $(PWD)/src -Lsrc -ldect $(EVENT_LDFLAGS) PROGRAMS += cc ss mm-fp mm-pp discover hijack -PROGRAMS += pp-access-rights pp-location-update pp-detach pp-list-access +PROGRAMS += pp-access-rights pp-location-update pp-detach pp-list-access pp-wait-page destdir := usr/share/dect/examples @@ -38,6 +38,10 @@ pp-list-access-destdir := $(destdir) pp-list-access-obj += $(pp-common-obj) pp-list-access-obj += pp-list-access.o +pp-wait-page-destdir := $(destdir) +pp-wait-page-obj += $(common-obj) +pp-wait-page-obj += pp-wait-page.o + mm-pp-destdir := $(destdir) mm-pp-obj += $(common-obj) mm-pp-obj += mm-pp.o diff --git a/example/pp-wait-page.c b/example/pp-wait-page.c new file mode 100644 index 0000000..80c3a4c --- /dev/null +++ b/example/pp-wait-page.c @@ -0,0 +1,27 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <dect/libdect.h> +#include "common.h" +#include <lce.h> + +static const struct dect_ipui ipui = { + .put = DECT_IPUI_N, + .pun.n.ipei = { + .emc = 0x0ba8, + .psn = 0xa782a, + } +}; + +static struct dect_ops ops; + +int main(int argc, char **argv) +{ + dect_common_init(&ops, argv[1]); + dect_pp_set_ipui(dh, &ipui); + + dect_event_loop(); + + dect_common_cleanup(dh); + return 0; +} |