From 4a49ee4a0dd2b75a81511519a190eaada9664930 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 9 Jan 2019 17:51:35 +0100 Subject: i2s speaker driver added --- code/test/vc_client_t.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'code/test/vc_client_t.c') 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]; -- cgit v1.2.3