|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
Elapsed Time Service callback structure. More...
#include <zephyr/bluetooth/services/ets.h>
Data Fields | |
| int(* | read_elapsed_time )(struct bt_ets_elapsed_time *time) |
| Read elapsed time callback (MANDATORY). | |
| int(* | read_clock_status )(uint8_t *status) |
| Read clock status (BT_ETS_CLOCK_STATUS) callback (MANDATORY). | |
| enum bt_ets_write_result(* | write_elapsed_time )(const struct bt_ets_elapsed_time *time) |
| Write elapsed time callback (OPTIONAL). | |
| void(* | indication_changed )(bool enabled) |
| Indication subscription changed callback (OPTIONAL). | |
Elapsed Time Service callback structure.
| void(* bt_ets_cb::indication_changed) (bool enabled) |
Indication subscription changed callback (OPTIONAL).
Called when a client enables or disables indications for the Current Elapsed Time characteristic.
| enabled | True if indications enabled, false if disabled. |
| int(* bt_ets_cb::read_clock_status) (uint8_t *status) |
Read clock status (BT_ETS_CLOCK_STATUS) callback (MANDATORY).
Called when a BLE client reads the Current Elapsed Time characteristic. Application must return the current clock status flags.
| status | Pointer to store clock status byte. |
| 0 | On success. |
| -errno | Negative errno on failure. |
| int(* bt_ets_cb::read_elapsed_time) (struct bt_ets_elapsed_time *time) |
Read elapsed time callback (MANDATORY).
Called when a BLE client reads the Current Elapsed Time characteristic. Application must fill the elapsed time structure with current time information.
| time | Elapsed time structure to fill. |
| 0 | On success. |
| -errno | Negative errno on failure. |
| enum bt_ets_write_result(* bt_ets_cb::write_elapsed_time) (const struct bt_ets_elapsed_time *time) |
Write elapsed time callback (OPTIONAL).
Called when a BLE client writes to the Current Elapsed Time characteristic. Only applicable if
CONFIG_BT_ETS_CURRENT_ELAPSED_TIME_WRITABLE. is enabled. Application should validate time source quality, range, and other constraints.| time | Elapsed time structure written by client. |