hfp.h (46f073f23a940c13c6db21186d8159e015b5c67b) hfp.h (3721a235468b7b00a1583fbaab9ebe94f874a0f4)
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

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

638 uint8_t clcc_mode;
639 uint8_t clcc_mpty;
640
641 uint8_t call_index;
642 // also used for CLCC, CCWA, CLIP if set
643 uint8_t bnip_type; // 0 == not set
644 char bnip_number[25]; //
645
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

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

638 uint8_t clcc_mode;
639 uint8_t clcc_mpty;
640
641 uint8_t call_index;
642 // also used for CLCC, CCWA, CLIP if set
643 uint8_t bnip_type; // 0 == not set
644 char bnip_number[25]; //
645
646#ifdef ENABLE_CC256X_ASSISTED_HFP
647 bool cc256x_send_write_codec_config;
648 bool cc256x_send_wbs_associate;
649 bool cc256x_send_wbs_disassociate;
650#endif
651
646} hfp_connection_t;
647
648// UTILS_START : TODO move to utils
649int send_str_over_rfcomm(uint16_t cid, char * command);
650int join(char * buffer, int buffer_size, uint8_t * values, int values_nr);
651int join_bitmap(char * buffer, int buffer_size, uint32_t values, int values_nr);
652int get_bit(uint16_t bitmap, int position);
653int store_bit(uint32_t bitmap, int position, uint8_t value);

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

696
697void hfp_log_rfcomm_message(const char * tag, uint8_t * packet, uint16_t size);
698
699const char * hfp_enhanced_call_dir2str(uint16_t index);
700const char * hfp_enhanced_call_status2str(uint16_t index);
701const char * hfp_enhanced_call_mode2str(uint16_t index);
702const char * hfp_enhanced_call_mpty2str(uint16_t index);
703
652} hfp_connection_t;
653
654// UTILS_START : TODO move to utils
655int send_str_over_rfcomm(uint16_t cid, char * command);
656int join(char * buffer, int buffer_size, uint8_t * values, int values_nr);
657int join_bitmap(char * buffer, int buffer_size, uint32_t values, int values_nr);
658int get_bit(uint16_t bitmap, int position);
659int store_bit(uint32_t bitmap, int position, uint8_t value);

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

702
703void hfp_log_rfcomm_message(const char * tag, uint8_t * packet, uint16_t size);
704
705const char * hfp_enhanced_call_dir2str(uint16_t index);
706const char * hfp_enhanced_call_status2str(uint16_t index);
707const char * hfp_enhanced_call_mode2str(uint16_t index);
708const char * hfp_enhanced_call_mpty2str(uint16_t index);
709
710#ifdef ENABLE_CC256X_ASSISTED_HFP
711void hfp_cc256x_prepare_for_sco(hfp_connection_t * hfp_connection);
712void hfp_cc256x_write_codec_config(hfp_connection_t * hfp_connection);
713#endif
714
704/**
705 * @brief Set packet types for SCO connections
706 * @param common single packet_types: HFP_SCO_PACKET_TYPES_*
707 */
708void hfp_set_sco_packet_types(uint16_t packet_types);
709
710/**
711 * @brief Get packet types for SCO connections
712 * @returns packet_types
713 */
714uint16_t hfp_get_sco_packet_types(void);
715
716#if defined __cplusplus
717}
718#endif
719
720#endif // BTSTACK_HFP_H
715/**
716 * @brief Set packet types for SCO connections
717 * @param common single packet_types: HFP_SCO_PACKET_TYPES_*
718 */
719void hfp_set_sco_packet_types(uint16_t packet_types);
720
721/**
722 * @brief Get packet types for SCO connections
723 * @returns packet_types
724 */
725uint16_t hfp_get_sco_packet_types(void);
726
727#if defined __cplusplus
728}
729#endif
730
731#endif // BTSTACK_HFP_H