📄 headset_config_csr_pioneer.c
字号:
/****************************************************************************Copyright (C) Cambridge Silicon Radio Ltd. 2005-2006Part of BlueLab 3.6.2-releaseFILE NAME headset_config_csr_pioneer.c DESCRIPTION This file contains the default configuration parameters for a CSR Pioneer Mono Headset*/#ifndef BC4_HS_CONFIGURATOR #include "headset_config.h"#else #include "Configurator_config_types.h"#endif/* PSKEY_USR_0 - Battery config */static const config_battery_type battery_config ={ sizeof(battery_config_type), { 0x0195, /* Battery divisor ratio */ 0x0E74, /* Battery upper threshold */ 0x0D48, /* Battery lower threshold */ 0x0BB8, /* Battery shutdown threshold */ 0x001e, /* Battery monitoring period */ 0x0005 /* Low Batt Indicator Repeat time */ } };/* PSKEY_USR_1 - Button config */static const config_button_type button_config ={ sizeof(button_config_type), { 0x01f4, /* Button double press time */ 0x0320, /* Button long press time */ 0x2710, /* Button very long press time */ 0x01f4, /* Button repeat time */ } };/* PSKEY_USR_2 - buttonpatterns */#define NUM_BUTTON_PATTERNS 2static const config_button_pattern_type button_pattern_config = { sizeof(button_pattern_config_type ) * NUM_BUTTON_PATTERNS , { 0 ,0,0,0,0,0,0 , 0 ,0,0,0,0,0,0 } };/* PSKEY_USR_3 - Supported features */static const config_uint16_type supported_features_config ={ 1, {(/* HFP_NREC_FUNCTION | */ HFP_THREE_WAY_CALLING | /* HFP_CLI_PRESENTATION | */ HFP_VOICE_RECOGNITION | HFP_REMOTE_VOL_CONTROL| HFP_ENHANCED_CALL_STATUS | HFP_ENHANCED_CALL_CONTROL )}};/* PSKEY_USR_4 - Input PIO Block */static const config_uint16_type input_pio_block ={ 1, {0xffff}};/* PSKEY_USR_5 - hfp supported features */static const config_HFP_1_5_type HFP_1_5_features_config ={ 2, { 0x8000, ( sync_hv1 | sync_hv2 | sync_hv3 /* | sync_ev3 | sync_ev4 | sync_ev5 | sync_2ev3 | sync_3ev3 | sync_2ev5 | sync_3ev5*/ ) }};/* PSKEY_USR_6 - network_ind_time */static const config_uint16_type network_ind_time ={ 1, {0x000A} /*if there is now network present indicate it every 10 seconds*/};/* PSKEY_USR_7 - mute remind timeout */static const config_uint16_type mute_remind_timeout ={ 1, {0x0005}};/* PSKEY_USR_8 - Power On Timeout*/static const config_uint16_type power_on_timeout ={ 1, {0x000c}};/* PSKEY_USR_9 - Power off disabled after power on timeout */static const config_uint16_type power_off_disabled_timeout ={ 1, {0x0000}};/* PSKEY_USR_10 - Reserved */static const config_uint16_type volume_orientation ={ 1, {0}};/* PSKEY_USR_11 - Pairing timeout */static const config_uint16_type pairing_timeout ={ 1, {0x003c}};/* PSKEY_USR_12 - Automatic switch off timeout */static const config_uint16_type auto_switch_off_timeout ={ 1, {0x0258}};/* PSKEY_USR_13 - Radio configuration parameters */static const config_radio_type radio ={ 4, {0x0800, 0x0012, 0x0800, 0x0012}};/* PSKEY_USR_14 - NiMH Battery Charger Configuration */static const config_charger_type nimh_charger ={ 11, {0x0708, 0x0ce4, 0x070f, 0x2800, 0x0400, 0x7804, 0xffd0, 0x0044, 0x0000, 0x0000, 0x0001},};/* PSKEY_USR_15 - Features block */static const config_features_type features ={ 3, {0x18a2, 0x1111, 0x0006}, };/* PSKEY_USR_16 - Volume gain mappings */static const config_volume_type volume ={ 32, { 0x4001, 0x0411, 0x4014, 0x0611, 0x4024, 0x0611, 0x4034, 0x0611, 0x5044, 0x0611, 0x6454, 0x0711, 0x7564, 0x0811, 0x8674, 0x0912, 0x9784, 0x0a12, 0xa894, 0x0b12, 0xb9a4, 0x0c12, 0xfab4, 0x0d12, 0xfbc4, 0x0f12, 0xfbd4, 0x0f12, 0xfbe4, 0x0f12, 0xfbfa, 0x0f13 },};/* PSKEY_USR_17 - Number of LED filters */#define NO_LED_FILTERS (0x0003)static const config_uint16_type no_led_filters ={ 1, {NO_LED_FILTERS}};/* PSKEY_USR_18 - LED filter configuration */static const config_led_filters_type led_filters ={ sizeof(led_filter_config_type) * NO_LED_FILTERS, {/*1*/ 0x1a00, 0x8200, 0x0000, /*filter on with low batt*//*2*/ 0x2200, 0x0010, 0x0000, /*filter off with charger connected*//*3*/ 0x2100, 0x0010, 0x0000, /*filter off with EVBATok*/ }, };/* PSKEY_USR_19 - Number of LED states */#define NO_LED_STATES (0x0004)static const config_uint16_type no_led_states ={ 1, {NO_LED_STATES}};/* PSKEY_USR_20 - LED state configuration */static const config_led_states_type led_states ={ sizeof(led_config_type) * NO_LED_STATES, { 0x010a, 0x0A28, 0x0000, 0x2fe1, /*connectable*/ 0x020a, 0x0A02, 0x0000, 0x2fe3, /*conn_discoverable*/ 0x030A, 0x0A28, 0x0000, 0x3fe1, /*connected*/ 0x060A, 0x0A02, 0x0000, 0x1fe1 /*ONGOING*/ }, };/* PSKEY_USR_21 - Number of LED events */#define NO_LED_EVENTS (0x0002)static const config_uint16_type no_led_events ={ 1, {NO_LED_EVENTS}};/* PSKEY_USR_22 - LED event configuration */static const config_led_events_type led_events ={ sizeof(led_config_type) * NO_LED_EVENTS, { /* E - red , F - blu*/ 0x0164, 0x0000, 0x0000, 0x1FF1, 0x0264, 0x0000, 0x0000, 0x1ee1 }, };#define NO_EVENTS (20)/* PSKEY_USR_23 - System event configuration A */static const config_events_type events_a ={ sizeof(event_config_type) * NO_EVENTS, { 0x0102, 0x0200, 0x0001, /*power On*/ 0x0202, 0x0200, 0xfffe, /*power Off*/ 0x0303, 0x0200, 0xfffe, /*Enter Pair Mode - all states as we want this to hold on and work - works only from power on though - off happens first in all other states otherwise*/ 0x0a01, 0x0200, 0x007e, /*toggle mute*/ 0x0b01, 0x0002, 0x007e, /*vol up*/ 0x0b05, 0x0002, 0x007e, /*vol up*/ 0x0c01, 0x0004, 0x007e, /*vol dn*/ 0x0c05, 0x0004, 0x007e, /*vol dn*/ 0x0401, 0x0001, 0x000e, /*voice dial*/ 0x0608, 0x0001, 0x0020, /*answer*/ 0x0902, 0x0001, 0x0040, /*transfer*/ 0x1c02, 0x0001, 0x0000, /*establish SLC*/ /*removed as the LNR / Voice Dial covers this now*/ 0x0703, 0x0001, 0x0020, /*reject*/ 0x0502, 0x0001, 0x000e, /*LNR*/ 0x0808, 0x0001, 0x0050, /*cancel*/ 0x2206, 0x0020, 0xffff, /*charger connected*/ 0x2307, 0x0020, 0xffff, /*charger disconnected*/ 0x1403, 0x0202, 0xffff, /*reset PDL*/ 0x0E04, 0x0001, 0x0300, /* EventThreeWayReleaseAllHeld, */ /*DOUBLE RELEASE ALL HELD - REJECT WAITING*/ 0x0F08, 0x0001, 0x0500 /* EventThreeWayAcceptWaitingReleaseActive*/ /*short -ANSWER & RELEASE*/ },};/* PSKEY_USR_24 - System event configuration B */static const config_events_type events_b ={ sizeof(event_config_type) * NO_EVENTS, { 0x1002, 0x0001, 0x0340, /* EventThreeWayAcceptWaitingHoldActive ,*/ /*LONG - ANSWER & HOLD*/ 0x1101, 0x0006, 0x0200, /* EventThreeWayAddHeldTo3Way ,*/ /*SHORT - ADD HELD CALL**/ 0x1203, 0x0001, 0x0600, /* EventThreeWayConnect2Disconnect, */ /*VLONG - EX TX*/ 0x3a04, 0x0001, 0x0020, /*Event Place Incoming Call on Hold*/ 0x3b01, 0x0001, 0x0800, /*EventAcceptHeldIncomingCall*/ 0x3c02, 0x0001, 0x0800, /*EventRejectHeldIncomingCall*/ 0x1C09, 0x0200, 0x0002, /*establish SLC long release on power on*/ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },};/* PSKEY_USR_25 - Number of tone events */#define NO_TONE_EVENTS (0x0014)static const config_uint16_type no_tone_events ={ 1, {NO_TONE_EVENTS}};/* PSKEY_USR_26 - Tone event configuration */static const config_tone_events_type tone_events ={ sizeof(tone_config_type) * NO_TONE_EVENTS, { 0xff1d, /*ring tone*/ 0x0111, /*power ON*/ 0x0211, /*power OFF*/ 0x0914, /*transfer*/ 0x1c14, /*establish SLC*/ 0x1a15, /*low batt */ 0x1416, /*reset PDL */ 0x1612, /*pairing fail */ 0x3410, /*SLC Connected*/ 0x2413, /*SLC Disconnected*/ 0x2a1a, /*mute reminder*/ 0x280d, /*enter mute*/ 0x290e, /*exit mute*/ 0x1B0e, /*EventEndOfCall */ 0x040b, /*EventInitateVoiceDial */ 0x050b, /*EventLastNumberRedial*/ 0x060d, /*EventAnswer */ 0x070e, /*EventReject */ 0x080e, /*EventCancelEnd */ 0x3512 /*EventError */ }};/* PSKEY_USR_27 - PIO assignment */static const config_pio_block_type pio_block ={ 2, {0x0000, 0xffff}};/* PSKEY_USR_28 - Link Loss Num Retries */static const config_uint16_type link_loss_num_retries = { 1, {0x0005}};/* CSR Pioneer Default Configuration */const config_type csr_pioneer_default_config = { &battery_config, /* PSKEY_USR_0 - Battery configuration */ &button_config, /* PSKEY_USR_1 - Button configuration */ &button_pattern_config, /* PSKEY_USR_2 - */ &supported_features_config, /* PSKEY_USR_3 - HFP Supported Features*/ &input_pio_block, /* PSKEY_USR_4 - Input pio block*/ &HFP_1_5_features_config, /* PSKEY_USR_5 - The HFP 1.5 Supported features*/ &network_ind_time, /* PSKEY_USR_6 - network / service indicator timeout*/ &mute_remind_timeout, /* PSKEY_USR_7 - mute remind timeout*/ &power_on_timeout, /* PSKEY_USR_8 - power on timeout*/ &power_off_disabled_timeout,/* PSKEY_USR_9 - Automatic disconnect timeout */ &volume_orientation , /* PSKEY_USR_10 - Connect as Master timeout */ &pairing_timeout, /* PSKEY_USR_11 - Pairing timeout */ &auto_switch_off_timeout, /* PSKEY_USR_12 - Automatic switch off timeout */ &radio, /* PSKEY_USR_13 - Radio configuration parameters */ &nimh_charger, /* PSKEY_USR_14 - NiMH Battery Charger Configuration */ &features, /* PSKEY_USR_15 - Features block */ &volume, /* PSKEY_USR_16 - Volume gain mappings */ &no_led_filters, /* PSKEY_USR_17 - Number of LED filters */ &led_filters, /* PSKEY_USR_18 - LED filter configuration */ &no_led_states, /* PSKEY_USR_19 - Number of LED states */ &led_states, /* PSKEY_USR_20 - LED state configuration */ &no_led_events, /* PSKEY_USR_21 - Number of LED events */ &led_events, /* PSKEY_USR_22 - LED event configuration */ &events_a, /* PSKEY_USR_23 - Number of system events */ &events_b, /* PSKEY_USR_24 - System event configuration */ &no_tone_events, /* PSKEY_USR_25 - Number of tone events */ &tone_events, /* PSKEY_USR_26 - Tone event configuration */ &pio_block, /* PSKEY_USR_27 - PIO assignment */ &link_loss_num_retries /* PSKEY_USR_28 - Link Loss Num Retries */};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -