mirror of https://github.com/zmkfirmware/zmk.git
Compare commits
5 Commits
5ac40f8da9
...
96cb3b8c27
| Author | SHA1 | Date |
|---|---|---|
|
|
96cb3b8c27 | |
|
|
ece2ce11b8 | |
|
|
d32ffb0a33 | |
|
|
83eafcbf9b | |
|
|
88e5d44da9 |
|
|
@ -25,9 +25,6 @@ config USB_DEVICE_PID
|
|||
config USB_DEVICE_MANUFACTURER
|
||||
default "ZMK Project"
|
||||
|
||||
config BT_DEVICE_APPEARANCE
|
||||
default 961
|
||||
|
||||
config BT_DIS_PNP_VID
|
||||
default 0x1D50
|
||||
|
||||
|
|
@ -222,9 +219,6 @@ config BT_GATT_NOTIFY_MULTIPLE
|
|||
config BT_GATT_AUTO_SEC_REQ
|
||||
default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL)
|
||||
|
||||
config BT_DEVICE_APPEARANCE
|
||||
default 961
|
||||
|
||||
config BT_PERIPHERAL_PREF_MIN_INT
|
||||
default 6
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@ config SYSTEM_WORKQUEUE_STACK_SIZE
|
|||
default 2048 if SOC_RP2040
|
||||
default 2048 if ZMK_BLE
|
||||
|
||||
# Basic
|
||||
config BT_DEVICE_APPEARANCE
|
||||
default 961
|
||||
|
||||
# HID
|
||||
if ZMK_HID_REPORT_TYPE_HKRO
|
||||
|
||||
|
|
@ -110,4 +114,4 @@ config ZMK_BATTERY_REPORT_INTERVAL
|
|||
default 60
|
||||
|
||||
# Imports
|
||||
rsource "src/split/Kconfig.defaults"
|
||||
rsource "src/split/Kconfig.defaults"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
# ZMK_SRC_DIR: Path to zmk/app (default is ./)
|
||||
# ZMK_BUILD_DIR: Path to build directory (default is $ZMK_SRC_DIR/build)
|
||||
# ZMK_EXTRA_MODULES: Path to at most one module (in addition to any in west.yml)
|
||||
# ZMK_TESTS_VERBOSE: Be more verbose
|
||||
# ZMK_TESTS_AUTO_ACCEPT: Replace snapshot files with new key events
|
||||
# J: Number of parallel jobs (default is 4)
|
||||
|
||||
|
|
@ -42,13 +41,12 @@ build_cmd="west build ${ZMK_SRC_DIR:+-s $ZMK_SRC_DIR} -d ${ZMK_BUILD_DIR}/tests/
|
|||
-b native_posix_64 -p -- -DCONFIG_ASSERT=y -DZMK_CONFIG="$(realpath $path)" \
|
||||
${ZMK_EXTRA_MODULES:+-DZMK_EXTRA_MODULES="$(realpath ${ZMK_EXTRA_MODULES})"}"
|
||||
|
||||
if [ -z ${ZMK_TESTS_VERBOSE} ]; then
|
||||
$build_cmd >/dev/null 2>&1
|
||||
else
|
||||
echo "ZMK_SRC_DIR: ${ZMK_SRC_DIR:-.}"
|
||||
echo "ZMK_BUILD_DIR: $ZMK_BUILD_DIR"
|
||||
$build_cmd
|
||||
fi
|
||||
build_log_tmp="${ZMK_BUILD_DIR}/tmp/$testcase/build.log"
|
||||
build_log="${ZMK_BUILD_DIR}/tests/$testcase/build.log"
|
||||
mkdir -p $(dirname $build_log_tmp)
|
||||
$build_cmd >"$build_log_tmp" 2>&1
|
||||
mv "$build_log_tmp" "$build_log"
|
||||
rmdir -p $(dirname $build_log_tmp) 2>/dev/null || true
|
||||
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "FAILED: $testcase did not build" | tee -a ${ZMK_BUILD_DIR}/tests/pass-fail.log
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ static void blvl_ccc_cfg_changed(const struct bt_gatt_attr *attr, uint16_t value
|
|||
|
||||
static ssize_t read_blvl(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf,
|
||||
uint16_t len, uint16_t offset) {
|
||||
const uint8_t source = (uint8_t)(uint32_t)attr->user_data;
|
||||
const uint8_t source = *(uint8_t *)attr->user_data;
|
||||
uint8_t level = 0;
|
||||
int rc = zmk_split_central_get_peripheral_battery_level(source, &level);
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ static const struct bt_gatt_cpf aux_level_cpf = {
|
|||
|
||||
#define PERIPH_BATT_LEVEL_ATTRS(i, _) \
|
||||
BT_GATT_CHARACTERISTIC(BT_UUID_BAS_BATTERY_LEVEL, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, \
|
||||
BT_GATT_PERM_READ, read_blvl, NULL, i), \
|
||||
BT_GATT_PERM_READ, read_blvl, NULL, ((uint8_t[]){i})), \
|
||||
BT_GATT_CCC(blvl_ccc_cfg_changed, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), \
|
||||
BT_GATT_CPF(&aux_level_cpf), BT_GATT_CUD(PERIPH_CUD(i), BT_GATT_PERM_READ),
|
||||
|
||||
|
|
|
|||
|
|
@ -55,13 +55,14 @@ int zmk_split_transport_peripheral_command_handler(
|
|||
if (err) {
|
||||
LOG_ERR("Failed to invoke behavior %s: %d", binding.behavior_dev, err);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_PHYSICAL_LAYOUT: {
|
||||
zmk_physical_layouts_select(cmd.data.set_physical_layout.layout_idx);
|
||||
return zmk_physical_layouts_select(cmd.data.set_physical_layout.layout_idx);
|
||||
}
|
||||
#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS)
|
||||
case ZMK_SPLIT_TRANSPORT_CENTRAL_CMD_TYPE_SET_HID_INDICATORS: {
|
||||
raise_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){
|
||||
return raise_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){
|
||||
.indicators = cmd.data.set_hid_indicators.indicators});
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue