summaryrefslogtreecommitdiff
path: root/code/test
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-01-09 17:51:35 +0100
committerUros Majstorovic <majstor@majstor.org>2019-01-09 17:51:35 +0100
commit4a49ee4a0dd2b75a81511519a190eaada9664930 (patch)
tree8f09ccb2d4a96515441d6c81790273058671ca78 /code/test
parenta67f35abdb7ef55c062c26251b7354d9968d385b (diff)
i2s speaker driver added
Diffstat (limited to 'code/test')
-rw-r--r--code/test/vc_client_t.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/code/test/vc_client_t.c b/code/test/vc_client_t.c
index a530f2f..b021c2d 100644
--- a/code/test/vc_client_t.c
+++ b/code/test/vc_client_t.c
@@ -32,11 +32,12 @@ ssize_t handle_open(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned
return rv;
}
+ printf("OPEN\n");
char *msg = "PERA JE CAR!";
unsigned char buf[1000];
strcpy((char *)buf, msg);
- ssize_t _rv = ecp_send(conn, MTYPE_MSG, buf, 1000);
+ // ssize_t _rv = ecp_send(conn, MTYPE_MSG, buf, 1000);
struct timeval tv;
gettimeofday(&tv, NULL);
@@ -46,10 +47,12 @@ ssize_t handle_open(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned
}
ssize_t handle_msg(ECPConnection *conn, ecp_seq_t sq, unsigned char t, unsigned char *p, ssize_t s, ECP2Buffer *b) {
- // write(2, p, s);
- // fflush(stderr);
+ ecp_send(conn, t, p, s);
+ write(2, p+1, s-1);
+ fflush(stderr);
// printf("MSG C:%s size:%ld\n", p, s);
- // return s;
+ return s;
+
counter++;
char *msg = "PERA JE CAR!";
unsigned char buf[1000];