hfp.c (ca59be5193cced59664efef288ea86d02eaef3a4) | hfp.c (671f1aa2bc4ae3a024cb7e767ca67a16d7eb3055) |
---|---|
1/* 2 * Copyright (C) 2014 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 --- 200 unchanged lines hidden (view full) --- 209} 210 211static void hfp_emit_event_for_context(hfp_connection_t * hfp_connection, uint8_t * packet, uint16_t size){ 212 if (!hfp_connection) return; 213 btstack_packet_handler_t callback = NULL; 214 switch (hfp_connection->local_role){ 215 case HFP_ROLE_HF: 216 callback = hfp_hf_callback; | 1/* 2 * Copyright (C) 2014 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 --- 200 unchanged lines hidden (view full) --- 209} 210 211static void hfp_emit_event_for_context(hfp_connection_t * hfp_connection, uint8_t * packet, uint16_t size){ 212 if (!hfp_connection) return; 213 btstack_packet_handler_t callback = NULL; 214 switch (hfp_connection->local_role){ 215 case HFP_ROLE_HF: 216 callback = hfp_hf_callback; |
217 break; |
|
217 case HFP_ROLE_AG: 218 callback = hfp_ag_callback; | 218 case HFP_ROLE_AG: 219 callback = hfp_ag_callback; |
220 break; |
|
219 default: 220 return; 221 } 222 (*callback)(HCI_EVENT_PACKET, 0, packet, size); 223} 224 225void hfp_emit_simple_event(hfp_connection_t * hfp_connection, uint8_t event_subtype){ 226 uint8_t event[3]; --- 1252 unchanged lines hidden --- | 221 default: 222 return; 223 } 224 (*callback)(HCI_EVENT_PACKET, 0, packet, size); 225} 226 227void hfp_emit_simple_event(hfp_connection_t * hfp_connection, uint8_t event_subtype){ 228 uint8_t event[3]; --- 1252 unchanged lines hidden --- |