Enable PCM config in host

This commit is contained in:
weitianhua 2020-07-16 15:16:21 +08:00
parent 85e3c733ff
commit 887f5040da
2 changed files with 46 additions and 1 deletions

View File

@ -78,6 +78,47 @@ menu "Bluetooth"
default 1 if BTDM_CTRL_BR_EDR_SCO_DATA_PATH_PCM default 1 if BTDM_CTRL_BR_EDR_SCO_DATA_PATH_PCM
default 0 default 0
menuconfig BTDM_CTRL_PCM_ROLE_EDGE_CONFIG
bool "PCM Signal Config (Role and Polar)"
depends on BTDM_CTRL_BR_EDR_SCO_DATA_PATH_PCM
default y
choice BTDM_CTRL_PCM_ROLE
prompt "PCM Role"
depends on BTDM_CTRL_PCM_ROLE_EDGE_CONFIG
help
PCM role can be configured as PCM master or PCM slave
config BTDM_CTRL_PCM_ROLE_MASTER
bool "PCM Master"
config BTDM_CTRL_PCM_ROLE_SLAVE
bool "PCM Slave"
endchoice
choice BTDM_CTRL_PCM_POLAR
prompt "PCM Polar"
depends on BTDM_CTRL_PCM_ROLE_EDGE_CONFIG
help
PCM polarity can be configured as Falling Edge or Rising Edge
config BTDM_CTRL_PCM_POLAR_FALLING_EDGE
bool "Falling Edge"
config BTDM_CTRL_PCM_POLAR_RISING_EDGE
bool "Rising Edge"
endchoice
config BTDM_CTRL_PCM_ROLE_EFF
int
default 0 if BTDM_CTRL_PCM_ROLE_MASTER
default 1 if BTDM_CTRL_PCM_ROLE_SLAVE
default 0
config BTDM_CTRL_PCM_POLAR_EFF
int
default 0 if BTDM_CTRL_PCM_POLAR_FALLING_EDGE
default 1 if BTDM_CTRL_PCM_POLAR_RISING_EDGE
default 0
config BTDM_CTRL_AUTO_LATENCY config BTDM_CTRL_AUTO_LATENCY
bool "Auto latency" bool "Auto latency"
depends on BTDM_CTRL_MODE_BTDM depends on BTDM_CTRL_MODE_BTDM

View File

@ -25,7 +25,7 @@
extern "C" { extern "C" {
#endif #endif
#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20200611 #define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20200622
/** /**
* @brief Bluetooth mode for controller enable/disable * @brief Bluetooth mode for controller enable/disable
@ -149,6 +149,8 @@ the adv packet will be discarded until the memory is restored. */
.bt_legacy_auth_vs_evt = BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF, \ .bt_legacy_auth_vs_evt = BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF, \
.bt_max_sync_conn = CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF, \ .bt_max_sync_conn = CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF, \
.ble_sca = CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF, \ .ble_sca = CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF, \
.pcm_role = CONFIG_BTDM_CTRL_PCM_ROLE_EFF, \
.pcm_polar = CONFIG_BTDM_CTRL_PCM_POLAR_EFF, \
.magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL, \ .magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL, \
}; };
@ -188,6 +190,8 @@ typedef struct {
*/ */
uint8_t bt_max_sync_conn; /*!< BR/EDR maximum ACL connection numbers. Effective in menuconfig */ uint8_t bt_max_sync_conn; /*!< BR/EDR maximum ACL connection numbers. Effective in menuconfig */
uint8_t ble_sca; /*!< BLE low power crystal accuracy index */ uint8_t ble_sca; /*!< BLE low power crystal accuracy index */
uint8_t pcm_role; /*!< PCM role (master & slave)*/
uint8_t pcm_polar; /*!< PCM polar trig (falling clk edge & rising clk edge) */
uint32_t magic; /*!< Magic number */ uint32_t magic; /*!< Magic number */
} esp_bt_controller_config_t; } esp_bt_controller_config_t;