📄 config.h
字号:
#ifndef _CONFIG_H
#define _CONFIG_H
/*
PIO configuration - we can't use PIOs 0 & 1 since we want to run
on the CASIRA.
*/
#ifdef DEV_BOARD_HS
/* Buttons used by the headset */
#define PIO_TALK (1<<7)
#define PIO_VOLUME_DOWN (1<<5)
#define PIO_VOLUME_UP (1<<4)
#define PIO_DEEP_SLEEP_NOW (1<<6)
/* Buttons that have to be checked for presses */
#define HS_BUTTONS_USED (PIO_TALK | PIO_VOLUME_DOWN | PIO_VOLUME_UP | PIO_DEEP_SLEEP_NOW)
/*
We reset the headset framework when a suitable combination of
buttons are pressed.
*/
#define RESET_CONDITION (PIO_VOLUME_UP | PIO_VOLUME_DOWN)
/*
We mute/unmute the microphone when volume up and down are pressed
together.
*/
#define MUTE_CONDITION (PIO_VOLUME_UP | PIO_VOLUME_DOWN)
/* Used to power the codec on/off */
#define PIO_CODEC (1<<8)
#define CODEC_ON ~0
#define CODEC_OFF 0
/* Flashing LEDs to indicate the current state of the headset */
#define PIO_LED_PAIR (1<<3)
#define PIO_LED_CONNECT (1<<2)
/* Define flashing LED timeouts */
#define LED_PAIR_ON D_mSEC(200)
#define LED_PAIR_OFF D_mSEC(3800)
#define LED_CONNECT_SLAVE_ON D_mSEC(200)
#define LED_CONNECT_SLAVE_OFF D_mSEC(2800)
#define LED_CONNECT_MASTER_ON D_mSEC(200)
#define LED_CONNECT_MASTER_OFF D_mSEC(4800)
#define LED_CONNECTED_ON D_mSEC(500)
#define LED_CONNECTED_OFF D_mSEC(9500)
#else
/* Buttons used by the headset */
#define PIO_TALK (1<<2)
#define PIO_VOLUME_DOWN (1<<6)
#define PIO_VOLUME_UP (1<<7)
/* Buttons that have to be checked for presses */
#define HS_BUTTONS_USED (PIO_TALK | PIO_VOLUME_DOWN | PIO_VOLUME_UP)
/*
We reset the headset framework when a suitable combination of
buttons are pressed.
*/
#define RESET_CONDITION (PIO_VOLUME_UP | PIO_VOLUME_DOWN)
/*
We mute/unmute the microphone when volume up and down are pressed
together.
*/
#define MUTE_CONDITION (PIO_VOLUME_UP | PIO_VOLUME_DOWN)
#endif
/* Interval used in call to BattInit */
#define BATT_MONITOR_PERIOD D_SEC(10)
/*
Timeout values
*/
#define PAIRING_TIMEOUT D_SEC(300)
#define MASTER_CONNECT_TIMEOUT D_SEC(60)
#define SLAVE_CONNECT_TIMEOUT D_SEC(300)
#define MUTE_BEEP_DELAY D_SEC(3)
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -