X-Git-Url: https://rtime.felk.cvut.cz/gitweb/mirosot.git/blobdiff_plain/3724f24eb6f2adb9c92b84080ac073346c747da8..0be5c211c2ecdb742e73f6c342039561191a3036:/bth_tests/bluetooth/hci_bluez.c diff --git a/bth_tests/bluetooth/hci_bluez.c b/bth_tests/bluetooth/hci_bluez.c new file mode 100644 index 0000000..e856c1c --- /dev/null +++ b/bth_tests/bluetooth/hci_bluez.c @@ -0,0 +1,21 @@ +#include "hci.h" +#include +int hci_socket; +/** + //FIXME + *Sends data of the size hp_size from address hp to the bluetooth device (UART) + */ +int bth_send_packet(uint8_t *hp, uint16_t hp_size) +{ + /*is bluetooth device free, or is it busy by the previous command?*/ + if(bth_local_info.busy==0) { + + write(hci_socket, hp, hp_size); + + bth_local_info.busy=1; + return(0); //everything sent ==== OK ===== + } else { + return 2; //busy + }; +}; +