]> rtime.felk.cvut.cz Git - tiny-bt.git/blobdiff - src2/testslave.c
new version of callback functions and new was added
[tiny-bt.git] / src2 / testslave.c
diff --git a/src2/testslave.c b/src2/testslave.c
new file mode 100644 (file)
index 0000000..6359049
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+*  C Implementation: testslave
+*
+* Description: 
+*
+*
+* Author: root <root@ubuntu>, (C) 2008
+*
+* Copyright: See COPYING file that comes with this distribution
+*
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <stdint.h>
+#include "tiny_bt_hci_core.h"
+#include "tiny_bt_hci_cmd.h"
+#include "testapp.h"
+
+
+int main(void){
+       int ii=30000;
+       tiny_bt_init(1);
+       printf("begin of main\n");
+       //if(tiny_bt_read_bd_addr(&p_connection->master.bdaddr, callback_app_read_bd_addr)<0){
+//             perror("tiny_bt_read_bd_addr error");
+//             return -1;
+//     }
+       while(1){
+               
+               ii--;
+               if(tiny_bt_process()<0){
+                       perror("process error");
+                       return -1;
+               }
+
+       }
+       return 0;
+}
\ No newline at end of file