refactor(split): fix inconsistency in Kconfig names

This commit is contained in:
Xudong Zheng
2023-05-29 00:28:45 -04:00
committed by Pete Johanson
parent 5aac2743b1
commit 1adfcf92bf
5 changed files with 12 additions and 12 deletions

View File

@@ -47,7 +47,7 @@ struct peripheral_slot {
uint8_t changed_positions[POSITION_STATE_DATA_LEN];
};
static struct peripheral_slot peripherals[ZMK_BLE_SPLIT_PERIPHERAL_COUNT];
static struct peripheral_slot peripherals[ZMK_SPLIT_BLE_PERIPHERAL_COUNT];
static const struct bt_uuid_128 split_service_uuid = BT_UUID_INIT_128(ZMK_SPLIT_BT_SERVICE_UUID);
@@ -65,7 +65,7 @@ void peripheral_event_work_callback(struct k_work *work) {
K_WORK_DEFINE(peripheral_event_work, peripheral_event_work_callback);
int peripheral_slot_index_for_conn(struct bt_conn *conn) {
for (int i = 0; i < ZMK_BLE_SPLIT_PERIPHERAL_COUNT; i++) {
for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) {
if (peripherals[i].conn == conn) {
return i;
}
@@ -84,7 +84,7 @@ struct peripheral_slot *peripheral_slot_for_conn(struct bt_conn *conn) {
}
int release_peripheral_slot(int index) {
if (index < 0 || index >= ZMK_BLE_SPLIT_PERIPHERAL_COUNT) {
if (index < 0 || index >= ZMK_SPLIT_BLE_PERIPHERAL_COUNT) {
return -EINVAL;
}
@@ -131,7 +131,7 @@ int release_peripheral_slot(int index) {
}
int reserve_peripheral_slot() {
for (int i = 0; i < ZMK_BLE_SPLIT_PERIPHERAL_COUNT; i++) {
for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) {
if (peripherals[i].state == PERIPHERAL_SLOT_STATE_OPEN) {
// Be sure the slot is fully reinitialized.
release_peripheral_slot(i);
@@ -504,7 +504,7 @@ static struct bt_conn_cb conn_callbacks = {
};
K_THREAD_STACK_DEFINE(split_central_split_run_q_stack,
CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_STACK_SIZE);
CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE);
struct k_work_q split_central_split_run_q;
@@ -515,7 +515,7 @@ struct zmk_split_run_behavior_payload_wrapper {
K_MSGQ_DEFINE(zmk_split_central_split_run_msgq,
sizeof(struct zmk_split_run_behavior_payload_wrapper),
CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_QUEUE_SIZE, 4);
CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE, 4);
void split_central_split_run_callback(struct k_work *work) {
struct zmk_split_run_behavior_payload_wrapper payload_wrapper;