You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/25 04:36:04 UTC

[GitHub] [incubator-nuttx] anchao commented on a change in pull request #3754: wireless/bluetooth: decoupling bt_driver_s and bt_buf_s

anchao commented on a change in pull request #3754:
URL: https://github.com/apache/incubator-nuttx/pull/3754#discussion_r638446950



##########
File path: arch/arm/src/nrf52/nrf52_sdc.c
##########
@@ -283,32 +265,8 @@ static void on_hci(void)
 
           len = sizeof(*hdr) + hdr->len;
 
-#ifdef CONFIG_DEBUG_WIRELESS_INFO
-          if (hdr->evt == BT_HCI_EVT_CMD_COMPLETE)
-            {
-              struct hci_evt_cmd_complete_s *cmd_complete =
-                  (struct hci_evt_cmd_complete_s *)
-                      (g_sdc_dev.msg_buffer + sizeof(*hdr));
-              uint8_t *status = (uint8_t *)cmd_complete + 1;
-
-              wlinfo("received CMD_COMPLETE from softdevice "
-                     "(opcode: %d, status: 0x%x)\n",
-                     cmd_complete->opcode, *status);
-            }
-          else
-            {
-              wlinfo("received HCI EVT from softdevice "
-                     "(evt: %d, len: %zu)\n", hdr->evt, len);
-            }
-#endif
-
-          outbuf = bt_buf_alloc(BT_EVT, NULL, BLUETOOTH_H4_HDRLEN);
-          bt_buf_extend(outbuf, len);
-
-          memcpy(outbuf->data, g_sdc_dev.msg_buffer, len);
-
-          bt_hci_receive(outbuf);
-
+          g_bt_driver->receive(&g_bt_driver, BT_EVT,

Review comment:
       Done, I add a symbol define to instead of driver details,
   https://github.com/apache/incubator-nuttx/pull/3754/files#diff-bafaf660e053e10be22390e6b4e0d76d2a60143c99508c845e21ece5999b5c2aR56-R57




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org