You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/05/19 12:26:17 UTC

[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #819: Add USB transport to NimBLE controller

apache-mynewt-bot commented on pull request #819:
URL: https://github.com/apache/mynewt-nimble/pull/819#issuecomment-630784234


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/transport/usb/src/ble_hci_usb.c
   <details>
   
   ```diff
   @@ -125,8 +125,7 @@
                        MYNEWT_VAL(BLE_HCI_ACL_OUT_COUNT),
                        sizeof(struct ble_hci_pkt))];
    
   -struct tx_queue
   -{
   +struct tx_queue {
        STAILQ_HEAD(, ble_hci_pkt) queue;
    };
    
   @@ -167,7 +166,8 @@
        }
    }
    
   -void tud_bt_event_sent_cb(uint16_t sent_bytes)
   +void
   +tud_bt_event_sent_cb(uint16_t sent_bytes)
    {
        struct ble_hci_pkt *evt = STAILQ_FIRST(&ble_hci_tx_evt_queue.queue);
        uint8_t *hci_ev;
   @@ -216,7 +216,8 @@
        }
    }
    
   -void tud_bt_hci_cmd_cb(void *hci_cmd, size_t cmd_len)
   +void
   +tud_bt_hci_cmd_cb(void *hci_cmd, size_t cmd_len)
    {
        uint8_t *buf;
        int rc = -1;
   @@ -337,12 +338,12 @@
        int rc;
    
        /* XXX: this may look a bit odd, but the controller uses the command
   -    * buffer to send back the command complete/status as an immediate
   -    * response to the command. This was done to insure that the controller
   -    * could always send back one of these events when a command was received.
   -    * Thus, we check to see which pool the buffer came from so we can free
   -    * it to the appropriate pool
   -    */
   +     * buffer to send back the command complete/status as an immediate
   +     * response to the command. This was done to insure that the controller
   +     * could always send back one of these events when a command was received.
   +     * Thus, we check to see which pool the buffer came from so we can free
   +     * it to the appropriate pool
   +     */
        if (os_memblock_from(&ble_hci_usb_evt_hi_pool, buf)) {
            rc = os_memblock_put(&ble_hci_usb_evt_hi_pool, buf);
            assert(rc == 0);
   ```
   
   </details>


----------------------------------------------------------------
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