Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
mringwal committed Feb 8, 2019
2 parents 9a90715 + 98b77e7 commit a563da7c504f59cdb6ba2c73b00867f9b0655f44
Showing with 14 additions and 14 deletions.
  1. +1 −1 port/msp430f5229lp-cc2564b/src/hal_uart_dma.c
  2. +13 −13 src/l2cap.c
@@ -286,7 +286,7 @@ void hal_uart_dma_receive_block(uint8_t *buffer, uint16_t len){
bytes_to_read = len;

// check if byte already received
int pending = UCAIFG & UCRXIFG;
int pending = UCA0IFG & UCRXIFG;

// enable RX interrupts - will trigger ISR below if byte pending
UCA0IE |= UCRXIE; // enable RX interrupts
@@ -948,19 +948,6 @@ static void l2cap_emit_incoming_connection(l2cap_channel_t *channel) {
hci_dump_packet( HCI_EVENT_PACKET, 0, event, sizeof(event));
l2cap_dispatch_to_channel(channel, HCI_EVENT_PACKET, event, sizeof(event));
}
#endif

static l2cap_fixed_channel_t * l2cap_channel_item_by_cid(uint16_t cid){
btstack_linked_list_iterator_t it;
btstack_linked_list_iterator_init(&it, &l2cap_channels);
while (btstack_linked_list_iterator_has_next(&it)){
l2cap_fixed_channel_t * channel = (l2cap_fixed_channel_t*) btstack_linked_list_iterator_next(&it);
if (channel->local_cid == cid) {
return channel;
}
}
return NULL;
}

static void l2cap_handle_channel_open_failed(l2cap_channel_t * channel, uint8_t status){
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
@@ -981,6 +968,19 @@ static void l2cap_handle_channel_closed(l2cap_channel_t * channel){
#endif
l2cap_emit_channel_closed(channel);
}
#endif

static l2cap_fixed_channel_t * l2cap_channel_item_by_cid(uint16_t cid){
btstack_linked_list_iterator_t it;
btstack_linked_list_iterator_init(&it, &l2cap_channels);
while (btstack_linked_list_iterator_has_next(&it)){
l2cap_fixed_channel_t * channel = (l2cap_fixed_channel_t*) btstack_linked_list_iterator_next(&it);
if (channel->local_cid == cid) {
return channel;
}
}
return NULL;
}

// used for fixed channels in LE (ATT/SM) and Classic (Connectionless Channel). CID < 0x04
static l2cap_fixed_channel_t * l2cap_fixed_channel_for_channel_id(uint16_t local_cid){

0 comments on commit a563da7

Please sign in to comment.