avdtp_util.c (3cb0f44de9181c2846b657c150a7887c7dba2c89) avdtp_util.c (335dba6a8f1618f200debbc47e346d04b1c4b468)
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 136 unchanged lines hidden (view full) ---

145 if (value){
146 bitmap |= 1 << position;
147 } else {
148 bitmap &= ~ (1 << position);
149 }
150 return bitmap;
151}
152
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 136 unchanged lines hidden (view full) ---

145 if (value){
146 bitmap |= 1 << position;
147 } else {
148 bitmap &= ~ (1 << position);
149 }
150 return bitmap;
151}
152
153avdtp_message_type_t avdtp_get_signaling_packet_type(uint8_t * packet){
153avdtp_message_type_t avdtp_get_signaling_message_type(uint8_t * packet){
154 return (avdtp_message_type_t) (packet[0] & 0x03);
155}
156
157int avdtp_read_signaling_header(avdtp_signaling_packet_t * signaling_header, uint8_t * packet, uint16_t size){
158 int pos = 0;
159 if (size < 2) return pos;
160 signaling_header->transaction_label = packet[pos] >> 4;
161 signaling_header->packet_type = (avdtp_packet_type_t)((packet[pos] >> 2) & 0x03);

--- 1394 unchanged lines hidden ---
154 return (avdtp_message_type_t) (packet[0] & 0x03);
155}
156
157int avdtp_read_signaling_header(avdtp_signaling_packet_t * signaling_header, uint8_t * packet, uint16_t size){
158 int pos = 0;
159 if (size < 2) return pos;
160 signaling_header->transaction_label = packet[pos] >> 4;
161 signaling_header->packet_type = (avdtp_packet_type_t)((packet[pos] >> 2) & 0x03);

--- 1394 unchanged lines hidden ---