Bluetooth hc05 library

Dependents:   Nucleo_bt

Files at this revision

API Documentation at this revision

Comitter:
rainerraul
Date:
Sat Sep 01 18:41:50 2018 +0000
Parent:
16:8c5c8d0a1cfb
Commit message:
transmit adc value on bluetooth to a raspi

Changed in this revision

hc05.cpp Show annotated file Show diff for this revision Revisions of this file
hc05.h Show annotated file Show diff for this revision Revisions of this file
diff -r 8c5c8d0a1cfb -r 444cd587d30b hc05.cpp
--- a/hc05.cpp	Mon Aug 27 10:24:37 2018 +0000
+++ b/hc05.cpp	Sat Sep 01 18:41:50 2018 +0000
@@ -877,7 +877,6 @@
 {
     bt_modul_hc05::set_addr_mode(ANY);
     bt_modul_hc05::search_device(address);
-    bt_modul_hc05::set_addr_fixed(address);
     return bt_modul_hc05::connect_device(address);
 
 }
@@ -900,19 +899,16 @@
 
 }
 
-void bt_modul_hc05::init_master_fixed(char *pin, char *name, char *address)
+void bt_modul_hc05::init_master_fixed(char *address)
 {
     bt_modul_hc05::set_modul_role(MASTER);
-    bt_modul_hc05::set_modul_pincode(pin);
-    bt_modul_hc05::set_modul_name(name);
     bt_modul_hc05::link_device_fixed(address);
     bt_modul_hc05::set_reset();
 }
 
-void bt_modul_hc05::init_slave(char *pin, char *name)
+void bt_modul_hc05::init_slave()
 {
+    bt_modul_hc05::set_addr_mode(ANY);
     bt_modul_hc05::set_modul_role(SLAVE);
-    bt_modul_hc05::set_modul_pincode(pin);
-    bt_modul_hc05::set_modul_name(name);
     bt_modul_hc05::set_reset(); 
 }
\ No newline at end of file
diff -r 8c5c8d0a1cfb -r 444cd587d30b hc05.h
--- a/hc05.h	Mon Aug 27 10:24:37 2018 +0000
+++ b/hc05.h	Sat Sep 01 18:41:50 2018 +0000
@@ -59,8 +59,8 @@
     char *link_device_any(char *address);
     char *link_device_fixed(char *address);
     char *link_device_paired(char *address);
-    void init_master_fixed(char *pin, char *name, char *address);
-    void init_slave(char *pin, char *name);
+    void init_master_fixed(char *address);
+    void init_slave();
 private :
     _IRQ t_interrupt;
     _IRQ t_interrupt1;