]> rtime.felk.cvut.cz Git - mirosot.git/blobdiff - bluetooth/l2cap.c
An unsucesfull attempt to clean bluetooth library and make it working.
[mirosot.git] / bluetooth / l2cap.c
index 3ce2b6c10c301586b71d15389bad68c6201fa2d2..11530069d78401c03eff11d5ad9d478dd69f4137 100644 (file)
 \r
 #include <string.h>\r
 #include <stdlib.h>\r
-#ifdef BTH_LX\r
 #include <types.h>\r
+#ifdef BTH_LX\r
 #include <cpu_def.h>\r
 #include <h8s2638h.h>\r
 #include <periph/sci_rs232.h>\r
 #include <system_def.h>\r
-\r
-#else\r
-#include "types.h"\r
 #endif\r
 \r
 #include "hci.h"\r
@@ -47,7 +44,7 @@ l2cap_code_fce_def l2cap_code_fce[]={
 /**\r
 * Search the cannels of the connected device dev_num and search the channel dcid\r
 */\r
-inline int l2cap_find_dcid(int dcid, int dev_num )\r
+static inline int l2cap_find_dcid(int dcid, int dev_num )\r
 {\r
   int i;\r
   for(i=1;i<L2CAP_NUM_OF_CANAL;i++)\r
@@ -65,9 +62,9 @@ inline int l2cap_find_dcid(int dcid, int dev_num )
 \r
 int l2cap_add_to_send_buffer(uint8_t *bth_p)\r
 {\r
-  if(bth_pole_adrr_comm_packet[bth_com_buf_info.aktual]!=NULL)\r
+  if(bth_array_adrr_comm_packet[bth_com_buf_info.aktual]!=NULL)\r
   {return 1;};\r
-  bth_pole_adrr_comm_packet[bth_com_buf_info.aktual]=bth_p;\r
+  bth_array_adrr_comm_packet[bth_com_buf_info.aktual]=bth_p;\r
 \r
   /*set the position in command array for the next command. If it is possible to write there (if the pointer = NULL) is checked by the writer. .\r
 \r