⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 headset_config.h

📁 BlueLab 3.5.2 单声道耳机源码
💻 H
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2005-2006
Part of BlueLab 3.6.2-release

FILE NAME
    headset_config.h
    
DESCRIPTION
    
*/

#ifndef _HEADSET_CONFIG_H_
#define _HEADSET_CONFIG_H_


#include "headset_configmanager.h"
#include "headset_powermanager.h"
#include "headset_states.h"


typedef struct
{
 	uint16     length;
 	uint16     value[1];
}config_uint16_type;


typedef struct
{
  	uint16         length;
  	uint16         value[sizeof(battery_config_type)];
}config_battery_type;


typedef struct
{
   	uint16         length;
   	uint16         value[sizeof(button_config_type)];
}config_button_type;

typedef struct
{
    uint16         length ;
    uint16         value[sizeof(button_pattern_config_type) * BM_NUM_BUTTON_MATCH_PATTERNS]; 
}config_button_pattern_type ;

typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(radio_config_type)];
}config_radio_type;

typedef struct
{
    uint16 length ;
    uint16      value[sizeof(HFP_1_5_features_type)];
}config_HFP_1_5_type ;

typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(charger_config_type)];
}config_charger_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(feature_config_type)];
}config_features_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(vol_config_type) * SOM_NUM_VOL_SETTINGS];
}config_volume_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(led_filter_config_type) * MAX_LED_FILTERS];
}config_led_filters_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(led_config_type) * MAX_LED_STATES];
}config_led_states_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(led_config_type) * MAX_LED_EVENTS];
}config_led_events_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(event_config_type) * MAX_EVENTS]; 
}config_events_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(tone_config_type) * MAX_EVENTS]; 
}config_tone_events_type;


typedef struct
{
 	uint16     length;
 	uint16     value[sizeof(PIO_block)];
}config_pio_block_type;


typedef struct
{
 	const config_battery_type*  	battery_config;     	/* PSKEY_USR_0 - Battery configuration */
 	const config_button_type*  		button_config;     		/* PSKEY_USR_1 - Button configuration */
 	const config_button_pattern_type*   button_pattern_config;  /* PSKEY_USR_2 - Button long press time */
	const config_uint16_type*  		supported_features_config;	/* PSKEY_USR_3 - Button very long press time */
	const config_uint16_type*  		input_pio_block;        /* PSKEY_USR_4 - Input PIO Block */
	const config_HFP_1_5_type* 		HFP_1_5_features_config;      		/* PSKEY_USR_5 - */
 	const config_uint16_type*  		network_ind_time;  		/* PSKEY_USR_6 - */
 	const config_uint16_type*  		mute_remind_timeout;	/* PSKEY_USR_7 - mute_remind_timeout*/
 	const config_uint16_type*  		power_on_timeout;   	/* PSKEY_USR_8 - power_on_timeout*/
 	const config_uint16_type*  		auto_disconnect_timeout;/* PSKEY_USR_9 - Automatic disconnect timeout */
 	const config_uint16_type*  		volume_orientation;   	/* PSKEY_USR_10 - Connect as Master timeout */
 	const config_uint16_type*  		pairing_timeout;    	/* PSKEY_USR_11 - Pairing timeout */
 	const config_uint16_type*  		auto_switch_off_timeout;/* PSKEY_USR_12 - Automatic switch off timeout */
 	const config_radio_type*  		radio;       			/* PSKEY_USR_13 - Radio configuration parameters */
 	const config_charger_type*  	nimh_charger;     		/* PSKEY_USR_14 - NiMH Battery Charger Configuration */
 	const config_features_type*  	features;      			/* PSKEY_USR_15 - Features block */
 	const config_volume_type*  		volume;       			/* PSKEY_USR_16 - Volume gain mappings */
 	const config_uint16_type*  		no_led_filters;     	/* PSKEY_USR_17 - Number of LED filters */
 	const config_led_filters_type* 	led_filters;     		/* PSKEY_USR_18 - LED filter configuration */
 	const config_uint16_type*  		no_led_states;     		/* PSKEY_USR_19 - Number of LED states */
 	const config_led_states_type* 	led_states;      		/* PSKEY_USR_20 - LED state configuration */
 	const config_uint16_type*  		no_led_events;     		/* PSKEY_USR_21 - Number of LED events */
 	const config_led_events_type* 	led_events;      		/* PSKEY_USR_22 - LED event configuration */
 	const config_events_type*  		events_a;     			/* PSKEY_USR_23 - Number of events */
 	const config_events_type*  		events_b;       	    /* PSKEY_USR_24 - System event configuration */
 	const config_uint16_type*  		no_tone_events;     	/* PSKEY_USR_25 - Number of tone events */
 	const config_tone_events_type* 	tones;       			/* PSKEY_USR_26 - Tone event configuration */
 	const config_pio_block_type* 	pio_block;      		/* PSKEY_USR_27 - PIO assignment */
    const config_uint16_type*       link_loss_num_retries;	/* PSKEY_USR_28 - Link Loss Num Retries*/
}config_type;


/****************************************************************************
NAME 
 	ConfigRetrieve

DESCRIPTION
 	This function is called to read a configuration key.  If the key exists
 	in persistent store it is read from there.  If it does not exist then
 	the default is read from constant space
 
RETURNS
 	0 if no data was read otherwise the length of data
*/
uint16 ConfigRetrieve(uint16 key, void* data, uint16 len);


uint8 * get_service_record ( void ) ;
uint16 get_service_record_length ( void ) ;


#endif /* _HEADSET_CONFIG_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -