Bluetooth: Remove _gatt_ infix for Heart Rate Service (HRS)
The _gatt_ infix was determined to be unnecessary as GATT is implied by it being a Bluetooth service. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
b4a8229db6
commit
8d7b5ebd7a
17 changed files with 29 additions and 29 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
/**
|
||||
* @brief Heart Rate Service (HRS)
|
||||
* @defgroup bt_gatt_hrs Heart Rate Service (HRS)
|
||||
* @defgroup bt_hrs Heart Rate Service (HRS)
|
||||
* @ingroup bluetooth
|
||||
* @{
|
||||
*
|
||||
|
@ -29,7 +29,7 @@ extern "C" {
|
|||
*
|
||||
* @return Zero in case of success and error code in case of error.
|
||||
*/
|
||||
int bt_gatt_hrs_notify(uint16_t heartrate);
|
||||
int bt_hrs_notify(uint16_t heartrate);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ CONFIG_BT_DEBUG_LOG=y
|
|||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=768
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
CONFIG_BT_DEVICE_APPEARANCE=833
|
||||
CONFIG_BT_DEVICE_NAME="Dynamic test beacon"
|
||||
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
|
||||
|
|
|
@ -225,7 +225,7 @@ static void hrs_notify(void)
|
|||
heartrate = 90U;
|
||||
}
|
||||
|
||||
bt_gatt_hrs_notify(heartrate);
|
||||
bt_hrs_notify(heartrate);
|
||||
}
|
||||
|
||||
void modulate_tx_power(void *p1, void *p2, void *p3)
|
||||
|
|
|
@ -9,7 +9,7 @@ CONFIG_BT_PERIPHERAL=y
|
|||
CONFIG_BT_GATT_DIS=y
|
||||
CONFIG_BT_ATT_PREPARE_COUNT=5
|
||||
CONFIG_BT_BAS=y
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
CONFIG_BT_PRIVACY=y
|
||||
CONFIG_BT_DEVICE_NAME="Zephyr Peripheral Sample Long Name"
|
||||
CONFIG_BT_DEVICE_APPEARANCE=833
|
||||
|
|
|
@ -315,7 +315,7 @@ static void hrs_notify(void)
|
|||
heartrate = 90U;
|
||||
}
|
||||
|
||||
bt_gatt_hrs_notify(heartrate);
|
||||
bt_hrs_notify(heartrate);
|
||||
}
|
||||
|
||||
void main(void)
|
||||
|
|
|
@ -5,6 +5,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
CONFIG_BT_GATT_DIS=y
|
||||
CONFIG_BT_GATT_DIS_PNP=n
|
||||
CONFIG_BT_BAS=y
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
CONFIG_BT_DEVICE_NAME="Zephyr Heartrate Sensor"
|
||||
CONFIG_BT_DEVICE_APPEARANCE=833
|
||||
|
|
|
@ -108,7 +108,7 @@ static void hrs_notify(void)
|
|||
heartrate = 90U;
|
||||
}
|
||||
|
||||
bt_gatt_hrs_notify(heartrate);
|
||||
bt_hrs_notify(heartrate);
|
||||
}
|
||||
|
||||
void main(void)
|
||||
|
|
|
@ -5,4 +5,4 @@ zephyr_sources_ifdef(CONFIG_BT_GATT_DIS dis.c)
|
|||
|
||||
zephyr_sources_ifdef(CONFIG_BT_BAS bas.c)
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_BT_GATT_HRS hrs.c)
|
||||
zephyr_sources_ifdef(CONFIG_BT_HRS hrs.c)
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
# Copyright (c) 2018 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menuconfig BT_GATT_HRS
|
||||
menuconfig BT_HRS
|
||||
bool "Enable GATT Heart Rate service"
|
||||
|
||||
config BT_GATT_HRS_LOG_LEVEL
|
||||
config BT_HRS_LOG_LEVEL
|
||||
int "Heart Rate service log level"
|
||||
depends on LOG
|
||||
range 0 4
|
||||
default 0
|
||||
depends on BT_GATT_HRS
|
||||
depends on BT_HRS
|
||||
help
|
||||
Sets log level for the Heart Rate service.
|
||||
Levels are:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <bluetooth/uuid.h>
|
||||
#include <bluetooth/gatt.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_BT_GATT_HRS_LOG_LEVEL
|
||||
#define LOG_LEVEL CONFIG_BT_HRS_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(hrs);
|
||||
|
||||
|
@ -65,7 +65,7 @@ static int hrs_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int bt_gatt_hrs_notify(uint16_t heartrate)
|
||||
int bt_hrs_notify(uint16_t heartrate)
|
||||
{
|
||||
int rc;
|
||||
static uint8_t hrm[2];
|
||||
|
|
|
@ -6,7 +6,7 @@ CONFIG_BT_PRIVACY=y
|
|||
CONFIG_BT_SMP=y
|
||||
CONFIG_BT_SIGNING=y
|
||||
CONFIG_BT_BAS=y
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
CONFIG_BT_ATT_PREPARE_COUNT=2
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
|
|
|
@ -6,7 +6,7 @@ CONFIG_BT_PRIVACY=y
|
|||
CONFIG_BT_SMP=y
|
||||
CONFIG_BT_SIGNING=y
|
||||
CONFIG_BT_BAS=y
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
CONFIG_BT_ATT_PREPARE_COUNT=2
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
|
|
|
@ -140,7 +140,7 @@ static void hrs_notify(void)
|
|||
heartrate = 90U;
|
||||
}
|
||||
|
||||
bt_gatt_hrs_notify(heartrate);
|
||||
bt_hrs_notify(heartrate);
|
||||
}
|
||||
|
||||
static void test_con2_main(void)
|
||||
|
|
|
@ -18,7 +18,7 @@ CONFIG_SHELL=y
|
|||
CONFIG_BT_SHELL=y
|
||||
CONFIG_BT_DEVICE_NAME="test shell"
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=6
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
|
|
@ -22,7 +22,7 @@ CONFIG_BT_L2CAP_TX_BUF_COUNT=4
|
|||
CONFIG_BT_ID_MAX=2
|
||||
CONFIG_BT_EATT=y
|
||||
CONFIG_BT_GATT_DYNAMIC_DB=y
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
CONFIG_BT_WHITELIST=y
|
||||
CONFIG_BT_REMOTE_INFO=y
|
||||
CONFIG_BT_REMOTE_VERSION=y
|
||||
|
|
|
@ -11,7 +11,7 @@ CONFIG_BT_SMP=y
|
|||
CONFIG_BT_SIGNING=y
|
||||
CONFIG_BT_ATT_PREPARE_COUNT=2
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_GATT_HRS=y
|
||||
CONFIG_BT_HRS=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_DEVICE_NAME="test shell"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
|
||||
|
||||
#if defined(CONFIG_BT_GATT_HRS)
|
||||
#if defined(CONFIG_BT_HRS)
|
||||
static bool hrs_simulate;
|
||||
|
||||
static const struct bt_data ad[] = {
|
||||
|
@ -80,17 +80,17 @@ static int cmd_hrs_simulate(const struct shell *shell,
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BT_GATT_HRS */
|
||||
#endif /* CONFIG_BT_HRS */
|
||||
|
||||
#define HELP_NONE "[none]"
|
||||
#define HELP_ADDR_LE "<address: XX:XX:XX:XX:XX:XX> <type: (public|random)>"
|
||||
|
||||
SHELL_STATIC_SUBCMD_SET_CREATE(hrs_cmds,
|
||||
#if defined(CONFIG_BT_GATT_HRS)
|
||||
#if defined(CONFIG_BT_HRS)
|
||||
SHELL_CMD_ARG(simulate, NULL,
|
||||
"register and simulate Heart Rate Service <value: on, off>",
|
||||
cmd_hrs_simulate, 2, 0),
|
||||
#endif /* CONFIG_BT_GATT_HRS*/
|
||||
#endif /* CONFIG_BT_HRS*/
|
||||
SHELL_SUBCMD_SET_END
|
||||
);
|
||||
|
||||
|
@ -104,7 +104,7 @@ static int cmd_hrs(const struct shell *shell, size_t argc, char **argv)
|
|||
SHELL_CMD_ARG_REGISTER(hrs, &hrs_cmds, "Heart Rate Service shell commands",
|
||||
cmd_hrs, 2, 0);
|
||||
|
||||
#if defined(CONFIG_BT_GATT_HRS)
|
||||
#if defined(CONFIG_BT_HRS)
|
||||
static void hrs_notify(void)
|
||||
{
|
||||
static uint8_t heartrate = 90U;
|
||||
|
@ -115,9 +115,9 @@ static void hrs_notify(void)
|
|||
heartrate = 90U;
|
||||
}
|
||||
|
||||
bt_gatt_hrs_notify(heartrate);
|
||||
bt_hrs_notify(heartrate);
|
||||
}
|
||||
#endif /* CONFIG_BT_GATT_HRS */
|
||||
#endif /* CONFIG_BT_HRS */
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -128,11 +128,11 @@ void main(void)
|
|||
while (1) {
|
||||
k_sleep(K_SECONDS(1));
|
||||
|
||||
#if defined(CONFIG_BT_GATT_HRS)
|
||||
#if defined(CONFIG_BT_HRS)
|
||||
/* Heartrate measurements simulation */
|
||||
if (hrs_simulate) {
|
||||
hrs_notify();
|
||||
}
|
||||
#endif /* CONFIG_BT_GATT_HRS */
|
||||
#endif /* CONFIG_BT_HRS */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue