dect
/
libdect
Archived
13
0
Fork 0

example: add program to wait for page message

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-07-28 00:21:25 +02:00
parent fb92f53e96
commit dd1f1b6428
3 changed files with 33 additions and 1 deletions

1
example/.gitignore vendored
View File

@ -8,3 +8,4 @@ pp-access-rights
pp-location-update
pp-detach
pp-list-access
pp-wait-page

View File

@ -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

27
example/pp-wait-page.c Normal file
View File

@ -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;
}